Skip to main content

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

ModuleFocusLessons
1. IntroductionCore concepts and mental model4
2. Installation and SetupGet Syncthing running on any platform3
3. Devices and FoldersPairing devices and sharing folder pairs3
4. Conflict ResolutionUnderstanding and preventing sync conflicts3
5. Ignore Rules and Selective SyncFine-grained control over synced content3
6. Security and Access ControlTLS, device IDs, and GUI hardening3
7. Networking and DiscoveryRelays, discovery servers, and firewall config3
8. Automation and OperationsSystemd, logging, health checks, and alerts3
9. Advanced PatternsMulti-node, versioning, and folder types4
10. TroubleshootingRoot-cause debugging workflows3
11. CheatsheetFast operational reference3

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 CaseBest ToolWhy
Continuous real-time sync across devicessyncthingP2P, encrypted, no third-party cloud
One-time or scheduled delta copiesrsyncBlock-level SSH transfer, scriptable
Encrypted snapshot historyresticDeduplication, retention policies
Cloud-provider replicationrclone70+ 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.