Audience: Engineers who read the official Docker docs yet bounce between local build timeouts, GHCR pull failures, port 18789 conflicts, and volume permissions that block Skills without a single ordered path from clone to Control UI. Outcome: Standardize on docker-setup.sh plus optional OPENCLAW_IMAGE, split work with the Docker production, Docker networking, and volume/permissions guides. Layout: six pitfalls, matrix, six-step runbook, triage table, three KPIs, closing guidance.
The official flow assumes consistent Docker Engine, Compose, disk, and egress. Mixing it with npm-global installs or another compose checkout disguises failures as “OpenClaw is broken.” Six frequent breakers in 2025–2026:
docker build on weak CI networks without switching to OPENCLAW_IMAGE.docker-setup.sh cannot bind Control UI.~/.openclaw permissions—Skills/state writes fail while the UI looks “unresponsive.”compose pull.OPENCLAW_IMAGE (GHCR)Pick one primary path in the change ticket and document rollback on the other—avoid verbal mixing.
| Dimension | Default source build | OPENCLAW_IMAGE pulling GHCR |
|---|---|---|
| Best for | Custom Dockerfile edits, build-cache debugging, or no ghcr egress | Fastest time-to-UI, constrained bandwidth, CI that caches images not repos |
| Prereqs | Enough local CPU/RAM; multi-GB layer cache headroom | Reachable ghcr.io or internal mirror; pin tags beyond bare latest |
| Risks | Build timeouts, cache bloat, CPU contention | Auth/rate limits, tag drift, config skew vs binary |
| Rollback | Switch to prebuilt image while keeping the same data volume path | Revert to previous digest or return to source build; log compose changes |
Note: Upstream repos evolve; commands below assume a checkout with docker-setup.sh at the repo root—record commit and script path if your fork differs.
docker version and Compose v2; reserve disk for layers/volumes (align with the production resource table).docker-setup.sh is executable (chmod +x if needed).export OPENCLAW_IMAGE=ghcr.io/openclaw/openclaw:latest—pin digest or stable tags in production instead of only moving tags../docker-setup.sh; logs should show pull/build and compose up without an immediate non-zero exit.http://127.0.0.1:18789 (if your revision changes the port, follow that build); verify the page loads, not connection refused.# Prefer GHCR prebuilt (replace tag per your policy) export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest" ./docker-setup.sh # After success, Control UI should load (example port 18789) # open http://127.0.0.1:18789
Walk top to bottom; do not change image, network, and volumes simultaneously.
| Symptom | Check first | Also read |
|---|---|---|
| Build timeout / OOM | Switch to OPENCLAW_IMAGE; cap buildkit parallelism; prune cache | Docker production (resources) |
| 401/403/TLS on pull | Proxy allowlists for ghcr.io; internal mirror—not the npm registry alone | Npm install runbook (proxy) |
address already in use :18789 | docker ps for stale containers; stop old compose or remap port per docs | Docker networking |
| Permission denied writing volumes | Host UID/GID vs container user; named vs bind mounts | Volume/Skills checklist |
| UI loads but channel silent | Rule out model/channel layers; then token/WS codes | Pairing/token |
~/.openclaw (or team path) to compose mounts; snapshot size and permissions before/after upgrades.If upstream release notes disagree, trust upstream; this article supplies engineering checkpoints.
Sleep, fragmented disks, and leftover Docker Desktop experiments fight dedicated CPU, stable egress, auditable volumes, and token boundaries. Ephemeral containers without pinned digests, volume contracts, or health checks fail on first real traffic.
Teams hosting Gateway long-term on stable Apple Silicon benefit from MACCOME cloud Macs with multi-region choice and flexible rental terms after this shortest loop—review public rental rates and the help center alongside Docker production and pairing articles.
Pilot: run all six steps on a dedicated remote host, record digest and volume snapshots, then decide monthly/quarterly terms and monitoring.
FAQ
Read this or Docker production first?
Use this runbook for the first successful UI path; use production for change windows, rollback, and monitoring. Rates: Mac mini rental rates.
Does OPENCLAW_IMAGE conflict with npm-global CLI?
Conflicts cluster around ports, env, and data dirs; keep one primary Gateway per host. Migration order: npm install runbook.
Can I expose 18789 publicly?
Put reverse proxy and TLS in front—review security sections in production/reverse-proxy articles instead of binding 0.0.0.0 blindly. Help: cloud Mac support and help center.