Syncthing is a great alternative to cloud storage in where your files will be synced between your own computers, servers or cloud instances without the ability for any third parties to look into your files. In this tutorial you'll learn how to setup syncthing on Debian/Ubuntu, how to access it remotely and how to make it start when you start your server.
# 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-get update
sudo apt-get install syncthing
First thing to do is to add the keys, add the apt source, update and install. Please note that https is used, if you get in to trouble run this first:
sudo apt-get install apt-transport-https curl
Nest step is to allow remote connections, to do that, open the file ~/.config/syncthing/config.xml
with your favorite text editor. Look for: <address>127.0.0.1:8384</address>
and replace it with: <address>0.0.0.0:8384</address>
.
Start the WebUI with the following command:
/usr/bin/syncthing -no-browser -home="/home/USERNAME/.config/syncthing"
Where USERNAME is the name of your user. (For security reasons, please avoid using root. The syncthing application will run under the user who launched the application). You can now access the WebUI on: http://<IP>:8384
First thing to do in the WebUI is to set a secure password and enforce TLS for encrypted connections. After you've changed these settings please navigate to: https://<IP>:8384
to continue or start to add folders or clustered servers.
To setup auto start to trigger when your server boot you may add the following:
@reboot /usr/bin/syncthing -no-browser -home="/home/USERNAME/.config/syncthing"
as a cron job. Use crontab -e
and add above line at the bottom. Save and reboot. If everything is correctly installed you now have your own cloud storage without limitations, high security and high privacy.