Skip to main content
← Back to list
01Issue
BugClosedSwamp CLIPublic
AssigneesNone

Relationships

#2107 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

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)

  1. Enable lingering on daemon enable — call loginctl 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.
  2. 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/, like swamp-serve.service, feedback/gtd-style web servers the user runs the same way).

Context

This surfaced alongside 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. Related: #1391 (ungated enable reports success then fails).

Affected

Anyone running swamp serve via swamp serve daemon enable on Linux 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.

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

9/11/2026, 5:27:07 AM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

svendowideit commented 9/11/2026, 5:27:07 AM

Duplicate of #2106 (I filed this twice by accident). Closing this one — please track the lingering issue at #2106.

Sign in to post a ripple.