Syncthing Essentials
Install
Raspberry Pi Install
# Add the release PGP keys:
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
# Add the "stable" channel to your APT sources:
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
# Update and install syncthing:
sudo apt update
sudo apt install syncthing
# Autostart
sudo systemctl enable syncthing@pi.service
sudo systemctl start syncthing@pi.service
Auto Start
Linux
Ubuntu 20.04
- Launch the program ‘Startup Applications’.
- Click ‘Add’.
- Fill out the form:
- Name: Syncthing
- Command: /path/to/syncthing/binary -no-browser -home=”/home/your_user/.config/syncthing”
Note the above will only work when a user loggs on to a GUI session
Windows Auto Start
Task Scheduler>Action>Create Task>Syncthing
General Tab>Run wether user is logged in or now
Triggers Tab>New>At Statup>
Actions Tab>New>Start a program
c:\program files\syncthing\syncthing.exe
Add Arguments> -no-console -no-browser
Settings Tab>Uncheck Stop the task if runs longer then.
Exclusions
You can choose which files or folders to exclude from syncing.
(?d)
Prefix indicating that the file can be deleted if preventing directory removal
(?i)
Prefix indicating that the pattern should be matched without case sensitivity
!
Inversion of the given condition (i.e. do not exclude)
*
Single level wildcard (matches within a directory only)
**
Multi level wildcard (matches multiple directory levels)
//
Comment, when used at the start of a line
Example
!Photos
!Scripts
!Downloads
**
Exclude everything. Include Photos, Scripts and Downloads
these setting will then be stored in the .stignore file located int the root of the sync folder
Backup
How to backup Syncthing?
How to backup syncthing on Android?
How to backup syncthing on Linux?
How to backup syncthing on Windows?
Android Backup
Settings>Backup>Export Configuration
Do you really want to export your configuration? Existing files will be overwritten.
WARNING! Other applications may be able to read the private key from the backup location and use it to download/modify synchronised files.>OK
Linux Backup
syncthing -paths
Backup the 3 files:
- /home/USERNAME/.config/syncthing/config.xml
- /home/USERNAME/.config/syncthing/key.pem
- /home/USERNAME/.config/syncthing/cert.pem
Windows Backup
Common Problems & Fixes
Problem
ailed to start filesystem watcher for folder yourLabel (yourID): failed to setup inotify handler. Please increase inotify limits.
Cause
Linux typically restricts the amount of watches per user (usually 8192). When you have more directories you need to adjust that number.
Solution
echo "fs.inotify.max_user_watches=204800" | sudo tee -a /etc/sysctl.conf
Related
- d
Links
- https://syncthing.net/
- https://docs.syncthing.net/users/autostart.html
- https://docs.syncthing.net/users/autostart.html#linux