How to Set Up Syncthing for Private Peer-to-Peer File Sync
Learn how to use Syncthing to synchronize files continuously and securely across Windows, Mac, Linux, and Android without third-party cloud servers.
In this article
- How Syncthing Works
- Step 1: Installing Syncthing on Your Devices
- Step 2: Connecting Two Devices
- Step 3: Creating and Sharing a Synchronized Folder
- Step 4: Configuring Folder Types and Versioning
- Setting Up File Versioning
- Step 5: Ignoring Unnecessary Files
- Step 6: Setting Up Encrypted Offsite Sync (Untrusted Nodes)
- Frequently Asked Questions
- Is Syncthing a complete substitute for traditional backups?
- Does Syncthing require port forwarding or public IP addresses?
- How does Syncthing handle file conflicts?
- Can I run Syncthing on iOS or iPadOS devices?
- Conclusion
Centralized cloud storage platforms like Google Drive, OneDrive, and Dropbox make syncing files across devices effortless. However, that convenience comes with trade-offs: storage caps, subscription fees, privacy concerns, and reliance on remote servers to handle your personal data. For users who prefer full custody over their files, self-hosted file synchronization offers a compelling alternative.
Syncthing is a free, open-source continuous file synchronization application that connects devices directly using peer-to-peer (P2P) technology. Unlike traditional cloud services, Syncthing never uploads your files to a central server. Data flows directly between your desktop, laptop, server, and phone using TLS encryption. This guide walks you through setting up Syncthing across your devices, configuring folder permissions, managing version control, and securing offsite targets.
How Syncthing Works
Syncthing replaces the central cloud server with direct device-to-device communication. Each device running Syncthing generates a unique cryptographic device ID. When two devices share a folder, they authenticate each other using these IDs and establish an encrypted session over the network.
Syncthing uses block-level file synchronization. Instead of re-uploading an entire multi-gigabyte file when a minor change occurs, Syncthing splits files into smaller blocks, computes their hashes, and transfers only the altered blocks. This drastically cuts down on local bandwidth usage and sync times for large databases, document vaults, or photo libraries.
Step 1: Installing Syncthing on Your Devices
Syncthing runs on almost all major operating systems. Because it operates as a background service with a web-based management console, launcher wrappers are often used to integrate it smoothly into desktop environments.
- Windows: Download SyncTrayzor, an open-source tray utility that bundles the Syncthing executable, handles system startup, and provides a native window interface. Alternatively, install native Syncthing via Winget by running
winget install Syncthing.Syncthingin Terminal. - macOS: Install Syncthing via Homebrew by running
brew install --cask syncthing, or download the official Syncthing macOS app wrapper from the project repository. - Linux: Install Syncthing directly through your distribution’s package manager. For Debian/Ubuntu-based systems, run
sudo apt install syncthing. Enable it as a systemd user service so it launches on boot:systemctl --user enable --now syncthing. - Android: Download Syncthing-Fork from the F-Droid repository or Google Play Store. It offers improved battery management and folder selection compared to legacy Android builds.
Once installed, open the Syncthing Web UI (typically hosted at http://127.0.0.1:8384 on desktop platforms) to access the main configuration dashboard.
Step 2: Connecting Two Devices
To begin syncing, you must introduce your devices to each other using their unique Device IDs.
- On your primary device, click Actions in the top-right corner of the Web UI and select Show ID. Copy the string of alphanumeric characters or leave the QR code visible.
- On your second device (such as a laptop or smartphone), open the dashboard, click Add Remote Device, and paste the primary device’s ID (or scan the QR code using the mobile app).
- Enter a recognizable Device Name to identify the machine in your network list.
- Click Save.
- A prompt will appear on your primary device asking to accept the incoming connection request. Click Add Device to complete the cryptographic handshake.
Once connected, both devices will establish a secure connection whenever both are online and connected to local Wi-Fi or the internet.
Step 3: Creating and Sharing a Synchronized Folder
With the devices paired, you can now designate local directories to keep in sync.
- In the Syncthing Web UI, click Add Folder under the Folders section.
- Enter a Folder Label (e.g., “Work Documents”) and set the exact Folder Path on your local disk (e.g.,
C:\Users\Username\Documents\Workor/home/user/documents/work). - Switch to the Sharing tab and check the box next to the remote device you want to share this directory with.
- Click Save.
On the receiving device, a notification will appear stating that another device wants to share a folder. Click Add, select where you want to store those files on the local filesystem, and confirm.
Step 4: Configuring Folder Types and Versioning
Syncthing provides granular control over how files interact across devices. Under the Advanced tab when editing a folder, you can modify the Folder Type:
- Send & Receive (Default): Changes made on any device automatically sync to all connected devices.
- Send Only: The local device broadcasts updates to the network but rejects changes coming from other devices. This is ideal for a master backup node or primary desktop workstation.
- Receive Only: The device accepts incoming updates but prevents local edits from propagating to other devices. This works well for secondary backup storage or media players.
Setting Up File Versioning
Because Syncthing deletes files in real time across nodes when removed from one device, configuring file versioning protects you against accidental deletions or file corruption. Navigate to the folder settings, select the File Versioning tab, and choose one of the available strategies:
- Staggered Versioning: Retains old file versions at set time intervals (e.g., keeping hourly versions for the past day, daily versions for the past month, and weekly versions beyond that).
- Trash Can Versioning: Moves deleted files to a hidden
.stversionsfolder for a set number of days before permanent removal. - Simple Versioning: Keeps a fixed number of old copies whenever a file is modified or deleted.
Step 5: Ignoring Unnecessary Files
To avoid syncing temporary files, caches, or system logs, use Syncthing’s built-in ignore patterns. Open the folder settings, select the Ignore Patterns tab, and add filenames or wildcard paths to exclude.
For example, a standard ignore file for software development projects or document storage might look like this:
(?d).DS_Store(Ignores macOS desktop service files and allows deletion)(?d)desktop.ini(Ignores Windows desktop customization files)(?d)thumbs.db(Ignores Windows image thumbnail caches)node_modules/(Excludes heavy dependency folders)*.tmp(Excludes temporary workspace files)
Step 6: Setting Up Encrypted Offsite Sync (Untrusted Nodes)
If you want to sync your files to a cloud server or remote VPS for offsite redundancy, but do not trust the server’s security host with unencrypted access to your data, you can use Syncthing’s Untrusted Device Encryption feature.
- When sharing a folder with a remote cloud node, enter an encryption password in the Password field under the Sharing tab on your primary device.
- On the remote server node, Syncthing receives the data stream, but all file contents, folder names, and directory structures are encrypted on disk prior to being written.
- If the untrusted server is compromised, the attacker only gains access to unreadable encrypted blocks, while your connected trusted devices retain full local access to the unencrypted source files.
Frequently Asked Questions
Is Syncthing a complete substitute for traditional backups?
No. Syncthing is a file synchronization tool, not a dedicated backup system. Because changes and deletions sync instantly across nodes, an accidental deletion or malware infection can propagate quickly. Always pair Syncthing with an isolated, versioned, or immutable backup solution (such as BorgBackup, Restic, or offline external drives).
Does Syncthing require port forwarding or public IP addresses?
In most cases, no. Syncthing uses Universal Plug and Play (UPnP) and NAT traversal (STUN) to establish direct connections through routers. If direct connections fail due to strict firewalls, Syncthing falls back to secure, encrypted global relay nodes without exposing your actual file contents to the relay operator.
How does Syncthing handle file conflicts?
If the same file is modified simultaneously on two devices before a sync completes, Syncthing preserves both versions. It keeps one file with the original name and saves the conflicting version alongside it with a .sync-conflict suffix appended to the filename, allowing you to review and merge changes manually.
Can I run Syncthing on iOS or iPadOS devices?
Due to background execution and filesystem limitations imposed by iOS, there is no official Syncthing client for Apple mobile devices. However, third-party apps like Mobius Sync provide iOS integration using standard Syncthing protocols, subject to iOS background processing constraints.
Conclusion
Syncthing offers a powerful, private, and subscription-free method for keeping files synchronized across your hardware fleet. By keeping data transfers encrypted and completely peer-to-peer, you retain control over your digital assets without sacrificing the seamless automation expected from modern software.

