> ## Documentation Index
> Fetch the complete documentation index at: https://axe-engine.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Build the default image, copy the static binaries into your own image or rootfs, or build from source.

Each release publishes prebuilt images and binaries. The sections after [Prebuilt images](#prebuilt-images) build the same artifacts from a checkout:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
git clone https://github.com/vincent0426/axe.git
cd axe
```

## Prebuilt images

Each release publishes images to the GitHub Container Registry and attaches static binaries to its [GitHub release](https://github.com/vincent0426/axe/releases).

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
docker run --rm -p 8080:8080 -p 9090:9090 ghcr.io/vincent0426/axe:latest
```

| Image | Contents |
| - | - |
| `ghcr.io/vincent0426/axe:X.Y.Z` | The [default image](#the-default-image). Also tagged `X.Y` and `latest`, except for prereleases. |
| `ghcr.io/vincent0426/axe:X.Y.Z-static` | The [static binaries](#the-static-binaries) alone. |

Both are built for `linux/amd64` and `linux/arm64`. Each release also attaches `axed` and `axectl` as static musl archives for `x86_64` and `aarch64`, a `SHA256SUMS` file and an SPDX SBOM. Each release signs its images and checksums with Sigstore keyless signing and records build provenance.

## The default image

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
docker build -t axe .
```

The default target matches sandboxd's runtime image, so Agent Sandbox manifests work with it unchanged:

| Setting | Value |
| - | - |
| Base | `debian:bookworm-slim`, with `ca-certificates` and `procps` |
| User | `1000` |
| Working directory | `/workspace`, owned by 1000:1000 |
| Ports | `8080` (REST), `9090` (gRPC) |
| Binaries | `/usr/local/bin/axed` and `/usr/local/bin/axectl` |
| sandboxd path | `/usr/local/bin/sandboxd`, a symlink to `axed` |
| Entrypoint | `/usr/local/bin/axed` |

Arguments after the image name go to axed:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
docker run --rm -p 8080:8080 -p 9090:9090 axe --log-format text
```

To add tools for your agent, build your own image `FROM` this one, switching to root for the install and back to user 1000.

User 1000 has no entry in `/etc/passwd`, as in sandboxd's image, so processes get `HOME=/`, which they cannot write. Tools that write to the home directory, such as `pip install --user`, `npm install` and `git config --global`, fail with permission errors. Give the user a home directory when you add tools:

```dockerfile theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
FROM axe
USER root
RUN apt-get update && apt-get install -y --no-install-recommends python3-pip nodejs npm git \
    && rm -rf /var/lib/apt/lists/* \
    && useradd --uid 1000 --user-group --create-home agent
USER 1000
```

Processes then get `HOME=/home/agent`. Without rebuilding, pass `HOME` in the request's environment instead, for example `HOME=/workspace`.

## The static binaries

The `static` target holds only the two binaries, built for musl and statically linked, at `/axed` and `/axectl`:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
docker build --target static -t axe:static .
```

Copy them into any image:

```dockerfile theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
FROM your-app-image
COPY --from=axe:static /axed /axectl /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/axed"]
```

Or extract them to a directory, for example to build a microVM root filesystem:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
cid=$(docker create axe:static)
docker cp "$cid:/axed" rootfs/usr/local/bin/
docker cp "$cid:/axectl" rootfs/usr/local/bin/
docker rm "$cid"
```

The binaries need no shared libraries, so they run on any Linux distribution, including busybox and distroless images. [Firecracker](https://axe-engine.mintlify.site/deploy/firecracker.md) shows a complete rootfs.

## Build from source

AXE builds and runs on Linux only. The workspace needs Rust 1.88 or later.

> [tab] Linux
>
> ```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> cargo build --release -p axed -p axectl
> ```
>
> The binaries are in `target/release/`. They link against your system's libc. For static binaries, use the `static` image target, which builds against musl.

> [tab] macOS
>
> `scripts/dev` runs any command in a Linux toolchain container, with the repository mounted and the cargo cache in Docker volumes:
>
> ```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> scripts/dev cargo build --release -p axed -p axectl
> scripts/dev cargo test --workspace
> ```
>
> The build output lives in a Docker volume for each checkout (`scripts/dev --target-volume` prints its name), not on your Mac. To run the cgroup tests too, give the container a delegated cgroup:
>
> ```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> AXE_DEV_DOCKER_ARGS="--privileged --cgroupns=private" scripts/dev cargo test --workspace
> ```

## Architectures

A local build targets the architecture of the machine that builds it, for example `x86_64` on most Linux servers and `aarch64` (arm64) on Apple silicon through Docker. The repository has no cross-compilation setup; to get binaries for another architecture, use the [prebuilt images and binaries](#prebuilt-images), which cover both, or build on a machine of that architecture or under emulation.

## Next steps

* [Quickstart](https://axe-engine.mintlify.site/quickstart.md): drive the daemon with `axectl`.
* [Platform requirements](https://axe-engine.mintlify.site/reference/platform-requirements.md): what AXE needs from the kernel.
* [axed reference](https://axe-engine.mintlify.site/reference/axed.md): every flag.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.