Starting syncthing from Systemd (take 2)

Well, Arch includes exactly these files, see here: https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/syncthing#n44

There is not need to adjust anything.

You have done the exact same mistake as I mentioned here: Starting syncthing from systemd - #16 by rumpelsepp You are mixing up the config files. You are using the templated unit for the user instance! On Arch Linux, just delete your custom units and file:

systemctl --user enable syncthing.service
systemctl --user start syncthing.service

or

systemctl enable syncthing@eric.service
systemctl start syncthing@eric.service

Next, a small hint which is very useful:

systemctl [--user] [--full] edit syncthing.service

This command does the edit magic behind the scenes and opens an editor for you. You can obtain the documentation from the manpage systemctl(1).

For example, you can specify the priority with such a drop in:

$ systemctl --user cat syncthing.service
# /usr/lib/systemd/user/syncthing.service
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization
Documentation=https://github.com/syncthing/syncthing/wiki
After=network.target

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

[Install]
WantedBy=default.target

# /home/stefan/.config/systemd/user/syncthing.service.d/override.conf
[Service]
Nice=10

As I mentioned above, you are mixing up things. When you use the convenient files (on arch just use the shiped ones by the package), then everything is fine. :slight_smile: