Avoid using syncthing's public global discovery servers

I plan to self-host a discovery server and my expectations were that this way I would avoid my nodes contact the public discovery servers. However, looking at the code, it seems the configured global discovery server is just added to a hardcoded list of public servers.

Any reason this was designed in this way?

From a security & privacy point of view a user should have the option to stay away from the public network.

That is not the case, if you set discovery servers to something other than default that replaces the default servers, much as you’d expect.

1 Like

I might be misinterpreting the code then. However, I only started looking at the code because the Android client 1.17.0 which has a global server configured shows “Announce 3/3” which I interpret as the client is connected to 3 servers out of 3. Where am I wrong?

If you could hover over the 3/3 you’d see that 2 of those is local discovery (ipv4/ipv6) amd then your server.

That feature is 1.18+ AFAIK, but yes, once your Android is 1.18 you can hover over the 3/3 to see where it announces itself.

Also 3/3 means you only have one discovery server. If you want to roll your own setup and have IPv6 connectivity, I would advise to add one entry that is IPv4 only and one IPv6 only (can be done via DNS, so that both records reference the same discovery server). Otherwise your clients will only announce themselves over IPv4 or IPv6, but not both (at least not reliably). If all of your clients don’t have IPv6 at all it probably doesn’t matter.

All clear, thank you both for the quick response. being able to hover over and verify that’s going on is welcome addition. I’m currently waiting for the F-droid repo to update to 1.18. It seems behind the play store.

1 Like

You can verify that 2 out of three are local discovery by turning off local discovery. After you have disabled local discovery in the settings it should switch to 1/1 (after a few seconds) to indicate that there’s only 1 discovery mechanism left (which is your own server).

For reference, here’s how it looks on my 1.18 machines:

Note the 4/4 on the right side.

(I’ve censored the addresses of my own discovery servers)

Since v1.18.0, it’s no longer hovering, but clicking on the counts that will show you all details.

1 Like

Oh, one last thing:

It is possible to use both the inbuild and custom discovery servers. You can simply put "default, <my custom servers here>" into Global Discovery Servers to achieve this.

I just love how configurable syncthing is. Almost anything is possible.

1 Like

Such a helpful community!