Skip to main content

What is Syncthing

Syncthing is an open-source, continuous file-synchronization tool. It replicates files across multiple devices in real time using a decentralized, peer-to-peer (P2P) architecture.

Learning Focus

Use this lesson to understand Syncthing's fundamental mental model: it relies on mutual trust between devices and synchronizes states continuously, rather than behaving like a top-down server-client tool.

Core Idea

There is no central server. Every device is an equal node that holds a complete, independent copy of the shared folder data.

Concept Overview

Syncthing replaces cloud services like Dropbox or Google Drive for data synchronization, but it operates entirely without a middleman.

  • A Node (or Device) is any computer running Syncthing (laptop, VPS, NAS, phone).
  • A Folder Pair is a directory shared between two or more nodes.
  • Continuous Sync means Syncthing monitors the filesystem (using things like inotify) and instantly replicates changes.

Syncthing Is Great For

ScenarioWhy Syncthing works
Multi-device continuous syncReal-time replication across laptops, workstations, and phones
Decentralized replicationNo dependency on third-party cloud capacity or downtime
Encrypted transferEnd-to-end TLS encryption over the wire
Air-gapped or offline networksSyncs over LAN even if the internet is down

Syncthing Is Not The Best For

ScenarioBetter tool
Point-in-time snapshot backupsrestic or borg
One-way large scale system migrationsrsync
Cloud object storage retrievalrclone

Why Teams Use Syncthing

NeedSyncthing capabilityPractical effect
Data PrivacyNo central cloud serverData never leaves your hardware or control
Real-time UpdatesEvent-driven replicationEdits on a laptop reflect on the NAS within seconds
Bandwidth EfficiencyBlock Exchange Protocol (BEP)Only modified blocks are sent, not entire files

Architecture at a Glance

Syncthing connects devices directly using TLS-encrypted connections.

flowchart LR
LAP["Laptop (Node A)"] <-->|TLS P2P| VPS["VPS (Node B)"]
LAP <-->|TLS P2P| DESK["Desktop (Node C)"]
VPS <-->|TLS P2P| DESK

Notice the mesh topology. If LAP goes out of network coverage, but connects locally to DESK, and DESK connects to VPS, updates will propagate.

Terminology You Must Know

TermMeaningExample
Device IDA unique cryptographic identifier for a node.K3X2R...
IndexA database maintained by each node tracking file states.The local database
DiscoveryHow nodes find each other on LAN/WAN.Local discovery, Global discovery
RelayA fallback server that passes encrypted traffic if nodes can't connect directly.Public relay pool
Global StateThe combined view of the most up-to-date files across all connected nodes.What Syncthing aims to achieve
Local StateThe current files actually present on the local disk.The current disk state

Hands-On Practice

If you have Syncthing installed, you can easily view your Device ID. Usually, it's visible right from the web GUI, but you can also run:

syncthing --device-id

Quick Reference

FeatureDetails
ProtocolBlock Exchange Protocol (BEP)
EncryptionTLS 1.2+ for all communication
TopologyDecentralized Mesh
Default GUI Port127.0.0.1:8384

What's Next