Deploy Syncthing on Ubuntu with Docker — a decentralized, end-to-end encrypted file sync tool that keeps your folders identical across all devices with no central server required.
Grab the automated bash script from GitHub to follow along with the video.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/files/syncthing/syncthing-ubuntu.sh
chmod +x syncthing-ubuntu.sh
sudo bash syncthing-ubuntu.sh
The script installs Docker and starts Syncthing. The web UI will be available on port 8384, and the sync protocol listens on port 22000 for peer connections.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/files/syncthing/syncthing-ubuntu.sh
chmod +x syncthing-ubuntu.sh
sudo bash syncthing-ubuntu.sh
Open your browser and navigate to the Syncthing dashboard:
http://<your-server-ip>:8384
Install Syncthing on the devices you want to sync with. Copy the Device ID from each device's web UI (Actions → Show ID). In your server's dashboard, click "Add Remote Device" and paste the Device ID. The remote device will receive a connection request — accept it to pair the devices.
Click "Add Folder" to share a directory from your server. Select which remote devices should receive this folder. On the remote device, accept the shared folder invitation. Syncthing will immediately begin syncing — changes on any device propagate automatically to all others in real time.
| Port | Purpose |
|---|---|
| 8384 | Syncthing Web UI |
| 22000 | Sync protocol (TCP/QUIC) — peer connections |
| 21027 | Local device discovery (UDP broadcast) |
Syncthing is a free, open-source, peer-to-peer file synchronization application. It continuously synchronizes files and folders between two or more devices in real time, without routing data through a central cloud server. All communication is encrypted using TLS and authenticated using unique device IDs. Syncthing works across Linux, Windows, macOS, and Android, making it the go-to tool for privacy-first file sync on your own infrastructure.
Unlike Dropbox, Google Drive, or Nextcloud, Syncthing routes data directly between devices — no third party ever stores or sees your files. It's extremely lightweight (runs on a Raspberry Pi), requires no account creation, and has no storage limits other than your own disk space. Once configured, it runs silently in the background and syncs everything automatically with no manual intervention.
Port 8384 (web UI) must only be accessible from trusted IPs — never expose it publicly. Port 22000 (TCP and QUIC/UDP) must be open for peer-to-peer sync connections. Port 21027 (UDP) handles local network device discovery. If devices are behind NAT, Syncthing uses relay servers automatically, but direct connections on 22000 are faster.
Resilio Sync is a proprietary P2P sync tool with a polished UI and mobile apps, but requires a license for advanced features. Nextcloud provides file sync plus a full cloud platform (calendar, contacts, apps) but requires more resources and a central server. rsync is a command-line tool for one-directional sync without real-time monitoring. Seafile is another self-hosted sync platform with a web interface and sharing features.
Don't use Syncthing when you need a centralized file share accessible to many users via a web browser — Nextcloud or Seafile are better. If you need versioning with point-in-time snapshots and incremental backups rather than real-time mirror sync, use Duplicati or Restic instead. Syncthing is also not ideal for syncing very large single files (multi-GB) over slow connections where rsync's differential transfers would be more efficient.
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
No. Syncthing is fully peer-to-peer (P2P). It syncs files directly between your devices without routing data through any central server. Relay servers are only used as a last resort when direct connection is not possible, and even then your data is end-to-end encrypted.
Yes. Syncthing uses TLS for all communication and strong end-to-end encryption. Devices are authenticated using unique device IDs — no username or password is sent over the network. The web UI runs on localhost by default and should not be exposed to the internet without authentication.
Syncthing is purely a sync tool — it keeps folders identical across devices in real time with no web file manager. Nextcloud is a full cloud platform with file sharing, calendar, contacts, and 200+ apps but requires more resources. If you only need reliable, fast, private file sync between machines, Syncthing is simpler and lighter.
Syncthing queues changes and syncs them as soon as the device comes back online. It tracks which files need to be transferred and will resume interrupted transfers. No data is lost during disconnections — the sync resumes exactly where it left off.
Yes. The official Syncthing Android app (Syncthing-Fork) is available on F-Droid and Google Play. For iOS, third-party apps like Möbius Sync provide Syncthing integration. Desktop clients are available for Windows, macOS, and Linux.
There is no limit on the number of devices. You can sync the same folder across dozens of devices simultaneously. Large deployments use one or two always-on server nodes as relay points to ensure changes propagate even when devices are rarely online at the same time.
Yes. Syncthing can keep deleted or overwritten file versions in a .stversions folder. You can configure simple, staggered, or external versioning. When two devices edit the same file simultaneously, Syncthing creates a conflict copy named with the device ID and timestamp, so no data is lost.
Yes, this is one of the most common use cases. Run Syncthing on your Ubuntu server (using this script) and install the desktop Syncthing client on your laptop. Share a folder between them — changes on either side sync automatically whenever both devices are online and reachable.