Wiki > Syncthing
Syncthing is an open-source peer-to-peer synchronization tool.
Two random port numbers between 10000 and 65535 are needed for Syncthing to operate properly. The port numbers
22489 have automatically been generated and will be used throughout this article, but can be changed if needed.
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.
Manual installation (previous installs)
Connect to your slot through SSH
Download the latest version
wget -O ~/syncthing.tar.gz $(curl -sL http://git.io/vEPSt | grep -P 'browser(.*)linux-amd64' | cut -d\" -f4)
mkdir -p ~/syncthing; tar -xvzf ~/syncthing.tar.gz --strip 1 -C ~/syncthing
Generate Syncthing's configuration files by running
Open ~/.config/syncthing/config.xml for editing (
Change the IP and port used by the web interface by editing the following lines. 0.0.0.0 is used to allow you to connect to it from the Internet instead of requiring an SSH tunnel.
<gui enabled="true" tls="false" debugging="false"> <address>0.0.0.0:12979</address>
Change the port used by Syncthing's listen address by editing the following lines.
Run Syncthing in a screen session. Once Syncthing is running, you may close the SSH session or press
Ctrl+A, Dto detach from screen, allowing Syncthing to run in the background.
screen -S syncthing ~/syncthing/syncthing
Navigate to the WebUI by entering
http://server.whatbox.ca:12979into your browser. At the top-right of the page, select
Settings. In the settings panel, change your
GUI Authentication Usernameand
GUI Authentication Passwordto a username and password of your choosing.
(Optional) Clean up by removing the Syncthing install archive
The user manual and FAQ for Syncthing operation can be found here.
- You can access the Syncthing WebUI by entering
http://server.whatbox.ca:12979into your browser.
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.
Edit the file and enter the text below.
nano -w ~/syncthing_restart.cron
#!/bin/bash if pgrep -f "/home/user/syncthing/syncthing" > /dev/null then echo "Syncthing is running." else echo "Syncthing is not running, starting Syncthing" screen -dmS syncthing ~/syncthing/syncthing fi exit
Save the file with
Enterto 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
Enterto accept overwriting.