Syncthing synchronises folders directly between your devices — laptop, desktop, phone — with end-to-end encryption and no central cloud. Its one weakness: devices only sync while they’re online at the same time. Adding a VPS as an always-on node fixes that: every device syncs with the server whenever it’s online, and the server passes changes on.

1. Install

Syncthing’s official apt repository provides current releases:

sudo mkdir -p /etc/apt/keyrings
sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt update
sudo apt install syncthing

(Debian and Ubuntu also package Syncthing, typically an older version. Check syncthing.net for current repository instructions.)

2. Run it as a dedicated user

sudo adduser --disabled-password --gecos "" syncthing
sudo systemctl enable --now syncthing@syncthing
systemctl status syncthing@syncthing --no-pager

The syncthing@<user> systemd unit runs Syncthing as that user; synced data lives in their home directory by default (/home/syncthing/). Put data on a larger disk by choosing folder paths there.

3. Reach the web GUI securely

The GUI listens on 127.0.0.1:8384 — not exposed. Use an SSH tunnel:

ssh -L 8384:127.0.0.1:8384 user@your-server

Open http://localhost:8384. Immediately go to Actions → Settings → GUI and set a username and password. Keep the listen address on 127.0.0.1; there’s rarely a reason to expose the GUI publicly.

4. Open the sync port

Devices connect to each other on TCP/UDP 22000. Allow it so your devices can connect directly to the VPS:

sudo ufw allow 22000/tcp
sudo ufw allow 22000/udp

Without it, connections may still work via relays — but slower.

5. Connect your devices

  1. On the VPS GUI: Actions → Show ID — copy the device ID.
  2. On your laptop: Add Remote Device, paste the ID. Optionally set the address to tcp://your-server-ip:22000 for a direct connection.
  3. Accept the device on the VPS.
  4. Share a folder from the laptop with the VPS device; accept it on the VPS and choose the path (e.g. /srv/sync/Documents).
  5. Add your other devices and share the same folder with the VPS.

Each device now syncs with the VPS whenever it’s online.

Untrusted (encrypted) mode

If you don’t want the VPS to see your files in plain text, share the folder to the VPS as Untrusted (Encrypted) by setting an encryption password for that device. The VPS stores only encrypted data and still relays changes between your devices. You can’t browse the files on the server, which is exactly the point.

6. Versioning: protection against mistakes

Syncthing syncs deletions too — delete a file on your laptop and it disappears everywhere. Enable File Versioning on the VPS’s copy of each folder:

  • Staggered — keeps versions with decreasing frequency (hourly, daily, weekly), up to a maximum age.
  • Simple — keeps the last N versions.
  • Trash Can — keeps deleted/replaced files for N days.

Old versions are kept in .stversions inside the folder.

7. Syncthing is not a backup

Sync faithfully replicates corruption, ransomware encryption and accidental deletions. Versioning helps, but take real backups of the VPS’s sync folders too — snapshots with history, ideally offsite: see restic or BorgBackup.

8. Ignoring files

Create .stignore in a shared folder:

node_modules
*.tmp
.DS_Store
(?d)Thumbs.db

Useful settings for a server node

  • Settings → Connections: disable Local Discovery (no LAN on a VPS).
  • Set the Global Discovery and Relaying options to your preference; with a reachable port 22000 you rarely need relays.
  • Folder → Advanced → Ignore Permissions for folders shared with Windows devices.
  • Increase the inotify watch limit for large trees:
echo "fs.inotify.max_user_watches=204800" | sudo tee /etc/sysctl.d/90-syncthing.conf
sudo sysctl --system

Updating

Packages from the Syncthing repository update with apt upgrade. Syncthing may also offer automatic upgrades in its settings when installed from upstream binaries.

Syncthing vs Nextcloud vs Seafile

  • Syncthing — peer-to-peer sync, no accounts or web file manager; minimal and private.
  • Nextcloud — sync plus web access, sharing links, calendars and an app ecosystem.
  • Seafile — fast file sync with a web UI, lighter than Nextcloud.

A small VPS with enough disk is all Syncthing needs — our Storage VPS works well as an always-on node.

  • Syncthing
  • File Sync
  • Self-Hosting