I have an Android phone and a desktop paired. Syncing works like a charm in my home wifi, as well as in basically all wifi networks I have been so far.
Now I am at a hotel wifi, and on my phone it says that the device “desktop” is disconnected.
When I use a VPN (on my mobile in that hotel wifi) syncthing works (device connected, sync working). So it seems to be something about that wifi?
Some networks are too restrictive for it to be able to connect directly. It should use relays, but you have to make sure that is enabled and working on both sides (it should be listed as one of the listen addresses)
Thanks a lot! How do I configure/debug if the relay works? I found documentation on how to run a relay server, but it looks as if syncthing should connect to relay servers automatically?
You don’t need to add a relay, it should use one by default if it can’t connect directly. The relay device id is printed on startup/embedded in the url.
Nevertheless adding a relay is what solved the problem. For a public relay it’s impossible to observe the print on startup. It can be found here though: https://relays.syncthing.net/endpoint
If you did not change default settings, you shouldn’t need to configure anything, relays should just work. The fact that it doesn’t suggest you changed the default settings.
Please keep in mind though that any of the relays listed at https://relays.syncthing.net/endpoint can come and go anytime, so if you just added a random one to your configuration, there is no guarantee that that specific relay will be online tomorrow.
I didn’t change the default settings, but happy to check again. How can I find out the relevent default settings with which it should work?
My hunch is that the discovery server runs on a port that’s blocked in the wifi here.
In Settings/Connection I have: Enable NAT traversal, Global Discovery, Local Discovery, Enable Relaying activated on both devices.
When I have the default Sync Protocol Listen Address syncing does not work. When I add a relay manually it does work.
Maybe it’s something with DNS resolver on Android 12? I use an IP for the relay, maybe if I use an IP for the relays.syncthing.net endpoint it would work, too?
Discovery runs on a normal https port (443). There are also relay servers than run on the same port. It should just work. You can check discovered addresses of the other device to see what is discovered.
You should also verify that the settings are default on the other device.