Clawdbot Docker Installation
Install and run Clawdbot AI assistant in Docker containers. Containerized gateway setup with Docker Compose.
Clawdbot Docker Overview
Docker is optional for Clawdbot. Use it only if you want a containerized gateway or to validate the Docker flow.
Is Docker Right for Me?
| Use Case | Recommendation |
|---|---|
| Isolated, throwaway gateway environment | Yes, use Docker |
| Run Clawdbot on host without local installs | Yes, use Docker |
| Running on your own machine for fastest dev loop | No, use normal install |
Note: Agent sandboxing uses Docker too, but it does not require the full gateway to run in Docker.
Requirements
- Docker Desktop (or Docker Engine) + Docker Compose v2
- Enough disk space for images + logs
Containerized Gateway (Docker Compose)
Quick Start (Recommended)
From repo root:
./docker-setup.shThis script:
- Builds the gateway image
- Runs the onboarding wizard
- Prints optional provider setup hints
- Starts the gateway via Docker Compose
- Generates a gateway token and writes it to
.env
Optional environment variables:
| Variable | Description |
|---|---|
CLAWDBOT_DOCKER_APT_PACKAGES | Install extra apt packages during build |
CLAWDBOT_EXTRA_MOUNTS | Add extra host bind mounts |
CLAWDBOT_HOME_VOLUME | Persist /home/node in a named volume |
After it finishes:
- Open http://127.0.0.1:18789/ in your browser
- Paste the token into the Control UI (Settings → token)
Need the tokenized URL again?
docker compose run --rm clawdbot-cli dashboard --no-openManual Flow (Compose)
docker build -t clawdbot:local -f Dockerfile .
docker compose run --rm clawdbot-cli onboard
docker compose up -d clawdbot-gatewayControl UI Token + Pairing (Docker)
If you see "unauthorized" or "disconnected (1008): pairing required":
docker compose run --rm clawdbot-cli dashboard --no-open
docker compose run --rm clawdbot-cli devices list
docker compose run --rm clawdbot-cli devices approve <requestId>Extra Mounts (Optional)
Mount additional host directories into containers:
export CLAWDBOT_EXTRA_MOUNTS="$HOME/.codex:/home/node/.codex:ro,$HOME/github:/home/node/github:rw"
./docker-setup.shPersist Container Home (Optional)
Persist /home/node across container recreation:
export CLAWDBOT_HOME_VOLUME="clawdbot_home"
./docker-setup.shInstall Extra Packages (Optional)
Install system packages inside the image:
export CLAWDBOT_DOCKER_APT_PACKAGES="ffmpeg build-essential"
./docker-setup.shAgent Sandbox (Docker Tools)
Clawdbot can use Docker for agent sandboxing, isolating agent tools in containers.
What It Does
- Runs agent tools (exec, browser, etc.) in isolated Docker containers
- Provides security boundaries between agents
- Allows per-agent sandbox profiles
Enable Sandboxing
In your clawdbot.json:
{
"agents": {
"defaults": {
"sandbox": {
"mode": "non-main"
}
}
}
}Build the Sandbox Image
clawdbot sandbox buildPer-Agent Sandbox Profiles
{
"routing": {
"agents": {
"main": {
"workspace": "~/.clawdbot/workspace",
"sandbox": {
"mode": "off"
}
},
"untrusted": {
"sandbox": {
"mode": "always"
}
}
}
}
}Health Check
docker compose run --rm clawdbot-cli health
docker compose run --rm clawdbot-cli statusTroubleshooting
Permission Errors (EACCES)
If you see permission errors, check that the mounted directories have correct permissions.
Container Won't Start
- Check Docker logs:
docker compose logs clawdbot-gateway - Verify port 18789 is not in use
- Ensure Docker has enough resources
Token Issues
Regenerate the gateway token:
docker compose run --rm clawdbot-cli configure --reset-tokenNext Steps
- Clawdbot Installation - Other install methods
- Clawdbot Gateway - Gateway configuration
- Clawdbot Setup - Complete setup guide