Syncthing: Peer-to-Peer File Sync Without a Central Server
Dropbox and Google Drive sync your files via a central cloud server. Syncthing syncs files directly between your devices — no cloud, no subscription, no data leaving your network unless you want it to.
Photo by GuerrillaBuzz on Unsplash
It's one of the most useful pieces of software for a homelab: set it up once and it silently keeps files synchronized between your server, laptop, phone, and NAS.
What Syncthing Does
Syncthing is a continuous file synchronization program that:
- Syncs folders between devices in real-time or on schedule
- Works peer-to-peer — devices sync directly with each other
- Encrypts all transfers — TLS with device-specific certificates
- Handles conflict resolution — preserves both versions when conflicts occur
- Supports versioning — keeps previous file versions (configurable)
- Runs cross-platform — Linux, Windows, macOS, Android (no iOS due to Apple restrictions, but iOS has Möbius Sync as a paid option)
- Works behind NAT — devices find each other via relay servers or local discovery
No account required, no subscription, no servers you don't control.
Common Homelab Use Cases
Photo backup from phone: Sync your phone's camera folder to your homelab NAS. Your photos are backed up the moment your phone is on the same WiFi.
Laptop → NAS sync: Keep important documents, projects, and work files synced to your server without manual copies.
Configuration backup: Sync /etc, .config, and other important config directories from your homelab to a separate backup machine.
Multi-device development: Sync a project folder across your desktop and laptop automatically.
Family file sharing: Sync shared family documents, photos, and media between family members' devices without a cloud service.
Architecture: How Syncthing Finds Your Devices
Syncthing uses multiple discovery mechanisms:
- Local network discovery: Devices on the same network find each other via UDP broadcast
- Global discovery server: Syncthing's servers help devices find each other when on different networks (no data passes through these — they only relay IP addresses)
- Relay servers: For networks with restrictive firewalls, Syncthing can relay data through community-run servers (data is still encrypted end-to-end)
- Direct address: Manually specify the address of a device
For homelab use where devices are on your local network or behind your VPN, devices find each other automatically with zero configuration.
Like what you're reading? Subscribe to HomeLab Starter — free weekly guides in your inbox.
Installing Syncthing
Ubuntu/Debian:
# Add Syncthing signing key and repository
curl -fsSL https://syncthing.net/release-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/syncthing.gpg
echo "deb [signed-by=/etc/apt/keyrings/syncthing.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt update && sudo apt install syncthing
As a Docker container (for easy homelab deployment):
services:
syncthing:
image: syncthing/syncthing
container_name: syncthing
hostname: my-homelab
volumes:
- /path/to/syncthing/config:/var/syncthing
- /mnt/data:/mnt/data # Your data directory
ports:
- "8384:8384" # Web UI
- "22000:22000/tcp" # Sync protocol TCP
- "22000:22000/udp" # Sync protocol QUIC
- "21027:21027/udp" # Local discovery
restart: unless-stopped
environment:
PUID: "1000"
PGID: "1000"
Access the web UI at http://your-server:8384.
Android: Install the official Syncthing app from F-Droid or Google Play.
Initial Setup and Pairing Devices
Each Syncthing installation has a unique Device ID (a long hash like MFZWI3D-BNCNE7A-...).
To pair two devices:
- On Device A: go to the web UI → Add Remote Device → enter Device B's ID
- On Device B: accept the connection request (or configure it automatically)
- Both devices now know about each other
To share a folder:
- On Device A: Add a folder → select the local path → check "Share with" → select Device B
- On Device B: Accept the folder share request → choose where to sync it
After this, files placed in the shared folder on either device will sync to the other.
Sync Modes
Syncthing offers several sync modes:
Send & Receive (default): Both devices can add/modify/delete. Changes sync bidirectionally.
Send Only: This device sends files to others but ignores changes from them. Use for a "source of truth" device (like a phone camera roll — you don't want remote deletions to delete your phone photos).
Receive Only: This device receives files from others but doesn't send local changes. Use for a backup destination.
Receive Encrypted: Stores encrypted versions of files — useful for syncing to an untrusted server without that server seeing your files.
File Versioning
Syncthing can keep previous versions of files before overwriting them:
Trash Can: Keeps deleted files in a .stversions folder.
Simple Versioning: Keeps N versions of changed files.
Staggered: Keeps more versions of recent changes, fewer of old changes.
External: Runs a script of your choice when files change.
For important documents, enable staggered versioning. For large media files, keep versioning minimal or disabled.
Conflict Handling
When the same file is modified on two devices before they can sync:
- Syncthing keeps both versions
- One becomes
filename.sync-conflict-YYYYMMDD-HHMMSS-DEVICEID.ext - Both versions are preserved for you to review
This is the correct behavior — Syncthing never silently loses data.
Security Considerations
Syncthing is secure by default:
- All transfers are TLS encrypted with device-specific certificates
- Devices are authenticated by their unique Device ID — connecting to the wrong device is cryptographically prevented
- No data passes through Syncthing's servers (except device discovery, which is just IP addresses)
For the web UI, secure it:
- Enable GUI authentication (username + password) in the settings
- Set the GUI listen address to
127.0.0.1:8384to block remote access — use a reverse proxy with auth if you need remote access
Performance Tuning
For large initial syncs (100GB+):
- Run the initial sync over a wired connection
- Increase
maxConcurrentWritersif you have fast storage - The initial scan can take time for large libraries — subsequent syncs are fast (only changed files)
For mobile devices: configure Syncthing to sync only on WiFi and only when charging to avoid battery drain and cellular data usage.
Syncthing vs. Restic/rsync for Backups
These serve different purposes:
Syncthing: Continuous sync between devices you control. Good for keeping active files in sync. NOT a true backup — if you delete a file on one device, it deletes everywhere.
Restic/rsync: One-way backup with snapshots. Protects against accidental deletion. Doesn't provide live sync.
Use both: Syncthing for convenience (instant access on all devices), Restic for true backup protection (point-in-time snapshots to an external target).
Getting Started
Syncthing has excellent documentation at docs.syncthing.net. The community forum at forum.syncthing.net is helpful for troubleshooting.
The typical setup: install on your homelab server and your laptop, share a Documents folder, and immediately have all your important files available on both machines without ever thinking about it again.
