Syncthing Documentation
Syncthing is an open-source, decentralized continuous file-synchronization program. It syncs files between devices in real time without relying on any central server or cloud provider.
Who This Track Is For
- Sysadmins managing live file sync across multiple VPS nodes or offices
- Developers who need private, real-time data replication without third-party services
- Power users replacing Dropbox/Google Drive with a self-hosted, encrypted peer-to-peer sync mesh
What You Will Build
- A secure device mesh that syncs files continuously and privately
- Conflict-safe folder pairs with proper ignore rules and version history
- Automated, monitored Syncthing services via systemd
- A resilient multi-node architecture with relays and discovery
How To Use This Track
Follow modules 1 to 11 in order. Each lesson builds on the last. Run every example in a safe lab environment before applying to production peers.
Learning Path
| Module | Focus | Lessons |
|---|---|---|
| 1. Introduction | Core concepts and mental model | 4 |
| 2. Installation and Setup | Get Syncthing running on any platform | 3 |
| 3. Devices and Folders | Pairing devices and sharing folder pairs | 3 |
| 4. Conflict Resolution | Understanding and preventing sync conflicts | 3 |
| 5. Ignore Rules and Selective Sync | Fine-grained control over synced content | 3 |
| 6. Security and Access Control | TLS, device IDs, and GUI hardening | 3 |
| 7. Networking and Discovery | Relays, discovery servers, and firewall config | 3 |
| 8. Automation and Operations | Systemd, logging, health checks, and alerts | 3 |
| 9. Advanced Patterns | Multi-node, versioning, and folder types | 4 |
| 10. Troubleshooting | Root-cause debugging workflows | 3 |
| 11. Cheatsheet | Fast operational reference | 3 |
Core Architecture
1) Two-Device Sync
flowchart LR
DEV1[Device A\n/home/user/docs] <-->|TLS encrypted P2P| DEV2[Device B\n/home/user/docs]
2) Multi-Node Mesh
flowchart LR
VPS1[VPS Node 1] <-->|sync| VPS2[VPS Node 2]
VPS1 <-->|sync| LAP[Laptop]
VPS2 <-->|sync| LAP
3) Hub-and-Spoke with Relay
flowchart LR
EDGE1[Edge Device] -->|relay| RELAY[Syncthing Relay]
EDGE2[Edge Device] -->|relay| RELAY
RELAY -->|forward| SERVER[Always-On Server]
warning
Syncthing is a sync tool, not a backup tool. If a file is deleted on one device, it will be deleted everywhere. Combine with versioning or restic for data protection.
Quick Start
syncthing-first-run.sh
# 1) Install Syncthing
sudo apt install syncthing # Debian/Ubuntu
# or
sudo dnf install syncthing # RHEL/Fedora
# 2) Start (user session)
syncthing
# 3) Open Web UI (default)
# http://127.0.0.1:8384
# 4) Add a remote device using its Device ID
# Actions → Show ID (copy your ID)
# On remote peer → Add Device → paste ID
# 5) Share a folder
# Add Folder → pick path → Share With → select peer
note
Always access the GUI over an SSH tunnel (ssh -L 8384:localhost:8384 user@server) when Syncthing is on a remote VPS. Never expose port 8384 directly to the internet without authentication.
Tooling Matrix
| Use Case | Best Tool | Why |
|---|---|---|
| Continuous real-time sync across devices | syncthing | P2P, encrypted, no third-party cloud |
| One-time or scheduled delta copies | rsync | Block-level SSH transfer, scriptable |
| Encrypted snapshot history | restic | Deduplication, retention policies |
| Cloud-provider replication | rclone | 70+ backend support |
Prerequisites
- Linux shell basics (
ls,systemctl, permissions) - SSH access to any remote nodes you want to pair
- Firewall knowledge (ports 8384, 22000, 21027)
Success Criteria
By the end of this track, you can:
- Deploy Syncthing on two or more Linux nodes and confirm bidirectional sync
- Configure ignore rules to exclude temp files, caches, and secrets
- Harden the GUI and restrict device access with allowlists
- Automate Syncthing via systemd and confirm it restarts on failure
- Handle and prevent sync conflicts in a multi-editor environment
- Combine Syncthing with restic for true backup-plus-sync architecture
Next Step
Start with What is Syncthing.