docker is the default value of SANDBOX_PROVIDER, so a self-hosted traceroot uses it with no extra account or API key.
This page is for a self-hosted traceroot run from its repository. See Self-Hosting to get traceroot running first.
Requirements
- traceroot run from its repository with
make devor the Docker Compose stack (make prod), and a model provider key for the agent. - A running Docker daemon. Under
make dev, the agent calls thedockerCLI on your computer. In the Docker Compose stack, the agent container has the CLI installed and reaches the host’s daemon through/var/run/docker.sock. - Outbound network access from containers, so the sandbox can install its tools and clone your repository.
Set up
Docker is used whenSANDBOX_PROVIDER is unset. To state it in .env at the root of the repository:
Verify
-
In the traceroot UI: open the agent and ask it to run
cat /etc/os-releasein its sandbox. The answer names Ubuntu 24.04. -
On the Docker host: list the sandbox containers. Each one is named
traceroot-sandbox-followed by a timestamp. -
In the agent’s log: once the container is set up, the log prints
[DockerExecutor] Container ready:followed by the first 12 characters of the container ID.
What the agent sets up
The agent creates the container the first time a session needs its sandbox.
Repository credentials reach
git through environment variables and never appear in a command line. A sandbox that is serving a request is never removed for being idle. The agent also removes its containers when it shuts down, and the Docker Compose stack gives it 60 seconds to finish.
Limitations
- The sandbox shares the host’s kernel. For a sandbox with its own kernel, see smol machines.
- In the Docker Compose stack, the agent controls the host’s Docker daemon through the mounted socket.
SANDBOX_RECLAIM_ON_STARTremoves everytraceroot-sandbox-container the starting agent did not create. Set it tofalsewhen several agents share one Docker host.- A command the agent runs with no timeout of its own ends after 30 seconds.
- Output from a single command is cut off at 10 MB.
Next steps
Root cause analysis
What the agent does in its sandbox when a trace has errors.
GitHub integration
Connect a repository so the agent can clone it into the sandbox.
Self-Hosting
Run traceroot from its repository.
Install Docker
Docker’s guide to installing Docker Desktop or Docker Engine.