Honest assessment
Should you even use Docker?
In our experience, Docker adds a layer of complexity. For some setups it is the right call. For others, the native install is faster and simpler. Here is how we recommend thinking about it.
VPS production server
Running on a Hostinger, DigitalOcean, or any Linux VPS? We recommend Docker here. It gives you reproducible deploys, easy rollbacks, and clean container isolation.
Multi-agent sandboxing
Want isolated tool execution per agent or per session? Docker sandboxes give each agent its own container with locked-down permissions.
Local dev on your Mac
For day-to-day development on your own machine, we recommend skipping Docker. The native Node install gives you a faster feedback loop and no container overhead.
Quick testing or demos
Just want to try OpenClaw? Use the standard installer. Docker is for when you have already decided on containerized deployment.
Quick start
One script. Fully configured.
The docker-setup.sh script handles the entire setup. Build, configure, launch.
OPENCLAW_DOCKER_APT_PACKAGESBake extra apt packages into the image at build time
OPENCLAW_EXTRA_MOUNTSComma-separated host bind mounts for both gateway and CLI
OPENCLAW_HOME_VOLUMENamed volume for /home/node so caches survive restarts
New to OpenClaw? The $19 workshop walks you through the full setup from scratch, including Docker configuration. 15 minutes, lifetime access.
Learn MoreArchitecture
Two ways to use Docker
You can run the entire Gateway in Docker, or keep the Gateway on your host and only use Docker for sandboxed tool execution. We have tested both extensively. Each approach has distinct tradeoffs.
Sandbox security
Locked down by default
In our testing, OpenClaw sandbox containers go well beyond basic Docker. They ship with defense-in-depth hardening, and every sandbox starts with the smallest attack surface possible.
capDrop: ALLEvery Linux capability is dropped. The container cannot change system settings, mount filesystems, or escalate privileges.
readOnlyRoot: trueThe root filesystem is read-only. The only writable locations are /tmp, /var/tmp, /run (tmpfs), and the mounted workspace.
network: "none"No network access by default. The sandbox cannot reach the internet, your LAN, or the host. You must opt-in for egress.
seccomp profileOptional seccomp JSON profile restricts which system calls the container can make. Block ptrace, mount, and other sensitive syscalls.
user: 1000:1000Runs as an unprivileged user by default. Never root inside the sandbox unless you explicitly override for package installs.
pidsLimit: 256Process count is capped at 256. Fork bombs and runaway processes cannot consume host resources.
Additional hardening options include AppArmor profiles, memory and CPU limits, ulimit overrides (nofile, nproc), DNS pinning, and custom extra hosts. All configured under agents.defaults.sandbox.docker in your openclaw.json.
Want us to walk you through all of this?
The Operator Vault workshop covers Docker setup, security configuration, and your first working agent. Our team guides you through every step.
Reference config
Docker Compose, annotated
Key detail: The port binding uses 127.0.0.1: prefix so the gateway is only reachable from localhost. Access it remotely via SSH tunnel or Tailscale VPN. Never expose port 18789 to the public internet without authentication configured.
Multi-agent profiles
Three agents. Three trust levels.
Run mixed access levels from a single gateway. Each agent gets its own sandbox profile, tool permissions, and workspace access.
Channels
Pair your channels from Docker
WhatsApp, Telegram, Discord. We have tested all three from Docker and each one takes a single command to configure.
Scan the QR code with your phone to pair WhatsApp.
Telegram
Get your bot token from @BotFather on Telegram.
Discord
Create a bot in the Discord Developer Portal first.
Troubleshooting
Common issues, quick fixes
EACCES: permission denied on /home/node/.openclawWhy: Host bind mounts are not owned by uid 1000 (the container's node user).
Port 18789 already in useWhy: Another process or a previous container is still bound to the gateway port.
Sandbox image not found: openclaw-sandbox:bookworm-slimWhy: The sandbox image has not been built yet on this host.
Volume mount not working on macOSWhy: Docker Desktop requires explicit sharing of host directories.
Gateway says 'unauthorized' or 'disconnected (1008)'Why: The browser device has not been approved, or the gateway token is stale.
Written by
Kevin Jeppesen
Founder, The Operator Vault
Kevin is an early OpenClaw adopter who has saved an estimated 400 to 500 hours through AI automation. He stress-tests new workflows daily, sharing what actually works through step-by-step guides and a security-conscious approach to operating AI with real tools.
Docker FAQ
Docker-specific questions
Docker + VPS =
always-on AI agent for $5/month.
Our workshop walks you through OpenClaw setup from scratch. Install it, configure it, and send your first command. 15 minutes, $19, lifetime access.
