PC and phone keep disconnecting with global discovery and relay off

Use case: only sync when on the same network as the PC, but I take phone out with me regularly, which disconnects it from wi-fi. I want to return to the same wi-fi and re-enable the sync automatically. I want global discovery turned off

The problem: with global discovery and relay turned off, once I return the phone to the same wi-fi, it will forever be “disconnected” from the PC with no way to automatically reconnect them. Both devices say “Disconnected, no recent network activity”. Toggling global discovery and relay on and off fixes the issue until next time the phone leaves the network

Additional information: the strict local-local sync continues to work. I have a server and a PC on the same network permanently and they never disconnect from each other, so it has to do with the fact that the phone hops networks (usually between the home wi-fi and the cellular)

Is there any solution to this? “Only sync on wi-fi” isn’t an option

Generally local discovery doesn’t work well on Android, leaving global discovery as the usable workaround for phones. If the server has a static address, enter that in the phone and you should be fine anyway.

Local discovery on Android is a bit tricky as @calmh already noted, but should work in most cases.

What OS are you running on your PC? Is docker involved? That tends to break our current workaround.

If it’s a Windows PC make sure to configure your network profile as private.

What OS are you running on your PC?

Windows

Is docker involved?

No docker

configure your network profile as private

If the server has a static address, enter that in the phone and you should be fine anyway

I will apply this advice and report back in a few days, or as soon as it breaks in case it didn’t help.

In addition, you could set the allowedNetworks preference for the PC on your phone, so it can won’t try connecting unless it’s found under your home network’s IP range. See Syncthing Configuration — Syncthing documentation and under advanced configuration in the GUI.

My solution is to exit from Syncthing if I’m going to be away from home. There is an option on the program menu to exit the app and then it won’t use your battery anymore.

Here to report that the following eliminated the issue:

  • set PC network profile as “private”
  • enter the PC’s static local address in the phone’s settings
  • keep global discovery and relay off

This setup survived hopping networks between home Wi-Fi and cellular, and between home Wi-Fi and foreign Wi-Fi.
Cheers everyone for the help,

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.