Microcontroller freezes randomly when switching on a relay (snubber inside)

Exactly the same situation. You remove the jumper and the centre pin on the jumper header becomes your input reference. In either case, the funny thing is that since the board has only three screw terminals (or four in the two relay version) for the control input, you end up with one control wire screwed in and the other connected to the jumper header.

Not "could" but should in this case be the 5 V version, since #4/ #23 show a totally inappropriate voltage regulator dedicated to powering the relay module(s). :roll_eyes:

Note again - the circuit you give shows the indicator LED in series with the optoisolator - if it is a green LED, then more than 3.3 V is required to reliably actuate the circuit so the input side needs to be connected between an ESP output and the 5 V line on the ESP board.