Syncthing is not a backup.
I'm starting there because it's the sentence everyone reads, nods at, and forgets. Then one Tuesday evening, someone deletes a folder on their laptop to "free up some space", Syncthing does exactly what it was told, and three machines empty themselves at the same time. Cleanly. No errors. With a little green "Up to Date" checkmark at the end.
Syncthing is a great tool. It syncs folders between your devices, live, without going through anybody's server. No subscription, no quota, no "we've updated our terms of service". But it's a tool that obeys. And a tool that obeys is a tool you have to know how to talk to.
This article covers what you need to understand to use it without shooting yourself in the foot: how it really works, how to install it properly, and above all the classic mistakes, the ones that come up over and over on the forums.
What actually happens under the hood
Before clicking around, two minutes of mechanics. It prevents 80% of the nasty surprises.
Every device has a cryptographic identity. On first launch, Syncthing generates a certificate. Your "Device ID", the long string of letters like MFZWI3D-BONSGYC-..., is the SHA-256 fingerprint of that certificate. Two devices only talk to each other if they have accepted each other. No account, no password: the key is the identity.
Everything goes over TLS. The protocol is called BEP (Block Exchange Protocol). Traffic is end-to-end encrypted between your machines, even when it goes through a relay.
Files are split into blocks. Syncthing hashes every file in blocks (from 128 KiB to 16 MiB depending on file size). If you change 3 lines in a 2 GB file, it only sends the blocks that changed. And if an identical block already exists somewhere on the destination machine, it reuses it instead of downloading it again.
Finding the other device is a separate problem. There are three mechanisms:
- local discovery: a small broadcast on your network (UDP 21027), so machines in the same house can find each other;
- global discovery: public announcement servers that say "device X can be reached at this address", without ever seeing your files;
- relays: when no direct connection is possible (double NAT, 4G, school network), the encrypted traffic goes through a public relay. It works, but it's slow.
The ports to remember:
22000/tcp sync (TCP)
22000/udp sync (QUIC)
21027/udp local discovery
8384/tcp web interface (must stay local!)
The engineer's reflex: if your sync crawls along at 200 KB/s, look at the remote devices tab first. If you see "relay://" in the connection address, you're not connected directly. Open port 22000 on your router (TCP and UDP) to the machine that stays on, and the speed changes completely.
Installing it properly (10 minutes flat)
On Linux (Debian, Ubuntu), use the official repository rather than the often outdated version from your distribution:
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-v2" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt update && sudo apt install syncthing
Then run it as a user service, so it starts on its own and runs with your permissions (not root's):
systemctl --user enable --now syncthing.service
loginctl enable-linger $USER # so it keeps running with no session open (server)
On Windows, the official binary works fine, but it has no taskbar icon. The most comfortable option is Syncthing Tray, actively maintained and compatible with version 2. Be wary of old tutorials recommending the old SyncTrayzor: the original didn't keep up with the move to v2 (more on that below).
On Android, the official app was discontinued at the end of 2024, mainly because of Play Store publishing rules. Syncthing-Fork took over, available on F-Droid and GitHub. If you come across the old official app somewhere, don't install it: it no longer gets updates.
On iOS, Apple doesn't let apps run in the background like that. The paid option that works is called Möbius Sync, with the limits that implies: syncing only happens when the app is open, or when iOS feels like it.
Once installed, the web interface is at http://127.0.0.1:8384. Add the other device with its Device ID, share a folder, accept on the other side. That's it. The rest of the article is where it gets interesting.
The four folder types (and why they matter)
When you share a folder, Syncthing asks for its type. Most people leave the default. Bad idea, because this setting is your first line of defense.
- Send & Receive: the default. Every change, wherever it comes from, is propagated everywhere. Deletions included.
- Send Only: this device is the authority. It sends its changes but ignores what the others modify. Perfect for a "source" machine (your main PC, for example).
- Receive Only: the device receives, but its local changes go nowhere. Ideal for a backup server or a NAS. If someone modifies a file on it by mistake, a "Revert Local Changes" button appears.
- Receive Encrypted: the little-known gem. The device stores your files encrypted, without ever having the key. So you can use a €3 VPS or a friend's PC as an always-on relay, without them being able to read anything. You just need to set a folder password on the trusted devices.
The setup I recommend: your personal devices in "Send & Receive", an always-on server (Raspberry Pi, NAS, old PC) in "Receive Only" with versioning enabled, and possibly a VPS in "Receive Encrypted". You get smooth syncing, a central point that keeps history, and an off-site copy the host can't read.
The mistakes that hurt (and how to avoid them)
Mistake #1: believing versioning protects you from everything
Syncthing offers file versioning: Trash Can, Simple, Staggered or External. Lots of people enable it and think "great, I have history".
Except there's a detail almost nobody reads: versioning only keeps versions that were replaced or deleted by another device. If you delete a file on your laptop, your laptop is the source of the change: it keeps nothing. It's the other devices, the ones receiving the deletion, that set the old version aside (if they have versioning enabled).
In practice: enable versioning on the receiving machines, starting with your always-on server. "Staggered" mode is the best compromise: one version per hour for the first day, one per day for the first month, one per week after that.
And above all: keep a real backup on the side. A copy that isn't synced live, ideally outside your home. The 3-2-1 rule (three copies, two media, one off-site) wasn't invented to look pretty. Ransomware that encrypts your folder on your PC will be propagated everywhere by Syncthing with terrifying efficiency.
Mistake #2: exposing the web interface to the network
To manage a Raspberry Pi from your PC, the temptation is strong: set the interface address to 0.0.0.0:8384 and open it from the browser. If on top of that there's no password, anyone on your network (or on the Internet, if the port is forwarded) can add their device, share your personal folder with it, and walk away with everything.
Syncthing shows a big red banner in that case. Don't ignore it. The right way: leave the interface on 127.0.0.1 and use an SSH tunnel.
ssh -L 9384:127.0.0.1:8384 pi@192.168.1.50
# then open http://127.0.0.1:9384 on your PC
Zero exposed ports, encrypted, and nothing to configure in Syncthing. If you really want to expose it on the local network, at least set a username, a strong password and HTTPS (a checkbox in the GUI settings).
Mistake #3: touching the .stfolder
At the root of every synced folder there's a hidden folder called .stfolder. It looks useless, it's empty, you want to delete it.
It does one precise thing: prove to Syncthing that the folder is really there. Imagine your folder lives on an external drive, and the drive isn't mounted at boot. Without the marker, Syncthing would see an empty folder, conclude that you deleted everything, then propagate the deletion to all your devices. With the marker, it stops and shows "folder marker missing".
If you see that error, don't recreate .stfolder by reflex. First check why it disappeared: drive not mounted, wrong path, permissions. Only recreate it when you're sure the folder contents are the right ones.
Mistake #4: syncing "live" files
Syncthing syncs files, not consistent application states. It sees a modified file, it sends it. If that file keeps changing during the transfer, or if the app expects to be the only one touching it, things end badly.
Typical things not to put in a synced folder:
- a database in use (open SQLite, MySQL, PostgreSQL): you get a half-written, so corrupted, file;
- virtual machine disks (
.vdi,.vmdk,.qcow2) while the VM is running; - a browser or mail client profile open on two machines;
- a
.gitfolder modified on two machines at once. For code,git pushandgit pullare made for this, and they do it better.
Files changed occasionally, by one app at a time, are no problem: a KeePass database, documents, photos, Obsidian notes. For sensitive files like KeePass, just get into the habit of closing the app on one machine before opening it on another.
Mistake #5: misunderstanding the .stignore file
The .stignore file, at the root of the folder, lists what must not be synced. Three classic traps:
It isn't synced itself. Each device has its own. If you want the same rules everywhere, create a shared file (for example .stglobalignore), which will be synced, and include it in each .stignore:
#include .stglobalignore
The first matching rule wins. Order matters. To ignore a whole folder except one file, the exception must come before the general rule:
!/Projects/important.txt
/Projects
Ignored files block folder deletion. If you delete a folder on one device, but it contains a file that's ignored on another (a Thumbs.db, a .DS_Store), the other device can't delete the folder: it isn't empty. The (?d) prefix allows Syncthing to delete those ignored files when needed:
(?d).DS_Store
(?d)Thumbs.db
(?d)desktop.ini
A good starting .stignore for a work folder:
(?d).DS_Store
(?d)Thumbs.db
(?d)desktop.ini
~$*
*.tmp
*.part
node_modules
.venv
__pycache__
Mistake #6: panicking at sync-conflict files
One day you'll see files like report.sync-conflict-20261118-142233-MFZWI3D.docx. It's not a bug. It means the same file was modified on two devices before they had time to sync. Syncthing doesn't choose for you: it keeps the most recent version under the normal name, and the other under that long name.
Your job: compare both, merge if needed, and delete the conflict file. To find them all at once:
find ~/Sync -name "*.sync-conflict-*"
On Windows (PowerShell):
Get-ChildItem -Recurse -Filter "*.sync-conflict-*" C:\Users\you\Sync
If you get them often, it's a symptom. Maybe a device stays offline too long, or an app (an editor, a notes app) rewrites its files constantly. Find the cause instead of cleaning up every day.
Mistake #7: forgetting that Windows, macOS and Linux don't see files the same way
Syncing across different operating systems is where the nastiest problems hide.
- Case. On Linux,
Photo.jpgandphoto.jpgare two different files. On Windows and macOS (by default), they're the same. If both exist on the Linux side, Windows can't store them and the folder stays stuck "Out of Sync". Syncthing now detects and reports these cases, but renaming is up to you. - Forbidden characters. Windows refuses
: * ? " < > |in file names. A filenotes: draft.txtcreated on Linux won't go through. - Path length. Windows historically limits paths to 260 characters. Syncthing knows how to get around it, but many Windows apps (sometimes including Explorer) get confused beyond that.
- Timestamps on FAT32 and exFAT. These file systems store dates with 2-second precision. Result: Syncthing thinks the file changed and resends it in a loop. The folder's "modTimeWindowS" setting (in the advanced settings) fixes it: set it to 2.
Mistake #8: Linux's watch limit
Syncthing watches for changes in real time thanks to inotify. By default, Linux limits the number of watched folders. With a big folder (a code repo with node_modules, a photo library), you hit the limit and see an error like "failed to setup inotify handler". Changes are then only detected at the next full scan, every hour by default.
The fix, raising the limit permanently:
echo "fs.inotify.max_user_watches=204800" | sudo tee /etc/sysctl.d/90-syncthing.conf
sudo sysctl --system
Mistake #9: moving to Syncthing 2 without reading the release notes
Version 2.0, released in August 2025, is a big update. It replaced the old internal database (LevelDB) with SQLite. It's more reliable, but it has consequences:
- the first launch migrates the database, and on a large setup it can take a long time. Don't kill Syncthing thinking it froze;
- command-line options changed and switched to double dashes (
--no-browserinstead of-no-browser). That's what broke the old SyncTrayzor and quite a few home-made scripts; - deleted files are forgotten after six months. Before, Syncthing remembered deletions forever. Now, if a device stays off for more than six months and then comes back, files deleted in the meantime can reappear, because nobody remembers they were deleted anymore. The delay is set with the
--db-delete-retention-intervaloption. If you have an old tablet that connects twice a year, keep this in mind; - the "Default Folder" is no longer created automatically. Tutorials telling you to "open the default folder" no longer match what you see.
Mistake #10: letting Android silently kill Syncthing
Android loves saving battery, and Syncthing running in the background is exactly what it wants to shut down. You think your photos are synced; in fact the app has been asleep for three days.
In Syncthing-Fork, configure the run conditions (Wi-Fi only, charging only, etc.) instead of leaving it running all the time. Then remove the app from battery optimization in Android settings. On some skins (Xiaomi, Huawei, Samsung), you also need to explicitly allow it to auto-start.
The checklist before you sleep easy
- The web interface listens on
127.0.0.1, or it has a password and HTTPS. - An always-on machine keeps history ("Staggered" versioning).
- A real backup exists on the side, not just sync.
- Port 22000 is open to the main machine (no permanent relay).
- Folders contain a clean
.stignore, with(?d)on system files. - No database or open VM in a synced folder.
- On Linux, the inotify limit is raised.
- On Android, Syncthing-Fork is excluded from battery optimization.
Going further
Syncthing answers one question: "how do I have the same files everywhere, without a cloud". If your question is rather "how do I use Google Drive, OneDrive or Dropbox without them being able to read my files", that's a different tool. I cover it in my article on Cryptomator. The two combine very well, by the way.
The official documentation is excellent and up to date: docs.syncthing.net. And the forum is one of the most welcoming I know: forum.syncthing.net.
