Syncthing working fine but systemd says it isn't?


#1

I just installed Syncthing on a Digital Ocean Ubuntu 16.04.4 server and it is running great and syncing with my computers perfectly.

However, when I type:

systemctl --user status syncthing.service

I get:

syncthing.service - Syncthing - Open Source Continuous File Synchronization Loaded: loaded (/usr/lib/systemd/user/syncthing.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:syncthing(1)

Running top in a terminal does show it active under the appropriate user account.

I restart the server and syncthing starts automatically per the systemd commands to autostart it.

Am I missing something? I’m very new at server configuration so perhaps it’s something obvious I’m missing.

Thanks


(Graeme Blackman) #2

Just in case you are running syncthing as root or as a template, try systemctl | grep running | grep syncthing.


#3

Ok, that command gives the following with thundergod user:

syncthing@thundergod.service loaded active running Syncthing - Open Source Continuous File Synchronization for thundergod

Does that look correct or do I need to change how I have it setup?

Thanks for your input!


(Antony Male) #4

There are two ways to start services using systemd: as a system service, and as a user service. See the docs. User services start when the user logs in, and you use the --user flag to systemctl. System services can still run as different users, but start when the system starts.

You started Syncthing as a system service (using systemctl start|enable syncthing@thundergod.service, which runs it as the thundergod user). Use systemctl status syncthing@thundergod.service to view its status.


#5

Brilliant! Thanks for the explanation. Appreciate your help.


(system) #6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.