atuinsh/atuin · error

daemon autostart is incompatible with…

Error message

daemon autostart is incompatible with `daemon.systemd_socket = true`; use systemd to manage the daemon

What it means

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.

Solutions

  1. Disable autostart in ~/.config/atuin/config.toml: set `[daemon] autostart = false`.
  2. Keep `systemd_socket = true` and rely on the systemd socket unit to run the daemon.
  3. Or, if you want autostart, remove `systemd_socket = true` from the daemon config section.
  4. Run `systemctl --user start atuin-daemon.socket` (or your unit name) so the daemon is available.

Example fix

// before (config.toml)
[daemon]
autostart = true
systemd_socket = true
// after
[daemon]
autostart = false
systemd_socket = true
Defensive patterns

Strategy: validation

Validate before calling

# detect the conflict before running atuin commands
awk '/^\[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 \
  && echo "conflict: disable autostart when systemd_socket=true"

Prevention

When it happens

Trigger: Running any client command that triggers `ensure_daemon_running` while the config contains `daemon.systemd_socket = true` and `daemon.autostart = true`.

Common situations: 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.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of atuinsh/atuin@900007c480 (2026-09-19). Data as JSON: /api/errors/9b266854d1db1bea. Report an issue: GitHub.

Appendix: source

Thrown at crates/atuin/src/command/client/daemon.rs:359

                    }
                }
            },
            timeout,
        )
        .await
        .unwrap_or_else(|last| {
            Err(last.wrap_err(format!(
                "timed out waiting for daemon startup after {}ms",
                timeout.as_millis()
            )))
        })
}

#[allow(clippy::unnecessary_wraps)]
fn ensure_autostart_supported(settings: &Settings) -> Result<()> {
    #[cfg(unix)]
    if settings.daemon.systemd_socket {
        bail!(
            "daemon autostart is incompatible with `daemon.systemd_socket = true`; use systemd to \
             manage the daemon"
        );
    }
    #[cfg(not(unix))]
    let _ = settings;

    Ok(())
}

/// Ensure the daemon is running, starting it if necessary.
///
/// If the daemon is already running and up-to-date, this is a no-op.
/// If it is not running or needs a restart, this will spawn a new daemon
/// process and wait for it to become ready.
///
/// Returns an error if the daemon could not be started.
pub async fn ensure_daemon_running(settings: &Settings) -> Result<()> {

View on GitHub (pinned to 900007c480)