Local Docker

The default provider — one local container per box, isolated by a per-box git branch

Local Docker is the default — no --provider flag needed. agentbox claude and agentbox create use it out of the box. Everything runs on your own machine, so a box is free and instant but only lives while your laptop is on and shares its CPU/RAM.

Each box is one local container. /workspace is an in-container git worktree on branch agentbox/<box-name>, and the host's .git/ is bind-mounted so commits land on the host immediately. It's fast, free, and fully local. It's the docker row of the provider matrix — see core-concepts for the box model, or reach for a cloud alternative with hetzner, daytona, or vercel.

Requirements

  • macOS (arm64 or Intel) or Linux.
  • A Docker engine: Docker Desktop or OrbStack.
  • Node >=22.12.
  • First create pulls (or builds) the agentbox/box:dev image, a one-time ~1 GB cost covered below.

Install the CLI and run the setup wizard:

npm -g install @madarco/agentbox
agentbox install

agentbox install is the interactive wizard. Right after its system check it offers Portless (default yes on macOS with Docker Desktop), so box web apps get https://<box-name>.localhost instead of a random loopback port (see web apps). Verify your host is ready with agentbox doctor.

TIP

On macOS, OrbStack is recommended — it's lighter than Docker Desktop and enables per-box .orb.local web URLs and Portless integration with no extra setup.

Installation basics are also covered in teleport-a-project; override the engine with engine.kind in configuration.

Which engine you are on is read off the daemon itself — docker info's operating system, matched against OrbStack and Docker Desktop — and it decides host-side conventions like a box's .orb.local URL. It is resolved once per process, so after switching engines restart the two long-running ones (agentbox hub restart, agentbox relay restart) or they keep minting URLs for the engine they started on. Boxes created on the old engine stay on it — that daemon still owns their containers. Pin the answer with engine.kind to take the detection out of the loop.

First-run image

On first use the CLI pulls the agentbox/box:dev image from public GHCR (no docker login needed) and retags it locally; only on a pull miss does it build locally. The first box pays the one-time ~1 GB cost — later boxes reuse the cached image and start fast.

# First box pulls (or builds) agentbox/box:dev automatically
agentbox claude

Use --build to force a local build, or set box.imageRegistry to an empty string to always build locally — see configuration for all flags. Cloud providers bake their images differently via agentbox prepare (see cli).

Resource limits

Docker boxes default to unlimited. Cap a box's resources with --memory, --cpus, --disk — see configuration for all keys and defaults.

agentbox create --memory 4g --cpus 2

Watch live per-box usage (cpu/mem/pids/disk) with agentbox top. Cloud sizing uses box.size / --size on hetzner and daytona.

Pause and resume

Inactive boxes are docker paused, not stopped — RAM stays mapped, so docker unpause resumes instantly with no cache rehydration. Switching is sub-second. agentbox stop / agentbox start also work; /workspace survives both.

agentbox pause 1
agentbox unpause 1

TIP

Switching agents? Just attach to another box — AgentBox pauses the one you leave and unpauses the one you enter. See background-and-parallel and access-your-box.

Shared docker cache

Each box runs its own in-box dockerd. The --shared-docker-cache flag instead routes all boxes to one shared volume that's preserved on destroy/prune, for faster rebuilds.

agentbox claude --shared-docker-cache

HEADS UP

With --shared-docker-cache, only one box may run at a time — the shared volume can't be safely mounted by concurrent boxes.

In-box docker details live in docker-in-docker.

Web URLs

agentbox url <box> opens the box's web app at its OrbStack .orb.local, Portless .localhost, or loopback address — see web-apps-and-tunnels for the full URL and expose model.

agentbox url 1

Lifecycle and state

/workspace lives in the container's writable layer (not a volume), so node_modules, .next, target, and .venv all land there. It survives pause and stop, and is wiped on agentbox destroy.

Capture warm state to start future boxes fast with agentbox checkpoint create <box> --set-default. Checkpoint after your setup wizard runs to carry build caches into every new box. See checkpoints-and-pausing.

Orphaned processes are reaped. A box runs with docker run --init, so Docker's built-in init is the container's PID 1, and background jobs an agent leaves behind don't pile up as zombies. If your engine doesn't ship docker-init, the box starts without it and create prints a warning. In that case, set "init": true in the engine's /etc/docker/daemon.json to get the same effect.

The bind-mounted host .git/ means commits land on the host immediately; pushes go through the host relay, so no credentials live in the box (see sync-and-git). Inspect a box's files on the host with agentbox open or agentbox download.

The box and your host share that .git/ but not each other's worktree folders, so AgentBox keeps git cleanup on either side from deleting the other's worktrees. Inside the box, git gc is set never to prune worktrees, so your other host worktrees stay registered. On the host, each live box's worktree is locked (git worktree list shows it as locked, with the reason agentbox box <container>), so a host git gc or git worktree prune leaves it alone. agentbox destroy removes only that box's registration; the agentbox/<box-name> branch stays. Don't run git worktree prune inside a box: it ignores the gc setting and would unregister your host worktrees.

Specs

Spec
Base imageagentbox/box:dev (Debian-based)
Build methodPulled from GHCR by build-context fingerprint; built locally on a pull miss (--build forces)
Docker-in-DockerYes (always-on in-box dockerd)
SSHAlways-on sshd, published on 127.0.0.1 only (powers agentbox open sshfs + Codex); attach still uses Docker exec + TTY bridge
ArchHost-native (arm64 on Apple Silicon, amd64 on Intel/Linux)
Live snapshotsInstant docker pause/unpause (cgroup freezer); checkpoints are layered docker commit
Preview URLhttps://<box-name>.localhost (Portless) + mapped loopback ports

On this page