ZeroClaw supports Docker in two distinct ways: you can run ZeroClaw itself inside a Docker container, and you can configure ZeroClaw to execute each shell tool call inside a fresh Docker container for sandboxing. The two are independent and can be combined or used separately.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/openagen/zeroclaw/llms.txt
Use this file to discover all available pages before exploring further.
Running ZeroClaw in Docker
The official image is published to the GitHub Container Registry. The default entrypoint runszeroclaw gateway, exposing the webhook server on port 42617.
Quick start with Docker Compose
The fastest way to bring up ZeroClaw in Docker is with the provided Compose file:http://localhost:42617.
The full docker-compose.yml:
ZEROCLAW_ALLOW_PUBLIC_BIND=true is required for container networking. Inside Docker, ZeroClaw must bind to [::] so the published port mapping works. This does not expose the gateway to the public internet — Docker handles the host-side binding.Bootstrap with the install script
Theinstall.sh script includes a --docker flag that builds the image and configures ZeroClaw to use it:
Using Podman instead of Docker
SetZEROCLAW_CONTAINER_CLI to use Podman as the container runtime:
Building the image locally
To build from source instead of pulling the prebuilt image, replace theimage: line in your Compose file:
Dockerfile uses a multi-stage build. Stage one compiles the release binary with rust:1.93-slim. The production stage produces a minimal distroless/cc-debian13:nonroot image — no shell, no package manager, no extra attack surface. A dev stage is also available using debian:trixie-slim with curl included for easier debugging, defaulting to Ollama with llama3.2:
Docker runtime adapter (sandboxed tool execution)
Separately from running ZeroClaw itself in Docker, you can configure ZeroClaw to execute each shell tool call inside a fresh container. This is the Docker runtime adapter, controlled byruntime.kind = "docker".
alpine:3.20. The container is discarded after the command completes.
Configuration options
| Key | Type | Description |
|---|---|---|
image | string | Container image for shell execution |
network | string | Docker network mode. Use "none" to block network access from tool calls |
memory_limit_mb | integer | Memory limit in MB. Omit to use the Docker default |
cpu_limit | float | CPU limit as fractional cores (e.g. 1.0 = one core) |
read_only_rootfs | bool | Mount the container root filesystem as read-only |
mount_workspace | bool | Mount the workspace directory into /workspace inside the container |
allowed_workspace_roots | array | Optional allowlist of directories that may be mounted |
Docker runtime vs native runtime
- Docker runtime
- Native runtime
Use
runtime.kind = "docker" when:- You want strong process isolation for every shell tool call
- You are running untrusted or user-supplied prompts
- You need a reproducible, locked-down execution environment
- You want to prevent tool calls from accessing the host filesystem (
read_only_rootfs = true,network = "none")
Environment variables
| Variable | Description |
|---|---|
API_KEY | LLM provider API key (also accepted as ZEROCLAW_API_KEY) |
PROVIDER | Provider ID (e.g. openrouter, openai, anthropic, ollama) |
ZEROCLAW_GATEWAY_PORT | Gateway port inside the container (default: 42617) |
ZEROCLAW_ALLOW_PUBLIC_BIND | Set to true to allow 0.0.0.0 binding inside Docker |
ZEROCLAW_CONTAINER_CLI | Container CLI binary (default: docker; set to podman for Podman) |
HOST_PORT | Host-side port mapping for Compose (default: 42617) |
Next steps
Running the daemon
Foreground daemon, gateway, agent modes, and cron scheduling
Network configuration
Tunnel providers, reverse proxy, and public bind options
Service management
systemd and OpenRC background service setup
Security overview
Sandbox, allowlists, gateway pairing, and filesystem scoping