Syncthing is a great tool for keeping machines in sync. This is quick write-up on how to configure automatic start with systemd on server. Important: This is different from setting it up on a client machine. In this case you would run it as the user logged in.
On Debian systems I recommend to install the
packages. These will also copy appropriate service
/lib/systemd/system. Further I recommend to use a dedicated user for
running the syncthing server.
$ adduser --system --group syncthing
To enable the service in systemd, run the following code:
$ systemctl enable email@example.com
$ systemctl enable syncthing-resume.service # to restart syncthing after resume
You can start syncthing with the following line:
$ systemctl start firstname.lastname@example.org
Afterwards the server listens on
localhost:8384. Most probably you want it to
listen on all interfaces to get remote access. This needs further configuration
/home/syncthing/.config/syncthing/config.xml. Change the following line