Deploy OpenClaw with Docker
A practical summary of when Docker makes sense, what to mount, and how to keep OpenClaw state intact across container restarts.
Why use Docker at all?
Docker is the right next step when local npm install feels too close to your machine state, or when you want a cleaner path from laptop to server.
The Orange Paper frames Docker as useful for:
- environment isolation
- easier migration
- long-running server deployments
The important part is not the container, it is the state
The Docker section in the Orange Paper stresses that two categories of data must persist:
- OpenClaw configuration and runtime state
- the workspace and its files
If you restart containers without the right mounts, you will lose the context that makes OpenClaw useful.
The core compose shape
The guide-level pattern is:
- clone the repository
- run the bundled compose file
- mount persistent volumes
- verify your gateway and UI ports
The Orange Paper references 18789 for the gateway and 3000 for the web UI in the Docker deployment context. Always verify the current compose file before exposing anything publicly.
Variants matter
The Orange Paper notes multiple image variants:
- standard
- slim
- sandbox
- browser-enabled sandbox
Do not overcomplicate this at the start. Use the normal deployment path first, then switch variants only when you know why you need them.
The right order
- Make sure you understand your local model and channel plan.
- Mount persistent state.
- Bring the container up.
- Run diagnostics.
- Only then add channels or remote access.
Where to go next
- Return to the Install Hub
- Open the Hosting Hub
- Read OpenClaw Security & Cost Control