Syncing Folders with Syncthing

When it comes to sharing data between my computers (on macOS, Linux and even sometimes Windows), I prefer using services that synchronize regular filesystem folders. I went through various services like Dropbox, OneDrive or Proton Drive, but eventually settled primarily on Syncthing, an open source alternative.

Syncthing is a bit different than those commerical services, because it does not rely on cloud servers. So I also don’t need to worry about server locations or unreasonable storage plans. It allows sharing multiple folders without limitations. It’s just restricted by your physical hard drive space. And your encrypted data is shared live while at least one peer device is online (even a dedicated Raspberry Pi could satisfy this role).

Getting Started

Syncthing is available on all major operating systems and there are even mobile clients like Synctrain on iOS. It always runs in the background on my machines and can be accessed through its web frontend at http://127.0.0.1:8384. There you can define shared folders, pair other machines by QR code or ID and even pause syncing completely. New shares and devices must always be actively confirmed to keep everything private. And not every device needs to share every configured folder, it’s your choice.

Syncthing optionally uses anonymous relay servers to help connecting your paired computers and to relay encrypted data packets if they cannot reach each other in the same network. But I don’t use this feature at the moment (Settings > Connections > Enable Relaying). Instead, I rely on the local LAN sync, which means on Linux that the syncthing service in the firewalld home zone is enabled.

Configuration

Documentation for each platform is available on how the background service can be auto-started on login.

It’s very useful to settle on a main device as “Introducer” (Edit Device > General > Sharing > Introducer). This device automatically distributes newly shared folders and devices to existing peers.

Since I sync with macOS, I also configure a specific file ignore pattern for each shared folder by default: (?d).DS_Store. This skips those nasty hidden .DS_Store files, that macOS creates for storing folder settings. For me they sometimes caused the sync process to get stuck, so it’s better to skip them completely.

In rare cases, when Syncthing runs into a sync conflict, it keeps both files around. So you can manually resolve the conflict and decide what file represents the current state.

Overall, I constantly sync multiple folders of books, documents, code snippets, savegames, music files, wallpapers, etc. between multiple Mac and Linux computers. I’m very satisfied with this solution and don’t need to worry about using too much server space anymore.