Syncthing provides peer-to-peer file sync with no central server. Every device syncs directly with every other device it can reach. If a device is offline, changes sync when it comes back.
Desktop A <──syncthing──> Desktop B
\ /
\ /
──── Fairphone ────────
sudo apt install syncthingEnable as a user service so it starts on login:
systemctl --user enable --now syncthingVerify it's running:
systemctl --user status syncthingThe web UI is at http://localhost:8384.
Install Syncthing from F-Droid (not Play Store).
brew install syncthing
brew services start syncthing- On each machine, open the Syncthing web UI (http://localhost:8384 on desktop, or open the app on Android)
- Find your Device ID: Actions > Show ID (it's a long alphanumeric string)
- On machine A: Add Remote Device > paste machine B's Device ID
- On machine B: accept the incoming device request (or add machine A's ID manually)
- Repeat for every pair of devices that should talk to each other
Devices only need to be paired once. After that they auto-discover each other on the local network and over the internet via relay servers.
- On any device, click Add Folder
- Set the Folder Path to the directory you want to sync (e.g.
~/org) - Give it a Folder Label (e.g. "org files")
- Under the Sharing tab, check every device that should receive this folder
- On each receiving device, accept the folder share and choose a local path:
- Linux: e.g.
~/org - Android: e.g.
/storage/emulated/0/orgor/sdcard/org
- Linux: e.g.
| Setting | Value | Why |
|---|---|---|
| Folder Type | Send & Receive | Bidirectional sync, like Dropbox |
| Watch for Changes | Enabled (default) | Picks up file saves instantly via inotify |
| Full Rescan Interval | 3600 (1 hour) | Safety net; inotify handles the real-time bit |
| File Versioning | Staggered | Keeps old versions in .stversions/ |
This acts like Dropbox's version history. Old versions are kept in a
.stversions/ directory inside the synced folder with the following retention:
- Versions from the last hour: one per 30 seconds
- Versions from the last day: one per hour
- Versions from the last month: one per day
- Older versions: one per week
Add .stversions to your .gitignore if the synced folder is a git repo.
In the Syncthing Android app under Settings:
- Run on Wi-Fi only: recommended to save mobile data
- Run while on battery: up to you — Syncthing is lightweight but does use some battery
- Respect battery optimization: Android may kill Syncthing in the background. Go to Settings > Apps > Syncthing > Battery > Unrestricted to prevent this
- Install Orgzly Revived from F-Droid
- In Orgzly: Settings > Sync > Repositories > Directory
- Point it at the same folder Syncthing is using (e.g.
/storage/emulated/0/org) - Orgzly will read/write
.orgfiles directly — Syncthing handles the sync
If two devices edit the same file simultaneously before syncing, Syncthing creates a conflict file named like:
notes.sync-conflict-20260316-120000-ABCDEFG.org
The original file gets one device's version; the conflict file gets the other. You'll need to manually merge them.
In practice this is rare with org files since you're usually only editing on one device at a time. To minimize conflicts:
- Let Syncthing finish syncing before editing (check the UI or wait a few seconds after opening your laptop)
- Emacs has
global-auto-revert-modeenabled (already in init.org) which picks up on-disk changes via inotify nearly instantly, so your buffers stay current
Syncthing uses:
- TCP 22000: sync protocol (data transfer between devices)
- UDP 21027: local discovery (finds devices on the same LAN)
If devices are on the same LAN, sync is direct and fast. If they're on different networks, Syncthing uses relay servers (encrypted, but slower). For best performance, port-forward TCP 22000 on your router.
- Create a test file on one machine:
echo "sync test" > ~/org/test-sync.txt
- Check the Syncthing web UI — you should see the folder update within seconds
- Verify the file appears on the other device
- Delete the test file when satisfied
# Check service status
systemctl --user status syncthing
# View logs
journalctl --user -u syncthing -f
# Restart after config changes
systemctl --user restart syncthing| Problem | Fix |
|---|---|
| Devices not connecting | Check firewall for TCP 22000 / UDP 21027 |
| Android kills Syncthing | Disable battery optimization for the app |
| Slow sync over internet | Port-forward TCP 22000 for direct connections |
| Conflict files appearing | Merge manually, consider editing on one device at a time |
| Folder marked "Out of Sync" | Click "Override Changes" on the authoritative device |
| Changes not picked up in Emacs | Verify global-auto-revert-mode is on (it is in init.org) |