OpenClaw on Docker
Run OpenClaw on Docker to set up your AI agent in a clean, portable environment. This guide covers requirements, setup steps, storage, health checks, and common Docker fixes.
What Is OpenClaw on Docker?
OpenClaw is an open-source AI agent framework that helps you build an AI assistant that can actually perform tasks, not just reply with text. It can connect with tools, apps, messaging channels, workflows, and automations for tasks like customer support, reminders, research, developer work, and business operations.
Docker is a platform that runs software inside containers. A container packages the app with the files and dependencies it needs, so the setup is cleaner and more consistent across different machines, servers, or cloud platforms.
OpenClaw on Docker means running OpenClaw inside a Docker container instead of installing everything directly on your system. This helps keep the OpenClaw setup separate, easier to manage, and easier to move from local testing to a VPS or cloud server.
Why Run OpenClaw With Docker?
- Keeps OpenClaw separate from your main system
- Makes setup easier to repeat on another machine
- Helps test plugins, updates, and workflows safely
- Works well for VPS and cloud deployments
- Reduces dependency conflicts
- Makes cleanup easier if something breaks, because apparently software enjoys breaking at the worst possible time
OpenClaw Docker Requirements
Before running OpenClaw on Docker, make sure your system has the basic requirements. Otherwise, Docker will fail and pretend the problem is “technical,” when really the machine is.
- Docker Desktop for Windows and macOS
- Docker Engine for Linux servers
Required for Docker commands, setup script, logs, and health checks.
- At least 2 GB RAM
- 4 GB or more recommended
- Low RAM can cause build failure or exit 137
OpenClaw Docker setup uses Docker Compose v2. User should check with:
docker compose version- Docker images
- Containers
- Logs
- OpenClaw config
- Workspace files
- Plugin data
- OpenAI
- Anthropic
- Gemini
- Ollama
- LM Studio
Docker Setup : Run OpenClaw on Docker
Follow this process to run OpenClaw on Docker using the official Docker setup flow.
First, install Docker on your system.
Use Docker Desktop for Mac.
Go to the official Docker Desktop for Mac page :-
Download the correct version:
- Apple Silicon if your Mac uses M1, M2, M3, or M4
- Intel chip if your Mac is older Intel-based
- Open the downloaded .dmg file.
- Drag Docker.app into the Applications folder.
- Open Docker from Applications.
- Open Docker and wait until it starts.
Open Docker’s official Windows install page :-
- Download Docker Desktop for Windows.
- Run the installer.
- Keep WSL 2 backend enabled if the installer asks.
- Restart your computer if needed.
- Open Docker Desktop and wait until it starts.
Use Docker Engine.
Open Docker’s official Ubuntu install guide :-
For Ubuntu/Debian, after Docker’s repository is set up, install Docker Compose plugin with:
sudo apt-get update
sudo apt-get install docker-compose-pluginOpen terminal and run:
docker --version
docker compose versionYou should see version numbers.
Then run a small Docker test:
docker run hello-worldIf this works, Docker is ready.
Run:
git clone https://github.com/openclaw/openclaw.git
cd openclawFrom the OpenClaw repo folder, run:
./scripts/docker/setup.shThis is the official Docker setup command. It builds the gateway image locally and starts the setup flow.
To avoid building the image locally, use the pre-built image from GitHub Container Registry:
export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest"
./scripts/docker/setup.shThe setup script runs onboarding automatically.
During onboarding, OpenClaw may ask for:
- Model provider API keys
- Gateway setup details
- Basic configuration
- Optional channel setup
The setup script also creates a gateway token and writes it to .env. You need this token to access the Control UI.
After setup, open:
http://127.0.0.1:18789/Paste the gateway token or shared secret when asked.
If you need the dashboard URL again, run:
docker compose run --rm openclaw-cli dashboard --no-openYou can connect OpenClaw to messaging apps.
# WhatsApp QR login
docker compose run --rm openclaw-cli channels login
# Telegram
docker compose run --rm openclaw-cli channels add --channel telegram --token "<token>"
# Discord
docker compose run --rm openclaw-cli channels add --channel discord --token "<token>"OpenClaw’s Docker docs list WhatsApp, Telegram, and Discord channel setup examples.
Check containers:
docker psCheck gateway health:
curl -fsS http://127.0.0.1:18789/healthz
curl -fsS http://127.0.0.1:18789/readyzOpenClaw Docker includes health endpoints for liveness and readiness checks.
OpenClaw Docker stores important data in mounted folders.
Main paths:
OPENCLAW_CONFIG_DIR → /home/node/.openclaw
OPENCLAW_WORKSPACE_DIR → /home/node/.openclaw/workspace
The config folder stores openclaw.json, auth profiles, and .env secrets such as OPENCLAW_GATEWAY_TOKEN. Plugin data also stays under the mounted OpenClaw home folder.
Where OpenClaw Docker Stores Your Data
When you run OpenClaw on Docker, important data is stored in mounted folders on your host machine. This helps your setup survive container restarts or replacement.
The config folder stores OpenClaw setup and account-related files.
It includes:
- OpenClaw settings
- Gateway settings
- Agent settings
- Provider login or API key details
- .env runtime secrets
- Gateway token
Official container path:
/home/node/.openclaw
Host path example:
~/.openclaw
The workspace folder stores files your OpenClaw agent can use or create.
It may include:
- Uploaded files
- Generated files
- Task files
- Agent working files
- Files created during automation
Official container path:
/home/node/.openclaw/workspace
Host path example:
~/.openclaw/workspace
The .env file stores runtime values used by OpenClaw.
Example:
OPENCLAW_GATEWAY_TOKEN=your_gateway_tokenTreat this file like a password file. Do not upload it to GitHub, share it in screenshots, or paste it into public chats.
OpenClaw stores saved provider login or API key details in agent auth profiles.
Example path:
agents/<agentId>/agent/auth-profiles.jsonThis helps OpenClaw remember model provider access after restart.
Installed plugins store their package data inside the mounted OpenClaw home folder. This means plugins should stay available after container replacement if the mount is configured correctly.
OpenClaw can create logs and runtime files over time.
Watch these areas:
- media/
- Session .jsonl files
- cron/runs/*.jsonl
- installed plugin folders
- /tmp/openclaw/
These files can grow over time, so check disk space regularly.
The OpenClaw Docker image runs as the node user with UID 1000. If you get permission errors, make sure your mounted folders are owned by UID 1000.
Example:
sudo chown -R 1000:1000 /path/to/openclaw-config /path/to/openclaw-workspaceWhen Should You Use Docker for OpenClaw?
Use Docker when you want:
- A clean local OpenClaw testing setup
- A repeatable VPS or cloud deployment
- Separate environments for testing and production
- Safer plugin and workflow testing
- Easier version testing
- More control over configuration and storage
Who Should Avoid Docker Setup?
Docker may not be right if you:
- Do not want to use terminal commands
- Do not want to manage ports, volumes, and permissions
- Need OpenClaw running quickly
- Want less maintenance
- Prefer managed hosting
- Need a beginner-friendly setup for business workflows
OpenClaw Docker vs Managed Hosting
| Feature | OpenClaw on Docker | OpenClaw on Ampere.sh |
|---|---|---|
| Setup speed | Slower | Faster |
| Terminal required | Yes | No or minimal |
| Server management | User handles it | Managed |
| Docker knowledge needed | Yes | No |
| Control | High | Medium |
| Best for | Technical users | Beginners, teams, operators |
| Maintenance | Manual | Managed |
| Channel setup | Manual | Easier dashboard flow |
| Good for production | Yes, if configured well | Better for fast production use |
Common OpenClaw Docker Problems and Fixes
| Problem | Simple Fix |
|---|---|
| Docker Compose command not working | Install or update Docker Compose v2. Check with docker compose version. |
| Build fails or shows exit 137 | Use at least 2 GB RAM. For better performance, use 4 GB RAM or more. |
| Control UI asks for token | Use the gateway token created during setup. Check the .env file. |
| Lost Control UI link | Run docker compose run --rm openclaw-cli dashboard --no-open. |
| Pairing required error | List devices and approve the pending request with the OpenClaw CLI. |
| Port already in use | Check if another app is using port 18789. Stop it or change the port. |
| Permission denied / EACCES | Fix folder permissions. Mounted folders may need ownership for user ID 1000. |
| Container shows unhealthy | Check /healthz, /readyz, and container logs. |
| Ollama not reachable | Use host.docker.internal:11434 instead of 127.0.0.1:11434. |
| LM Studio not reachable | Use host.docker.internal:1234 instead of 127.0.0.1:1234. |
Run OpenClaw Without Docker
You do not need Docker to start using OpenClaw. Docker gives you control, but it also adds setup work, port issues, storage handling, updates, logs, uptime checks, and security tasks.
With Ampere.sh, you can run OpenClaw without setting up Docker or managing the server manually. Ampere focuses on faster OpenClaw deployment, less setup friction, and letting users build workflows without server headaches.
Instead of installing Docker and configuring everything manually, you can ask the Ampere bot what you want to connect.
Frequently Asked Questions
Does OpenClaw need Docker?
Should I run OpenClaw in Docker?
Can I run OpenClaw without Docker?
How do I run OpenClaw on Docker?
Why is OpenClaw Docker not working?
Can I run multiple OpenClaw setups with Docker?
Can I run OpenClaw Docker on a VPS?
Also Read
Run OpenClaw Without Managing Docker
Skip Docker setup, server maintenance, port errors, and manual configuration. Launch OpenClaw faster and start building useful AI workflows.
Deploy OpenClaw Now

