Docker install guide · Independent guidance

Install OpenClaw with Docker Compose

Use the official repository Compose setup and persist the OpenClaw config, workspace, and auth-profile secret material. The container Gateway and CLI share a network trust boundary; keep the hardened defaults and expose only the authenticated Gateway port that you actually need.

Current snapshotUpdated 2026-08-24Official docs main snapshot · OpenClaw 2026.8.1
01

Persistence is the first design choice

  • Persist the config/state directory and workspace across container replacement.
  • Persist the separate auth-profile secret directory when OAuth-backed profiles are used.
  • Inside a container, `127.0.0.1` is the container—not the host. Use `host.docker.internal` for a host Ollama or LM Studio service.
  • The documented bind values are `lan`, `loopback`, `custom`, `tailnet`, or `auto`; do not substitute host-address strings into that enum.
02

Verify the container, then the Gateway

  1. 1

    Check liveness

    The built-in probe does not require authentication.

    curl -fsS http://127.0.0.1:18789/healthz
  2. 2

    Check startup admission

    Use the documented startup/readiness distinction.

    curl -fsS http://127.0.0.1:18789/startupz
  3. 3

    Inspect authenticated state

    Run the CLI inside the Compose environment with the configured token.

    docker compose exec openclaw-gateway sh -lc 'node dist/index.js gateway health --token "$OPENCLAW_GATEWAY_TOKEN"'

Primary sources

Verify against the owner.

Content snapshot follows official docs main at the recorded commit; the current package metadata reported 2026.8.1 when verified. Your installed release and live CLI schema remain authoritative.