Wiki > Syncthing
Syncthing is an open-source peer-to-peer synchronization tool.
Two random port numbers between 10000 and 32767 are needed for Syncthing to operate properly. The port numbers 14975
and 23487
have automatically been generated and will be used throughout this article, but can be changed if needed.
Installation
Syncthing is available as an app on your Manage page. Select Manage Apps next to the slot you want to use Syncthing on. On this page, select Add Syncthing
and provide your Whatbox password. After a short wait, you can click Open Syncthing
to open Syncthing. You can also access Syncthing from your Manage page.
Usage
The user manual and FAQ for Syncthing operation can be found here.
Automatically Restart (optional)
Below are steps to take to have your Syncthing instance automatically restart if it crashes, or if the server is rebooted.
-
Make a file to be used for the script.
touch ~/syncthing_restart.cron
-
Edit the file and enter the text below.
nano -w ~/syncthing_restart.cron
#!/bin/bash if pgrep -f "/usr/bin/syncthing" > /dev/null then echo "Syncthing is running." else echo "Syncthing is not running, starting Syncthing" screen -dmS syncthing /usr/bin/syncthing fi exit
-
Save the file with
Ctrl+x
,y
andEnter
to accept overwriting. -
Make the script executable.
chmod +x ~/syncthing_restart.cron
-
Open your crontab.
EDITOR=nano crontab -e
-
Enter the following text at the end of the file.
@reboot /home/user/syncthing_restart.cron >/dev/null 2>&1 */5 * * * * /home/user/syncthing_restart.cron >/dev/null 2>&1
-
Save the crontab with
Ctrl+x
,y
andEnter
to accept overwriting.