Sorry if I didn’t mention it. Yes, I installed from the community repo and that is exactly what i am using:
suco pacman -S syncthing
I did find that thread, and I did as you mentioned in that thread by copying the “intended user instances” to my “.config/systemd/user/” directory, as instructed.
But straight starting with:
systemctl --user start syncthing.service
Kept returning an error in journalctl -xb that showed, if I can recall the error message, the GROUP was unable to start processes. I was able to get it to run by adding Forking, but I think that was starting to go down the wrong road.
I also did attempt to follow the instructions in your Wiki for auto starting, which was had even additional “enable” step:
systemctl --user enable syncthing.service
systemctl --user start syncthing.service
Again, this causes errors with the existing script as it was supplied. It always either wanted me to fork, or remove the user.
Again, this is exactly what i did. And the last two would not work without the --user param. Well, actually they would: you just get prompted for the user’s rights and password.
But again, same errors as before.
If you like, I can revert my working installation back to the error state and produce the errors for you. As long as User=%i
was specified under [Service], it would not start without Type=forking
added - which actually started to cause some login issues.
Type=forking
was needed due to the errors produced.
And as I mentioned in my solution post, WantedBy=default.target
was needed to get it to auto-start on login.
According to Arch wiki, Systemd/User
only looks for targets with default.target
to start on login:
https://wiki.archlinux.org/index.php/Systemd/User#How_it_works
multi-user.target
is used by the root services.
Again, I am new to Systemd and I may have mis-interrupted multi-user.target. But again, changing it to default.target
was the only way to get it to autostart. Otherwise, the service would be enabled but inactive (waiting to be started) on login.
I tried. I even attempted to follow the steps in the Arch wiki page:
https://wiki.archlinux.org/index.php/Syncthing
The inotify instructions suffer from the same won’t start issues as well following those same steps.