Skip to main content

Installation

Dagger needs a container runtime. Docker works out of the box; Podman, nerdctl, and Apple Container also work.

Install the Dagger CLI

The commands below install Dagger v0.21.4, the version this documentation covers.

curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.21.4 BIN_DIR=/usr/local/bin sh

If your user can't write to /usr/local/bin, run the script with sudo -E:

curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.21.4 BIN_DIR=/usr/local/bin sudo -E sh

Verify the installation:

dagger version
# version: v0.21.4

To upgrade or switch versions, re-run the install command with the version you want.

Package managers

Homebrew and winget carry the latest stable release only, which may differ from the version this documentation covers.

brew install dagger/tap/dagger

To run v0.21.4 from a package-managed CLI, set DAGGER_X_RELEASE or pass --x-release. The CLI builds and caches that release on first use, then runs as that version:

# Every command in this shell session
export DAGGER_X_RELEASE=v0.21.4
dagger version

# Or per command
dagger --x-release=v0.21.4 version

Unset the variable or drop the flag to return to the installed version. Commands in this documentation omit the prefix and assume the matching release is active.