← Self-Hosting · Files & Photos · Replaces: Dropbox-style folder sync, Resilio
What You'll Build
Syncthing keeps folders identical across your devices — laptop, desktop, phone, and server — directly between them, encrypted, with no cloud account. Unlike Nextcloud, there's no web app to manage: just folders that stay in sync. Having the server in the group means there's always an online copy.
Ports: 8384 (web UI), 22000 TCP/UDP (sync), 21027 UDP (discovery) · Time: 30 minutes · Difficulty: Easy
What You Need
- Your home server from Foundations 1 (Docker installed,
~/stacksfolder). - Nginx Proxy Manager with your
*.home.example.comcertificate (recommended). - Syncthing installed on your other devices too (see Step 3).
Step 1: Start Syncthing on the Server
mkdir -p ~/stacks/syncthing/data && cd ~/stacks/syncthing
nano compose.yaml
services:
syncthing:
image: syncthing/syncthing:latest
container_name: syncthing
hostname: homeserver-sync # the name other devices will see
restart: unless-stopped
network_mode: host # recommended: needed for fast LAN discovery
environment:
PUID: 1000
PGID: 1000
volumes:
- ./data:/var/syncthing # config + default "Sync" folder
docker compose up -d
# Host networking means the server's firewall applies — open Syncthing's ports
sudo ufw allow 8384/tcp
sudo ufw allow 22000
sudo ufw allow 21027/udp
Step 2: Secure the Web UI
- Open
http://192.168.1.50:8384. A red banner warns that no password is set. - Actions → Settings → GUI: set a username and password. Tick Use HTTPS for GUI → Save.
- Note the server's Device ID: Actions → Show ID.
Step 3: Connect Your Other Devices
| Device | Install |
|---|---|
| Linux | sudo apt install syncthing, then systemctl --user enable --now syncthing; open http://127.0.0.1:8384 |
| Windows / macOS | SyncTrayzor (Windows) or Syncthing for macOS |
| Android | Syncthing-Fork (from F-Droid or Google Play) — the original Android app has been discontinued |
| iPhone | Möbius Sync (third-party) |
- On the laptop: + Add Remote Device → paste the server's Device ID (or scan its QR code on the phone) → Save.
- The server's web UI shows "New device wants to connect" → Add device.
Step 4: Share a Folder
- On the laptop: + Add Folder → label "Documents", choose the path → Sharing tab → tick the server → Save.
- Accept on the server and choose where it's stored (e.g.
/var/syncthing/Documents). - Pick a folder type per device:
- Send & Receive — normal two-way sync.
- Send Only — e.g. the phone's camera folder: changes flow out, never in.
- Receive Only — e.g. the server keeps a copy but never changes it.
- On the server's copy, Edit → File Versioning → Staggered, so deleted or overwritten files are kept for a while.
Sync is not backup. If you delete a file on one device, Syncthing deletes it everywhere (apart from file versioning). Keep your restic backups running on the server.
Troubleshooting
- Devices say "Disconnected" — check the UFW rules from Step 1. Devices on different networks connect through relays automatically (slower, but it works).
- Folder stuck "Out of Sync" — usually permissions. The container runs as UID 1000; make sure it can write to the folder.
- Conflicts (
.sync-conflict-files) — the same file was edited on two devices before they synced. Keep the right version, delete the other.