Disable local mode in resin OS dev version


I am using a resin OS dev version (I am using the docker in docker hack, so I am using the 2.0.6+rev3 version).

Following the steps in local-mode man:

  • In order to use local mode on a device:
    • The device must be running resinOS v2.0 or higher with supervisor v4.0 or higher.
    • The device must be running a development variant of the OS. If you try to use a production variant, you will not be able to use local mode. The production devices have SSH and the Docker socket locked down, both of which are needed for the local mode feature.
    • Local mode must be enabled through the dashboard. To use local mode on a development device, click on the small Actions dropdown at the top right of the device page and select Enable Local Mode.

The last point, as I could see, modifies the device variable RESIN_SUPERVISOR_LOCAL_MODE. However, when I disable the local mode (and RESIN_SUPERVISOR_LOCAL_MODE variable is set to 0), I can still use the local mode (resin local scan list the device, resin local ssh connects to the device, …).

I don’t know if it is a bug or if it is the expected behaviour, but reading the documentation (at lest for me) I expected to disable the local mode completely.

Has the device received a reboot since removing the local mode settings? I’m pretty sure that disabling local mode requires a restart to reconfigure the services.

Yes, I checked it. I reboot after the variable setting and the behaviour is the same: I can still see the device using resin local scan, and also I can connect to the device using resin local ssh.

Might be a problem using such Resin OS version? Or is there something else?

It would seem I ended up confused between two different feature sets.

  • There is local mode which tells the device to receive code via the resin push, and turns off updates from the cloud.
  • There is -dev OS which tells the device to be available for troubleshooting via resin scan and resin ssh
    In summary the behaviour you are witnessing is expected, because development images are deliberately quite permissive.

Ok thank you. I misunderstood the documentation and I thought that resin local commands (like ssh) could be disabled in the device using a dev OS version.

Thank you for the clarification!