paperclipai/paperclip · warning
No usable systemd user manager was detected (common in conta
Error message
No usable systemd user manager was detected (common in containers and WSL1). Use paperclipai run instead.
What it means
On Linux, detectServiceManager probes for a systemd user session by running `systemctl --user show-environment`. When that command fails (no user manager bus — typical inside containers, docker exec sessions, WSL1, or SSH sessions without PAM/logind), detection returns { supported: false, reason: 'No usable systemd user manager was detected (common in containers and WSL1). Use paperclipai run instead.' }. Service install is then skipped; the reason is printed only when --install-service was explicit.
Source
Thrown at cli/src/onboard-service.ts:65
options: OnboardServiceOptions,
dependencies: Partial<OnboardServiceDependencies> = {},
): Promise<boolean> {
const deps = { ...defaultDependencies, ...dependencies };
if (options.installService === false) return false;
const explicitlyRequested = options.installService === true;
const canPrompt = options.yes !== true && deps.isInteractive();
if (!explicitlyRequested && !canPrompt) {
deps.info(
"Background service not installed. Use `paperclipai onboard --install-service` or `paperclipai service install` to opt in.",
);
return false;
}
const instanceId = resolvePaperclipInstanceId();
const detection = await deps.detect(instanceId);
if (!detection.supported) {
if (explicitlyRequested) deps.warn(detection.reason);
return false;
}
if (!explicitlyRequested && !(await deps.confirm())) return false;
await detection.manager.install({ startNow: true, startOnLogin: true });
if (!explicitlyRequested && detection.manager.enableLinger && await deps.confirmLinger()) {
await detection.manager.enableLinger();
}
deps.success(`Installed and started ${detection.manager.serviceName}.`);
return true;
}
View on GitHub (pinned to 120ae5428f)
Solutions
- Run in the foreground: `paperclipai run`.
- If you need it to survive logout on a real linux host: get a proper login session (SSH/console login), optionally `loginctl enable-linger $USER`, and retry — `systemctl --user show-environment` must succeed first.
- In containers, rely on the container supervisor (docker --restart, k8s) instead of a user service.
- Verify quickly: systemctl --user show-environment; echo $? — the service path activates only when this works.
Example fix
# before $ paperclipai onboard --install-service ! No usable systemd user manager was detected (common in containers and WSL1). Use paperclipai run instead. # after (real linux host) $ ssh user@host # proper PAM session $ loginctl enable-linger $USER $ systemctl --user show-environment && paperclipai onboard --install-service
Defensive patterns
Strategy: type-guard
Validate before calling
import { execFileSync } from "node:child_process";
let systemdUserOk = false;
try { execFileSync("systemctl", ["--user", "show-environment"], { stdio: "ignore" }); systemdUserOk = true; } catch {}
if (!systemdUserOk) {
// containers/WSL1/no-PAM sessions: use `paperclipai run` instead of service install
} Type guard
type Detection = { supported: true; manager: { install(o: object): Promise<void> } } | { supported: false; reason: string };
const isServiceUnavailable = (d: Detection): d is { supported: false; reason: string } =>
d.supported === false;
// then branch on the reason string to hint foreground run vs linger fix Prevention
- Verify `systemctl --user show-environment` succeeds in the exact session before relying on service install.
- Use real SSH/console logins (PAM) and `loginctl enable-linger` for headless linux hosts.
- Inside Docker/WSL1, standardize on `paperclipai run` under the container/process supervisor.
- Test service install once per environment type in CI to catch user-bus gaps early.
When it happens
Trigger: `paperclipai onboard --install-service` (or service install) on Linux inside Docker/WSL1, or any session where XDG_RUNTIME_DIR/dbus user session is missing so `systemctl --user` exits non-zero.
Common situations: Docker containers without systemd; `docker exec` shells; WSL1; sudo/su sessions that drop the user bus env; minimal VMs without logind.
Related errors
- Service management is not supported on ${platform}. Use pape
- Import cancelled.
- Could not open your browser automatically. Open this URL man
- Unknown config key ${warning.path}; did you mean ${warning.s
- SSH fixture prerequisites are incomplete: ${status.ssh.reaso
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/7735dbdd74b64642.
Report an issue: GitHub.