How to set up as a system service
-
Create the user who should run the service, or choose an existing one.
-
(Skip if your distribution package already installs these files, see above.) From the git repository copy the
syncthing@.service
file into the load path of the system instance. -
Enable and start the service. Replace
myuser
with the Syncthing user after the@
:
How to set up as a user service
-
Create the user who should run the service, or choose an existing one. Probably this will be your own user account.
-
(Skip if your distribution package already installs these files, see above.) From the git repository copy the
syncthing.service
file into the load path of the user instance. To do this without root privileges you can just use this folder under your home directory:~/.config/systemd/user/
. -
Enable and start the service:
If your home directory is encrypted with eCryptfs on Debian/Ubuntu
You will need to make the change described in Ubuntu bug 1734290. Otherwise the user service will not start, because by default, systemd checks for user services before your home directory has been decrypted.
Automatic start-up of systemd user instances at boot (before login) is possible through systemd’s “lingering” function, if a system service cannot be used instead. Refer to the enable-linger command of loginctl
to allow this for a particular user.
Checking the service status
To check if Syncthing runs properly you can use the status
subcommand. To check the status of a system service:
To check the status of a user service: