🌱Syncthing Notes
Published on
I arrange my Syncthing set up in a hub and spoke model. I have one always-on PC that servers as the "Hub" and has Synthing installed on it. From there, I share folders with devices. It looks like this:
There are folders I share between devices but they all get synced through Syncthing Server first.
I always set up my ignore patterns for each folder like this:
#include .stignoreglobal
Then, in the synced folder I create a .stignoreglobal file that gets synced between all devices that share that folder. This lets me easily update things I want to ignore but editing the file on one device.
Generally, the .stignoreglobal starts out looking like the text in the block at the bottom of this page. This one includes the bits I use for Obsidian so if your aren't syncing Obsidian vaults you might not need them
My .stignoreglobal file
// NOTES from https://docs.syncthing.net/users/ignoring.html
// foo matches the files foo, subdir/foo as well as any directory named foo
// asterisk means any number of characters. te*ne matches telephone, subdir/telephone but not tele/phone
// double astrisk is as above and directories. te**ne matches telephone, subdir/telephone and tele/sub/dir/phone.
// ? is for single characters. te??st matches tebest but not teb/st or test
// [] is a range of characters. [a-z] matches any lower case character
// {} is a comma separated set. {banana,pineapple} matches either banana or pineapple
// Firefox downloads and other things
// \ escapes characters. \{banana\} matches {banana} exactly and does not denote a set of alternatives as above. Issues on Windows, look at the web page above.
// A pattern beginning with / matches in the root of the synced folder only. /foo matches foo but not subdir/foo.
// (?i) means case-insensitive. (?i)test matches test, TEST and tEsT
// (?d) prefix enables removal of these files if they are preventing directory deletion
// Prefixes can be specified in any order (e.g. (?d)(?i)), but CANNOT be combined in a single pair of parentheses like (?di).
//git
*.git
// Firefox downloads and other things
*.part
// Chrom(ium|e) downloads
*.crdownload
// Temporary / Backup Files
*~
.*.swp
.filepart
// OS-generated files (OS X)
(?d).DS_Store
(?d).Spotlight-V100
(?d).Trashes
(?d)._*
// OS-generated files (Windows)
(?d)(?i)desktop.ini
(?d)Thumbs.db
(?d).trashed
$RECYCLE.BIN
// OS-generated files (Linux)
.Trash-*
// Obsidian
(?d).trash
(?d)(?i)Untitled.md
(?d)workspace.json
(?d)workspaces.json
(?d)workspace-mobile.json
// Obsidian - This next line lets you keep your plugins in sync but lets you control which ones are on/off per device
(?d)community-plugins.json
// Obsidian - This next line lets you keep your themes in sync but lets you control which theme is active per device
(?d)appearance.json
// Obsidian - This next line lets you set the lazy-plugin loader on a device by device basis
(?d).obsidian/plugins/lazy-plugins/data.json
