PiecewiseHow a peer to peer transfer actually works

Syncthing: continuous sync with no server in the middle

Syncthing

Two devices that keep each other up to date.

Syncthing is a peer to peer program that keeps one folder identical across two or more devices you control, by connecting those devices straight to each other instead of through a company's server. It is peer to peer in the strict sense: the machines running it are the only ones that ever hold the files, there is no account to create, and no operator sits in the path with a copy. Syncthing is open source, and the project publishes its own builds for Windows, macOS, Linux and BSD. On Android the situation has changed over time, and which build is current is the one detail worth confirming at the project rather than assuming.

What Syncthing keeps in sync, and what it never does

Syncthing keeps folders in sync, not accounts, and its unit is a directory you nominate on each device. You share that folder with a named device, the other side accepts, and from then on any change on either side appears on the other: a new file, an edit, a rename, a deletion. Changes are caught by watching the filesystem and by periodic rescans, so a machine switched off catches up when it returns. Files are split into hashed blocks, so only the changed part of a large file crosses the network, and the receiver verifies every block before writing it.

Syncthing does not search, index, or advertise anything, and there is no way to look for a file somebody else holds, because there is nobody else: the network is only the devices you added. That is the sharpest break from the older peer to peer programs. Napster, and later eMule and eDonkey, existed so a stranger could find a file on your disk. Syncthing exists to stop your own two disks from disagreeing.

How two devices find each other and decide to trust each other

Two devices trust each other because each knows the other's device ID, and nothing else grants entry. The device ID is a long string of letters and digits derived from the certificate Syncthing generates on first run, the public half of a key pair with a readable spelling. You add a device by pasting its ID, the far side confirms, and only then do the two exchange anything. All traffic runs over TLS with both ends authenticated, which is why the connection carries no password.

Finding each other is a separate problem from trusting each other, and Syncthing solves it three ways at once.

Local discovery
Each device announces itself with small broadcast messages on UDP port 21027, so two machines on the same home network find each other in seconds without outside help.
Global discovery
Devices register their current address with discovery servers run by the project, which map a device ID to an address and hold nothing about your folders.
Relaying
Traffic is bounced through a volunteer relay when both devices sit behind network address translation neither can traverse. A relay carries encrypted bytes it cannot read and is slower than a direct connection, which is why relayed sync feels like a firewalled transfer.

An introducer is an optional fourth mechanism: a device trusted to introduce others, so adding one central machine to a new laptop pulls in the rest automatically.

The ports it uses and the screen you drive it from

The ports matter because Syncthing is driven through a browser even though it is not a web service. By default the interface listens on port 8384 on the loopback address of its own machine, so nothing else on the network reaches it unless you change that deliberately. Sync traffic uses port 22000 on both TCP and QUIC over UDP, and forwarding it improves connectability exactly as forwarding a torrent client's port does. Skipping that usually means falling back to a relay rather than failing outright.

Setting a user name and password on that interface is the first job on any machine others can reach, and it is essential on a headless install where the interface is bound to a real address. Running Syncthing as a service on an always on machine raises the same questions as torrent clients on a server: a daemon, a web interface, and a login in front of it.

Is Syncthing safe, and what the risks actually are

Yes, Syncthing is safe in the sense people mean: connections are encrypted end to end, devices authenticate each other by key, no third party holds your files, and the code is open to inspection. Take builds from the project itself or from your distribution's packages, because in practice the safety of an open source program is a question of where the binary came from.

The real risks are about trust rather than interception.

  • Deletions propagate, so removing a file on one device removes it everywhere, and file versioning has to be enabled per folder to make that recoverable.
  • Conflicts occur when a file changes in two places while the devices are apart, and Syncthing keeps both copies under a conflict name rather than choosing for you.
  • Devices are trusted completely once added, so a shared folder is writable by whoever holds that device unless it is set to send only or receive only.
  • Loss of a device is loss of a key, and the remedy is removing that ID from the others rather than changing a password.
  • Synchronization is not backup, because a mistake replicates as faithfully as a change.

Syncthing against Resilio Sync and against Nextcloud

Syncthing sits between the two alternatives it is usually compared with, and the difference is structural rather than a matter of features.

PropertySyncthingResilio SyncNextcloud
ShapePeer to peerPeer to peerClient and server
Server requiredNoneNoneYes, self hosted or hosted
SourceOpen sourceClosed source, commercialOpen source
Access granted byDevice ID, confirmed both sidesA shared key or linkAn account on the server
Web access to filesNoNoYes, that is the point
Sharing with othersAwkward by designBy linkCentral, with permissions

Nextcloud answers the case where several people need one place with accounts, permissions and a browser view. Syncthing answers the case where files should stay on your own machines and simply agree. The choice is about who else is involved, not about which program is better.

What Syncthing is not

Syncthing is not a torrent client and fetches nothing from the wider internet, which is worth stating plainly because the two get confused. A torrent client such as qBittorrent joins a swarm of strangers to fetch a file described by an info hash. Syncthing joins nothing: it talks to the devices you named, moving files you already have, with no search and no concept of a public file. The Glossary sets out the terms the two share, including hashes, blocks and relays.

Where to go next