Hi,

On Fri, Feb 27, 2026 at 10:26:08AM +0000, Chris Green wrote:
> I have several systemd services which I want to run as a user (i.e.
> not root) but I do want them to run at start-up whenever the system is
> rebooted.

User services normally only start when the user logs in for the first
time, and are terminated when the last login session of the user ends.

If you would like fore there to always be a session of that user
existing (so all of that user's services start at boot and remain
running), you can enable "linger":

$ loginctl enable-linger

If the service in question is not strictly user-based then I would
probably run it as a system service with User=. e.g. a daemon that you
expect there to only be one of on the system, that runs under a specific
user for that daemon, would make more sense as a system service, whereas
something that runs on behalf of a specific real user (and there might
be other instances of per-user) does make sense as a user service.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Reply via email to