Skip to main content
← Back to list
01Issue
FeatureShippedSwamp Club
Assigneesstack72

Relationships

#980 Docs: add swamp worker daemon enable/disable/status to worker-commands reference

Opened by stack72 · 7/5/2026· Shipped 7/5/2026

Summary

Phase 3 PR2 (#979) added `swamp worker daemon enable/disable/status` commands for running workers as systemd/launchd services. The worker-commands reference page needs a new section.

Change needed

`content/manual/reference/remote-execution/worker-commands.md`

Add a `swamp worker daemon` section (after `swamp worker list` and before `swamp serve`) with three subcommands:

`swamp worker daemon enable`

``` swamp worker daemon enable [url] --token [--label k=v ...] [--cache-dir ] [--max-dispatches ] [--idle-timeout ] ```

Generates and installs a systemd unit (Linux) or launchd plist (macOS) that runs `swamp worker connect` as a system service.

Flags table (same as `worker connect` — URL, token, labels, cache-dir, max-dispatches, idle-timeout, data-plane-url, no-reconnect).

Key service settings to document:

  • `KillSignal=SIGTERM` — triggers graceful drain (finishes in-flight work before stopping)
  • `TimeoutStopSec=300` — 5-minute window for drain to complete
  • `Restart=on-failure` (systemd) / `KeepAlive: {SuccessfulExit: false}` (launchd) — restarts on crashes, not on policy-complete exits (drain, max-dispatches, idle-timeout)
  • Token and other secrets go in environment directives inside the unit file (mode 0600), not in ExecStart/ProgramArguments

Note: `--cache-dir` should point to a stable path (e.g., `/var/lib/swamp-worker`) for daemon mode so the machine identity survives restarts.

Example: ```bash swamp worker daemon enable wss://orch:9090 \ --token pool.secret \ --label tier=ci --label region=us-east \ --cache-dir /var/lib/swamp-worker \ --idle-timeout 30m ```

`swamp worker daemon disable`

``` swamp worker daemon disable ```

Stops the service and removes the unit file.

`swamp worker daemon status`

``` swamp worker daemon status [--json] ```

Shows whether the daemon is installed, running, its PID, and log location. JSON mode returns structured output.

Files verified as needing NO changes

  • `reference/swamp-serve/serve-flags.md` — daemon is worker-side
  • `reference/remote-execution/enrollment-tokens.md` — no token lifecycle changes
  • `reference/remote-execution/failure-semantics.md` — drain behavior already documented by #977

Context

Ship alongside or shortly after #979 merges. The commands are marked EXPERIMENTAL in the CLI help text.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

7/5/2026, 9:51:39 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/5/2026, 9:33:10 PM

Sign in to post a ripple.