If you’re like me and are tired of relying on Google Drive or Dropbox for every tiny data transfer… and it’s probably the time to get your hands on the reins.
In this tutorial, I’ll guide you through the process of setting to set up Syncthing in an Ubuntu server, allowing you to connect files across all of your devices. There is there is no need for a third-party cloud and no data monitoring or subscriptions. All you need are your computers. Your files.
We’ll install Syncthing to transform it into an online service that operates 24/7, access its web-based dashboard and synchronize the directory between two different devices. Let’s get going.
What Is Syncthing and Why Use It?
Syncthing is an open-source, decentralized file synchronization tool. Think of it as your own private Dropbox or Resilio Sync… without the middleman.
What makes it cool?
- It runs on your devices, not the cloud.
- Syncs files in real time over LAN or Internet.
- You don’t need to upload your files to someone else’s server.
- It works on Linux, Windows, macOS, Android — even Raspberry Pi.
Basically: Your files stay in your control.
What You’ll Need to Follow This Guide
Here’s what you should have ready:
- ✅ A server or VPS running Ubuntu 22.04 or 24.04
- ✅ Root or sudo access
- ✅ A second device (your PC or laptop) to sync with
- ✅ UFW installed for basic firewall config (optional but smart)
- ✅ Basic comfort using terminal (don’t worry, I’ll walk you through everything)
Step 1: Install Syncthing on Ubuntu
Ubuntu doesn’t come with Syncthing in the default repos, so we’ll add the official Syncthing repository first.
Add the Syncthing APT Repo
sudo apt install curl gnupg -y
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt update
Now Install Syncthing
sudo apt install syncthing -y
Give it a sec. Once installed, try running it:
syncthing
You’ll see some output — it starts the web UI and tells you it’s serving on port 8384. That’s your control panel.
Hit Ctrl + C to stop it for now. We’ll make it run as a service in the background next.
Step 2: Set Up Syncthing as a Systemd Service
We don’t want to start it manually every time the server reboots. So let’s make Syncthing start automatically using systemd.
Also Read: How to Find Files with the fd Command in Linux
️ First, Find Your Username
This is important — run:
whoami
You’ll get your current username, e.g., ubuntu or sam. Use that in the steps below.
Create the Service File
sudo nano /etc/systemd/system/syncthing@.service
Paste this into the file:
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization
Documentation=man:syncthing(1)
After=network.target
[Service]
User=%i
ExecStart=/usr/bin/syncthing -no-browser -logflags=0
Restart=on-failure
SuccessExitStatus=3 4
[Install]
WantedBy=multi-user.target
Save and close with Ctrl+X, then Y, and hit Enter.
Enable and Start the Service
Replace yourusername with your actual user from earlier:
sudo systemctl enable syncthing@yourusername.service
sudo systemctl start syncthing@yourusername.service
Done! Syncthing is now running in the background — and will auto-start on reboot.
Step 3: Allow Syncthing in the Firewall (If UFW Is Enabled)
By default, Syncthing uses:
8384for the web UI22000TCP for sync21027UDP for local discovery
So if you’re using UFW, open those up:
sudo ufw allow 8384
sudo ufw allow 22000
sudo ufw allow 21027/udp
Not using UFW? You can skip this step.
Step 4: Access Syncthing Web Interface
Let’s make sure it’s actually working!
Open Syncthing in Your Browser
From your local PC, open:
http://your-server-ip:8384
You should see the Syncthing web UI. It’s basic but does the job.
First things to do:
- Set a GUI username and password (Settings → GUI)
- (Optional) Change the listening port to something else if 8384 is blocked
Once secured, you’re ready to start syncing.
Step 5: Connect a Second Device (Your Laptop or Another Server)
Syncthing works by pairing devices together. Both devices have to approve each other manually.
Install Syncthing on Your Desktop or Laptop
Use the same steps as above — or go to:
https://syncthing.net/downloads/
Install it for your platform.
Launch it. The web interface will be at localhost:8384.
Add Device
On your server, click “Add Remote Device”. Paste in the Device ID from your desktop/laptop.
Then go to your desktop/laptop and do the same thing — add the server’s ID.
✅ You should now see both devices connected.
Step 6: Create and Share a Folder
Okay — devices are connected. Let’s sync something.
On your desktop/laptop:
- Click “Add Folder”
- Pick a folder on your machine (e.g.,
/home/user/Projects) - Give it a folder ID (can be anything, like
projects) - Share it with your server device
- Save
Now on the server side, you’ll get a pop-up asking to accept the folder.
Accept it, choose a path (e.g., /home/youruser/Projects), and hit save.
That’s it. It’ll start syncing right away.
A Few Cool Syncing Tips
- Files sync in real-time — no need to “send” anything
- You can turn on versioning, so old versions are kept (very useful)
- Status indicators:
- “Up to Date” = all good
- “Syncing” = in progress
- “Out of Sync” = something’s off (check permissions!)
️ Step 7: Secure Your Syncthing Setup
Set Web UI Password
In Settings → GUI, set a login/password to protect the interface. Do this on both devices.
Optional: Reverse Proxy with Nginx
Want to serve Syncthing behind your domain with HTTPS? Use Nginx to reverse proxy port 8384.
This also helps if your ISP blocks certain ports.
Want help with this setup? Let me know — I’ll write a guide just for that.
Disable Global Discovery (Optional)
If you’re only syncing over LAN, turn off global discovery (Settings → Connections).
(Optional) Install Syncthing-GTK for Desktop Users
Don’t like using the web UI?
Install Syncthing-GTK:
sudo apt install syncthing-gtk
Or install via Flatpak/Snap. It adds a tray icon and makes things easier.
You can then manage Syncthing just like Dropbox or Nextcloud from your desktop.
Troubleshooting Tips
- Web UI not loading?
Make sure port 8384 is open. Check withsudo ufw status. - Not syncing?
Check if devices are connected. Both must be online and accepted. - Permissions errors?
Make sure both devices have write access to their folders. - View logs:
Run this to see what’s up:
journalctl -u syncthing@yourusername.service
✅ Final Thoughts: You Now Own Your File Sync!
Let’s recap:
- You installed Syncthing on Ubuntu.
- Set it up as a background service.
- Allowed traffic via firewall.
- Connected a second device.
- Started syncing folders like a pro.
- Secured it with passwords and optional proxy.
No cloud involved. No weird limits. No sending your stuff to a stranger’s server.
Just your own sync network. Private. Encrypted. Fast. Free.
What’s Next?
Here’s what you can do next:
- Set up multiple devices — home, laptop, backup server
- Add versioning to keep old file revisions
- Sync your phone using the Syncthing Android app
- Use cron + rsync + Syncthing to back up stuff automatically

