Enabled user service not starting at login

I’m not able to get Syncthing (v0.14.49) to start automatically on Ubuntu 18.04.2.

Using

systemctl --user start syncthing.service

the service starts fine.

I followed the docs but it doesn’t seem to take.

My Service file at ~/.config/systemd/user/syncthing.service is left at its default values:

[Unit]
Description=Syncthing - Open Source Continuous File Synchronization
Documentation=man:syncthing(1)

[Service]
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0
Restart=on-failure
SuccessExitStatus=3 4
RestartForceExitStatus=3 4

# Hardening
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true

[Install]
WantedBy=default.target

journalctl -e --user-unit=syncthing.service

says nothing about any startup attempt

systemctl --user status syncthing.service

Just says

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

Just adding it to ~/profile works, but I’d like to get it to work with systemd.

Any hints?

Suggest you update to the latest version, that has the service file updated removing some of the conflicting hardening options.

And if you install through apt with apt.syncthing.net placing the correct unit files in the right location is already taken care of for you.

Thanks for the suggestions. I completely purged syncthing, deleted remaining files and installed the stable version through the apt repository, now on 1.2.0.

Unfortunately nothing changed. I can start it just fine, but there is no mention in any logs about even trying to start it (that I could find).

The included unit file seems to be the same as the old ones as well. I even tried removing all hardening options to no avail.

Sorry, but this is more of a systemd question at this point than a syncthing question. I assume you enabled the service for a specific user?

Its something like systemctl enable synthing@user.service or something like that.

Yeah it may not be directly related to syncthing. I used the user service, haven’t tried it as a system one (syncthing@user.service).

I’ll try to find a solution and will post it here.

Thanks again!

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