Skip to content
Latchkey

Dagger "failed to start engine" in CI

The Dagger CLI created the engine container but it exited or never became ready. This is distinct from a connection failure: Docker is present, but the engine itself could not initialize because of privileges, resources, or a bad state.

What this error means

dagger fails with "failed to start engine" and the engine container exits shortly after creation, or never reports ready.

dagger
Error: failed to start engine: container dagger-engine exited: buildkitd: failed to create runc rootless: operation not permitted

Common causes

The engine lacks required privileges

The Dagger Engine embeds BuildKit and needs privileges to set up its runtime. An unprivileged container blocks initialization.

A corrupt engine state or resource limit

A stale engine volume or an out-of-resource runner can keep the engine from starting cleanly.

How to fix it

Run the engine privileged

  1. Ensure the engine container runs privileged.
  2. Remove a stale engine container and volume to reset state.
  3. Re-run so the CLI provisions a fresh engine.
Terminal
docker rm -f dagger-engine
docker volume rm dagger-engine-state || true
dagger call build

Inspect the engine logs

Read the engine container logs to see the exact initialization failure.

Terminal
docker logs dagger-engine

How to prevent it

  • Grant the engine the privileges it needs.
  • Reset a stale engine volume when the engine wedges.
  • Size runners for the engine plus your pipeline.

Frequently asked questions

What causes "Dagger "failed to start engine""?
The Dagger Engine embeds BuildKit and needs privileges to set up its runtime. An unprivileged container blocks initialization.
How do I fix Dagger "failed to start engine"?
Run the engine privileged

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card