Sync Your Files with Syncthing on Ubuntu 20.04
If you’ve ever had to copy a big project folder from your laptop to a spare desktop and then keep both copies up‑to‑date, this is for you. Syncthing turns two or more machines into a private cloud without the fuss of Dropbox or Google Drive.
Why Syncthing Beats the Cloud on Your Own Network
- No central server – data stays on your devices.
- Cross‑platform – works on Windows, macOS, and Linux side by side.
- Secure out of the box – everything is end‑to‑end encrypted.
1. Install Syncthing
# Add the official repository key curl -s https://syncthing.net/release-key.txt | sudo apt-key add - # Tell APT where to look echo "deb http://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list sudo apt update sudo apt install syncthing
The repository guarantees you’re getting the latest stable build, not an old snapshot that might miss critical security fixes.
2. Start Syncthing and Open the Web UI
syncthing &
Open http://localhost:8384 in a browser (the first time it will ask if you want to allow access from other machines). The UI is your command center.
Why we use the background launch: On a server or headless box, you’ll want Syncthing running as a service. You can set that up later with systemd.
3. Add a Folder to Sync
1. In the UI click Add folder.
2. Pick a real folder on disk – e.g., /home/you/projects.
3. Give it a convenient label like Projects.
4. Keep Folder ID at its default; you’ll need this later if you ever have to re‑add the same folder elsewhere.
Click Save. Syncthing immediately starts scanning for changes.
4. Share the Folder with Another Machine
On the second Ubuntu machine
1. Run syncthing & as above.
2. In the UI, click Add remote device (or share your Device ID from the first machine and paste it here).
3. Accept the connection request.
Back on the original machine:
1. Click the folder you just added.
2. Under Sharing, check the box next to the new device’s name.
3. Click Save again.
Syncthing will now negotiate a handshake, verify keys, and start syncing files instantly.
5. Verify It Works
- Drop a new file into /home/you/projects on machine A.
- Open the same folder on machine B; you’ll see it appear after a few seconds.
- Edit that file on B – A gets the updated version automatically.
If something goes wrong, the UI shows detailed logs. I’ve seen “failed to decrypt” errors when two devices are running wildly different Syncthing versions; just update both and try again.
6. Keep Syncing in the Background
To run Syncthing as a service so it starts on boot:
sudo systemctl enable syncthing@$(whoami).service sudo systemctl start syncthing@$(whoami).service
Why this is handy: If you’re running a NAS or a dedicated backup box, you don’t want to manually launch Syncthing every time.
7. Optional Tweaks for Heavy Traffic
- Compression: In the folder settings enable “Use compression” if you’re syncing media files that compress well.
- Bandwidth limits: Under Settings => Advanced => Rate limiting, set per‑device or global caps to avoid hogging your home internet.
- Ignore patterns: Use .syncthingignore in a folder to exclude temp files or caches.
Quick Checklist
| Step | What you get |
|---|---|
| Install | Latest Syncthing package |
| Start | Web UI on port 8384 |
| Add folder | Local sync target |
| Share device | Peer‑to‑peer link |
| Verify | File appears everywhere instantly |
| Service | Auto‑start at boot |