Syncthing

Purpose:: File Synchronization
Website:: https://syncthing.net/
Docs:: https://docs.syncthing.net/
Source Code:: https://github.com/syncthing/syncthing
Community:: https://forum.syncthing.net/

Description

Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers. We strive to fulfill the goals below. The goals are listed in order of importance, the most important one being the first. This is the summary version of the goal list - for more commentary, see the full Goals document.

Central Syncthing server

Without an own Syncthing server your IP address and other metadata get exposed to the relay servers that are used to connect your devices for syncing.

https://theselfhostingblog.com/posts/how-to-set-up-a-headless-syncthing-network/

SyncTrayzor

https://github.com/canton7/SyncTrayzor

Windows tray utility / filesystem watcher / launcher for Syncthing

Installation

Chocolatey:

choco install synctrayzor

Manually:

Download latest release from the GitHub release page.

Upgrade included syncthing binary

Open terminal with administration privileges:

cd "C:\\Program Files\\SyncTrayzor"
./syncthing.exe --upgrade

Fix: failed to initialize config: config file version (37) is newer than supported version (35)

Add -allow-newer-config to Syncthing Command-line Flags in the settings of SyncTrayzor.

Start with arguments

Without console:

-no-console

Without browser:

-no-browser

Both can be combined.

Add remote device via SSH forwarding

Make the remote device available on http://localhost:18384:

ssh user@host -L 18384:localhost:8384

Ignoring Files

Ignoring Files — Syncthing documentation

Sync patterns across all devices by syncing the file .stglobalignore and include it in the file .stignore:

// .stignore
//
#include .stignore-shared
// .stignore-shared
//
// Firefox downloads and other things
(?d)*.part
// Chrom(ium|e) downloads
(?d)*.crdownload

// Temporary Files
(?d)*~

// Windows
(?d)$RECYCLE.BIN
(?d)desktop.ini
(?d)Thumbs.db

// Linux
.Trash-*

// Syncthing
(?d).stignore
(?d).stfolder
(?d).stversions
(?d).syncthing
(?d).syncthing*
(?d).syncthing.*.*.tmp

//-vi(m)
(?d).*.sw[a-p] # vim uses 'o' then, 'n'... back to 'a'.

Useful .stignore Patterns - Howto - Syncthing Community Forum

Directory deletion

A pattern beginning with a (?d) prefix enables removal of these files if they are preventing directory deletion. This prefix should be used by any OS generated files which you are happy to be removed.

Selective Sync

Using stignore and whitelisting

First set the folders you want to sync with the ! marker and then ignore everything else.
Example .stignore:

// DON't ignore the following dirs (i.e. DO sync them):
!/DCIM
!/TitaniumBackup

// Ignore all the rest
*

Using Syncthing-PySelective

https://github.com/galilley/syncthing-pyselective

Third-party app to realize selective sync in Syncthing. It gives minimalist GUI to select which folders, subfolders and files you want to sync with a local machine and which one you would like to add for syncing.

Tutorials

Syncthing Made EASY - YouTube