{"record":{"id":"9b266854d1db1bea","repo":"atuinsh/atuin","slug":"daemon-autostart-is-incompatible-with-daemon-syst","errorCode":null,"errorMessage":"daemon autostart is incompatible with `daemon.systemd_socket = true`; use systemd to manage the daemon","messagePattern":"daemon autostart is incompatible with `daemon\\.systemd_socket = true`; use systemd to manage the daemon","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin/src/command/client/daemon.rs","lineNumber":360,"sourceCode":"                    }\n                }\n            },\n            timeout,\n        )\n        .await\n        .unwrap_or_else(|last| {\n            Err(last.wrap_err(format!(\n                \"timed out waiting for daemon startup after {}ms\",\n                timeout.as_millis()\n            )))\n        })\n}\n\n#[allow(clippy::unnecessary_wraps)]\nfn ensure_autostart_supported(settings: &Settings) -> Result<()> {\n    #[cfg(unix)]\n    if settings.daemon.systemd_socket {\n        bail!(\n            \"daemon autostart is incompatible with `daemon.systemd_socket = true`; use systemd to \\\n             manage the daemon\"\n        );\n    }\n    #[cfg(not(unix))]\n    let _ = settings;\n\n    Ok(())\n}\n\n/// Ensure the daemon is running, starting it if necessary.\n///\n/// If the daemon is already running and up-to-date, this is a no-op.\n/// If it is not running or needs a restart, this will spawn a new daemon\n/// process and wait for it to become ready.\n///\n/// Returns an error if the daemon could not be started.\npub async fn ensure_daemon_running(settings: &Settings) -> Result<()> {","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/atuinsh/atuin/blob/c0c717ab04c881764bcad4b3d169a507e2432643/crates/atuin/src/command/client/daemon.rs#L342-L378","documentation":"Before auto-starting the daemon, atuin checks that the configuration allows it. If `daemon.systemd_socket = true`, the daemon is expected to be socket-activated and managed by systemd; atuin refuses to spawn/autostart it itself because it would not bind the systemd-provided socket correctly.","triggerScenarios":"Running any command that triggers ensure_daemon_running (client commands needing the daemon) while config.toml contains `[daemon] systemd_socket = true` and the daemon is not already running and autostart kicks in.","commonSituations":"Copying a config with systemd_socket = true onto a machine without the corresponding systemd socket units enabled; enabling systemd_socket but forgetting `systemctl enable --now atuin-daemon.socket`; running the CLI in a container/WSL where systemd units are absent.","solutions":["Start the daemon via systemd: `systemctl enable --now atuin-daemon.socket` (and the service), then rerun the command.","If you do not use systemd socket activation, set `daemon.systemd_socket = false` in ~/.config/atuin/config.toml.","If you don't want any autostart, run the daemon manually: `atuin daemon start`.","Verify the socket unit matches the expected path (`atuin daemon` docs) — mismatched paths cause systemd to hold a socket the CLI can't find."],"exampleFix":"// config.toml before\n[daemon]\nsystemd_socket = true\n// error: daemon autostart is incompatible with daemon.systemd_socket = true\n// after (option A): systemctl enable --now atuin-daemon.socket\n// after (option B)\n[daemon]\nsystemd_socket = false\nautostart = true","handlingStrategy":"validation","validationCode":"if grep -q 'systemd_socket = true' ~/.config/atuin/config.toml; then\n  systemctl is-active --quiet atuin-daemon.socket || { echo 'enable atuin-daemon.socket first' >&2; exit 1; }\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only set daemon.systemd_socket = true on hosts where the systemd socket unit is installed and enabled.","Pair the config flag with `systemctl enable --now atuin-daemon.socket` at provisioning time.","In containers/WSL without systemd, keep systemd_socket = false."],"tags":["daemon","systemd","config-conflict","autostart"],"backgroundTag":"conflicting-config-options","analyzedSha":"c0c717ab04c881764bcad4b3d169a507e2432643","analyzedAt":"2026-09-12T07:40:01.341Z","contentChangedAt":"2026-09-12T07:40:01.341Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}