How to setup local connection between 2 androids?

I recently fixed my mini home server not connecting via local network. They always connect via a relay. So, I did sudo ufw allow 22000 in my home server and in an instant all my phones reconnected via tcp lan and everything works fine now.

How do I make it as such with android?

Android itself shouldn’t need any special configuration to be able to set up direct connections. Unless the device is rooted and you’ve installed a 3rd party firewall application, but I assume that you would be aware of that already if this was the case here :wink:.

Which connections are the problem exactly? The connections between the Android devices themselves? Can you describe your overall Syncthing setup in more details?

yeah, my phones are not rooted, plus it’s all google pixels so like it’s close to stock android experience.

I didn’t really do much to set syncthing up on android. I installed it through f-droid, added my pc (via tcp lan), added my mini pc (via relay at first, then fixed it), and my other androids (via relay). I’ve made sure “Local Discovery” is checked in all 3 of my phones, the only settings I didn’t really touch are both “Debug” and “Experimental” menus.

Local discovery is broken on Android due to the OS restrictions. If you have disabled global discovery, please try enabling it again. Also, if you’ve modified any Syncthing settings to non-default values, please make it clear too.

1 Like

That’s not the case anymore.

What works:

  • IPv4 local discovery
  • publishing external IPv4/IPv6 to the global discovery server

What doesn’t:

  • IPv6 local discovery
  • publishing IPv4/IPv6 LAN IPs to the global discovery server

Oops, in that case it would be useful to see screenshots from the Web GUI on Android (available from the left slide-out menu), and specifically what it says about discovery.

would this suffice?

I have made sure global discovery is turned on, also just in case I switched it off and on again and restarted syncthing

Discovery looks normal, same as on my Android devices (which do establish direct connections just fine). I would look into the router and see whether there isn’t anything going on there. Are there any firewalls running on it? What happens if you disable those completely?

There is also a “feature” called Client Isolation or similar in some routers. It blocks direct traffic between Wi-Fi clients and only lets them talk to the router. If you find something like that in the router’s settings, try disabling it.

1 Like

I’ve checked my wifi settings, nothing glaring that needed to be turned on/off or set. Wouldn’t there be something wrong with my syncthing on these android devices instead? Because I can connect all my android devices to my home server on the local network. Media server apps or services in that regards hosted on my home server can be seen/connected locally, but not syncthing between androids.

sorry everyone, I just realized I might’ve not explained it all too well. The current situation is my android can connect to my pc and home server via tcp lan, but not between them.

So whats working is:

pc ↔ pc, pc ↔ android

but not

android <-/-> android

meaning so they’re always connected via relay

Do either of the PCs have a Wi-Fi interface? If so, or you can add one, it would be an easy way to test the Wi-Fi connection.

Be sure to temporarily disconnect the wired LAN connection during testing to force the PC to use the Wi-Fi network. If Syncthing ends up going thru a relay to reach the Android devices, it’ll point the way to the culprit.

1 Like

ark! pc hotspot worked :D, I guess the problem is my router. I have this router at home mi-router-4a-gigabit-edition - Mi Global Home. Is it just incompatible with some routers or something else?

In the router setting, there’s this DMZ setting but I didn’t switch it on. I don’t find anything else that says “isolate/hide one devices to the others” or something like that…, though it’s a bit confusing that I can access everything from android but other androids :/‎

You could try flashing OpenWRT if you’re feeling adventurous.

1 Like

Can the devices connect directly if you specify hard-coded IP addresses in Syncthing?

1 Like

guys I fixed it!, there was a firewall after all, but it’s hidden behind the android app.

I was scrolling through the product page and saw this, lol

everything is working all right now

I did try this once before but no luck

well after all that debacle, I might consider this one out :)‎

I have an old unused router, probably want to try playing around with that first since I never custom flash anything besides phones


thank you everyone for the help

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