Relationships
#2106 swamp serve daemon (user service) doesn't handle systemd 'lingering' — claims it 'starts automatically' but only runs while logged in
Opened by svendowideit · 9/11/2026· Shipped 9/14/2026
Summary
swamp serve daemon enable (the --user / systemd user-service path) installs swamp-serve.service under the systemd user manager. It prints "✓ Daemon enabled as user service — swamp serve will start automatically", and swamp serve daemon status reports Enabled: yes.
But it never enables user lingering. Unless the user already enabled it, a systemd user service only runs while that user is logged in — so swamp serve does not actually start at boot or survive logout, contradicting the "will start automatically" message.
Repro
$ loginctl show-user $USER # Linger=no
$ swamp serve daemon enable # prints "will start automatically"
$ loginctl show-user $USER # still Linger=no
$ swamp serve daemon status # "Status (user service): enabled: yes"Log out (or boot) and swamp-serve.service does not run until you log back in.
Suggested approaches (open to maintainers)
- Enable lingering on
daemon enable— callloginctl enable-linger $USER(idempotent) so the user service genuinely starts at boot. This is the most user-friendly default, matching the message it already prints. - At minimum, surface actionable guidance — before/after enabling, tell the user:
loginctl show-user "$USER"(does it currently have lingering?)loginctl enable-linger "$USER"(how to enable it)- and note which user services are affected (e.g. any enabled unit under
~/.config/systemd/user/, likeswamp-serve.service, feedback/gtd-style web servers the user runs the same way).
Context
This landed together with the user-unit support added in #988 (support for user systemd units). The --user path was the point that introduced this ambiguity — previously it was the system-manager path, which inherently starts at boot.
Affected
Anyone running swamp serve via swamp serve daemon enable on Linux and expecting a real auto-start daemon. Users who also run other user services (e.g. the @svendowideit/systemd-service extension stands up feedback/gtd servers the same way) are all bounded by the same lingering flag.
Shipped
Click a lifecycle step above to view its details.
stack72 commented 9/14/2026, 7:09:41 PM
Thanks @svendowideit for reporting this! We shipped: Fix misleading 'will start automatically' message for user services. User services (systemd --user, launchd agent) only run while logged in — that's standard OS behavior, not a swamp bug. The fix is to make the output messages accurate: user services say 'runs while you are logged in', system services say 'starts automatically at boot'. Add a one-line hint about loginctl enable-linger or system-wide install for users who want boot-time behavior.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.
Sign in to post a ripple.