Feature #3
The state of the output pin becomes HIGH (5V) when configuring the pin as output.
100%
Description
The relay are changing state at boot, which is unwanted behavior. Try the following:
https://forum.arduino.cc/index.php?topic=568603.0
So you're saying that setting them low turns the relay off - it just doesn't happen immediately when your sketch runs? That's expected, because during the time right after a reset, the bootloader runs, and during that time, the pins are INPUT. If the relay board has them connected to the gate of a mosfet (not unreasonable) the pins are floating and will pick up noise from the environment, potentially going high. To prevent this, use a pulldown resistor (10k should be fine, but really anything within an order of magnitude of that is fine) between the relay pins and ground, this will hold the pin in a defined state when it's not being driven.