I use syncthing since 1 month, and I’m looking for a good parameters to my own syncthing network
I have one syncthing “server” which get all datas to backup it and they are 4 network options (NAT, global and local discovery, and relaying) and I would to configure correctly my clients, with only clients settings, without enabled all network options, but I don’t find the good settings.
For informations, I want to sync only when I’m at my home for my phone and from everywhere with my laptop.
Do you have a informations, more than the syncthing doc website, about this options ?
This my understanding :
- NAT : only if you want device, on the internet network, wants to sync with you.
- global discovery : enabled to add device from internet to sync with you, without to manually add on your conf.
- local discovery : enabled to add device from LAN to sync with you, without to manually add on your conf.
- Relaying enabled : To become a relay ?
Thank you !
For syncthing to work, syncthing needs to learn IP addresses (and ports) of devices in the cluster.
There are two vastly different modes to get these IP addresses:
Configuring static IP adresses manually. If your IP adresses never change, you can configure them as static in syncthing. If all devices connect to each other using static addressing, this eliminates the need for any discovery option. However this requires some advanced understanding of IP networks and is generally not the desired option for most users, as it get’s heavy to manage on larger clusters. That’s why another mode exists:
Instead, IP adresses can be discovered automatically. Syncthing has two ways to do this:
Local discovery. This means that syncthing sends small data packets inside your local network (LAN) to discover other computers. If two devices are on the same LAN, they usually find each other and can connect. With Local Discovery disabled in the GUI, no announcement packets are send into the LAN.
Global discovery. Global discovery is a server in the public internet, hosted by syncthing. Any device with global discovery enabled announces itself there and the discovery server memorizes some data about the device (e.g IP address). Any client who wants to connect to some other device asks the discovery server how it can connect to this device. The discovery server then gossips some data neccessary to establish a connection. With Global Discovery disabled in the GUI, the discovery server cannot help in establishing a connection.
If a direct connection between two devices cannot be established - for example, because they’re both behind firewalls that block incoming connections - syncthing also has a fallback mode, which is relaying.
With relaying, two syncthing instances connect to each other via a third party (the relay). Connecting over a relay is secure, but possibly slow and thus it is only used as a fallback. Relays are separate applications hosted by volunteers all over the world. The Enable Relaying option in the GUI controls whether connecting over relays may be attempted, if all else fails. Enable Relaying does not mean that you become a relay.
Enable NAT traversal in the GUI controls various settings related to connect through a NAT. NAT stands for Network Address Translation and is very commonly used on IPv4 networks (it basically ‘maps’ multiple private internal addresses to a single public address on a router). Establishing a connection through a NAT is difficult and requires some techniques like automatic port forwarding (UPnP) or NAT hole-punching. The GUI option controls whether these features should be used, if available. If disabled, connecting through a NAT may get a lot more difficult.
Generally, having all settings on means to have the highest probability of establishing a connection. Depending on your setup, you may not need all of the above, but that highly depends on your specific network setup (for example, is the server behind a NAT or not?)
Oh, and Merry Christmas!
Waahhooo ! Thanks a lot for all informations. I understand better now.
Merry Christmas too and long life to syncthing
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.