Self-Hosting Syncthing on a Raspberry Pi: Real-Time File Sync Without the Cloud
Cloud backup services solve one problem — off-site redundancy — while quietly creating another: you're trusting a third party with your files and paying monthly for the privilege. Syncthing takes a different approach entirely. It's an open-source, peer-to-peer file synchronization tool that keeps folders identical across every device you run it on, without routing your data through anyone's cloud. A Raspberry Pi is a natural always-on node for it — a home base that stays in sync with your laptop, phone, and any other device on the list, even when those devices are only online part of the time.
How Syncthing Differs from What You Might Already Run
If you've already set up a Pi as a NAS with Samba (see this site's Raspberry Pi NAS guide) or a backup target with Restic/Borg, Syncthing solves a different problem than either. Samba/NFS gives you a shared network drive you mount and browse. Restic/Borg gives you versioned, deduplicated backups of a source to a destination. Syncthing gives you continuous, bidirectional, real-time synchronization between multiple full copies of a folder — edit a file on your laptop, and it propagates to the Pi and your phone within seconds, no mounting, no manual copy step, and no single point of failure since every device holds a complete copy.
Core Concepts
- Device ID: every Syncthing instance generates a unique, cryptographic device ID on first run. Devices are paired by exchanging these IDs, not by username/password — there's no central account system.
- Folders: you choose which folders to share and with which paired devices. A folder can be shared with some devices and not others, so you're not forced into an all-or-nothing sync.
- Transport encryption: all traffic between devices is encrypted with TLS, whether it's happening over your LAN or relayed over the internet through Syncthing's relay network.
- Local discovery vs. global discovery: devices on the same LAN find each other automatically via broadcast; devices on different networks find each other through Syncthing's discovery servers, then connect directly (or via a relay if a direct connection isn't possible, e.g. behind restrictive NAT).
- Conflict handling: if the same file changes on two devices before they can sync, Syncthing keeps both versions (renaming one with a .sync-conflict suffix) rather than silently overwriting either one.
Installing Syncthing on a Raspberry Pi
- Use the official APT repository rather than the Raspberry Pi OS default package, which tends to lag behind: add the Syncthing release key and repository as documented at apt.syncthing.net, then sudo apt update && sudo apt install syncthing.
- Run it as a systemd user service tied to a dedicated non-root user rather than as root: sudo systemctl enable --now [email protected]. This keeps the web GUI and file permissions scoped correctly.
- By default the web GUI binds to 127.0.0.1:8384, reachable only from the Pi itself. To manage it from your desktop, either use SSH port forwarding (ssh -L 8384:localhost:8384 pi@yourpi) or edit the GUI address in ~/.config/syncthing/config.xml to 0.0.0.0:8384 and immediately set a GUI username and password — never leave the GUI exposed on your LAN without authentication.
- If you're already running Tailscale on the Pi (see this site's Tailscale VPN guide), binding the GUI to the Tailscale interface specifically is a cleaner way to reach it remotely than opening it to the whole LAN or the internet.
Pairing Devices and Sharing Folders
- Install Syncthing on your other devices — desktop clients for Windows/Mac/Linux, and Syncthing-Fork on Android (the official Syncthing Android app was discontinued; Syncthing-Fork is the actively maintained community successor) or Möbius Sync on iOS.
- On each device, open Actions > Show ID to get its device ID (a 52-character string, also encoded as a QR code for easy phone pairing), and add it as a remote device on the Pi, and vice versa.
- Once devices are paired, create a folder on one device and share it to the paired devices; each recipient accepts the share and chooses where it lands locally.
- For a Pi acting as an always-on hub, set its copies of shared folders to "Receive Only" or "Send Only" where appropriate — for example, a phone camera-upload folder set to Send Only on the phone and Receive Only on the Pi prevents accidental deletions on the Pi from propagating back and wiping originals.
Practical Use Cases
Use CaseSetup Phone photo backupCamera folder set to Send Only on phone, Receive Only on Pi Cross-device project files / dotfilesBidirectional sync between laptop, desktop, and Pi, all set to Send & Receive 3D print farm / Klipper config syncKeep printer config backups or STL libraries mirrored across your workstation and print server Offsite copy at a family member's housePair a second Pi at a remote location over the internet as a fourth sync target — effectively free offsite backup with no cloud storage billResource Use and Limits on a Pi
Syncthing is lightweight at idle but does real work during scanning and hashing — expect noticeable CPU and SD card/SSD I/O activity when syncing very large folders or libraries with hundreds of thousands of small files for the first time. On a Pi 4 or 5, this is manageable for typical photo libraries and project folders; if you're syncing a truly enormous archive, initial indexing can take a while and running from an SSD via USB3 (or NVMe on a Pi 5) rather than an SD card will noticeably shorten it.
Where Syncthing Isn't the Right Tool
- Point-in-time backups with history: Syncthing keeps limited file versioning (configurable per folder), but it's not a substitute for Restic or Borg if you need to restore a file as it existed weeks or months ago — sync propagates deletions and overwrites, it doesn't retain deep history by default.
- A single shared network drive multiple people mount at once: that's still a job for Samba/NFS, since Syncthing gives every device its own full local copy rather than one shared mount point.
- Extremely large single files that change often (VM images, databases): Syncthing re-syncs changed blocks reasonably efficiently, but it's not built for high-frequency database-style writes the way a proper database replication tool is.
For the common case — keeping a folder of files identical across a phone, a couple of computers, and an always-on Pi, without a subscription and without anyone else's server in the loop — Syncthing on a Pi is close to a set-and-forget solution once it's paired and running as a systemd service. Combine it with Restic or Borg on the same Pi (syncing to one folder, backing up another) and you get both continuous availability and real point-in-time recovery from a single low-power box.
Related Guides
- Backing Up Self-Hosted Services on Raspberry Pi with Restic and Borg
- Auto-Backup Your Raspberry Pi SD Card to a Network Share
- Self-Hosting Jellyfin Media Server on a Raspberry Pi: Hardware Transcoding and Remote Access
- How to Install Klipper on Any 3D Printer: Complete Setup Guide
- How to Set Up OpenCV Machine Vision on a Raspberry Pi
- Raspberry Pi: Complete Headless Setup Guide (No Monitor Needed)
- Raspberry Pi: Headless OS Setup
- How to Set Up a Raspberry Pi Headless with SSH and WiFi