{"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":359,"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":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/atuinsh/atuin/blob/900007c48045867e7f44b0f9bc55ad9dbe99ee0d/crates/atuin/src/command/client/daemon.rs#L341-L377","documentation":"Daemon autostart (spawning the daemon on demand from CLI commands) conflicts with `daemon.systemd_socket = true`, because with systemd socket activation systemd — not atuin — owns starting and managing the daemon process. `ensure_autostart_supported` bails to force you to use systemd for lifecycle management.","triggerScenarios":"Running any client command that triggers `ensure_daemon_running` while the config contains `daemon.systemd_socket = true` and `daemon.autostart = true`.","commonSituations":"Enabling systemd socket activation in config but forgetting to disable autostart; copying a config with both options set from another machine; migrating to systemd socket mode without cleaning up autostart.","solutions":["Disable autostart in ~/.config/atuin/config.toml: set `[daemon] autostart = false`.","Keep `systemd_socket = true` and rely on the systemd socket unit to run the daemon.","Or, if you want autostart, remove `systemd_socket = true` from the daemon config section.","Run `systemctl --user start atuin-daemon.socket` (or your unit name) so the daemon is available."],"exampleFix":"// before (config.toml)\n[daemon]\nautostart = true\nsystemd_socket = true\n// after\n[daemon]\nautostart = false\nsystemd_socket = true","handlingStrategy":"validation","validationCode":"# detect the conflict before running atuin commands\nawk '/^\\[daemon\\]/{in_d=1} in_d && /autostart *= *true/{a=1} in_d && /systemd_socket *= *true/{s=1} END{exit !(a&&s)}' ~/.config/atuin/config.toml \\\n  && echo \"conflict: disable autostart when systemd_socket=true\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never set autostart and systemd_socket together.","When adopting systemd socket activation, set autostart=false.","Audit configs copied between machines for conflicting daemon options.","Let systemd manage the daemon lifecycle when systemd_socket is on."],"tags":["daemon","config","systemd"],"backgroundTag":"conflicting-config-options","analyzedSha":"900007c48045867e7f44b0f9bc55ad9dbe99ee0d","analyzedAt":"2026-09-19T12:52:51.491Z","contentChangedAt":"2026-09-19T12:52:51.491Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}