Syncthing is an application to sync files across devices. Supports Windows and Linux. Also has an Android App. Since my server is Linux and I work across Windows desktops, this seemed ideal to use.
Setting up syncthing wasn’t too difficult. Lots of tutorials abound. The basic commands involve installing using apt-get.
Add the PGP key
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
Operations below performed as root
Add the “release” channel to your APT sources:
echo "deb http://apt.syncthing.net/ syncthing release" >> /etc/apt/sources.list
Or just vi into /etc/apt/sources.list and add the following in the end
deb http://apt.syncthing.net/ syncthing release
Install Syncthing
apt-get update apt-get install syncthing
Rename the service
cd /lib/systemd/system mv syncthing\@.service syncthing\@<username>.service
(Replace <username> with username)
The syncthing.conf looks like this –
[program:syncthing] command = /usr/bin/syncthing -home="<home path>/.config/syncthing" directory = <home path>/syncthing/ user = <username> autostart=true autorestart = true environment = STNORESTART="1", HOME="<home path>" stderr_logfile=/var/log/syncthing.err.log stdout_logfile=/var/log/syncthing.out.log