atuinsh/atuin · error

daemon autostart is incompatible with `daemon.systemd_socket

Error message

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

What it means

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.

Source

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

                    }
                }
            },
            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 c0c717ab04)

Solutions

  1. Start the daemon via systemd: `systemctl enable --now atuin-daemon.socket` (and the service), then rerun the command.
  2. If you do not use systemd socket activation, set `daemon.systemd_socket = false` in ~/.config/atuin/config.toml.
  3. If you don't want any autostart, run the daemon manually: `atuin daemon start`.
  4. Verify the socket unit matches the expected path (`atuin daemon` docs) — mismatched paths cause systemd to hold a socket the CLI can't find.

Example fix

// config.toml before
[daemon]
systemd_socket = true
// error: daemon autostart is incompatible with daemon.systemd_socket = true
// after (option A): systemctl enable --now atuin-daemon.socket
// after (option B)
[daemon]
systemd_socket = false
autostart = true
Defensive patterns

Strategy: validation

Validate before calling

if grep -q 'systemd_socket = true' ~/.config/atuin/config.toml; then
  systemctl is-active --quiet atuin-daemon.socket || { echo 'enable atuin-daemon.socket first' >&2; exit 1; }
fi

Prevention

When it happens

Trigger: 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.

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

Related errors


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