← Back to list
01Issue
FeatureOpenSwamp CLIPublic
AssigneesNone
Relationships
#4866 Docs: autoupdate can restart worker and serve daemons, and set up non-interactively
Opened by stack72 · 11/18/2026
swamp-club#4862 and swamp-club#4870 (shipped in swamp-club/swamp#3855) change content/manual/reference/operational-commands.md (swamp update, config and worker daemon sections):
- swamp update options table: add --cadence <hourly|daily|weekly>, used with --setup-auto to set up autoupdate without a prompt (provisioning hosts). Ownership and writability checks still apply.
- config keys table: add update.restart-daemons (enabled|disabled, default disabled). After a background update installs a new version, swamp restarts running worker and serve daemons in the same scope as the autoupdate scheduler (system units for a root-owned binary, user units otherwise). The worker drains first (up to 300 s). A serve restart drops open clients and, in team mode, hands off the writer lease. A daemon in the other scope (for example a serve enabled with --user beside a root-owned binary) is not restarted.
- worker daemon enable: without --cache-dir the daemon now gets a stable cache dir, which holds its machine id: /var/lib/swamp-worker (Linux) or /Library/Application Support/swamp-worker (macOS) for a system service, worker-daemon-cache in the swamp data dir for a per-user one. A restart or reboot then re-enrolls as the same machine, so a single-enrollment token keeps working.
- Upgrade note (important): a worker daemon enabled before this release still starts on a fresh temp cache, so every restart gets a new machine id and a single-enrollment token refuses it (the worker then loops on enrollment allowance exhausted). Before turning on update.restart-daemons, re-run swamp worker daemon enable with a new worker token (the old one is bound to the old machine id). Re-enabling also gives macOS worker daemons the 300 s stop timeout instead of launchd's 20 s default.
- Example: one systemd worker per host kept on latest: sudo swamp worker daemon enable --token , then sudo swamp update --setup-auto --cadence daily, then sudo swamp config set update.restart-daemons enabled.
02Bog Flow
Open
No activity in this phase yet.
03Sludge Pulse
Sign in to post a ripple.