Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
Docker is optional. Use it only if you want a containerized gateway or to validate the Docker flow.
pnpm installDOCKER-USERtext```bash} ./scripts/docker/setup.sh ``` This builds the gateway image locally. To use a pre-built image instead: ```bash} export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest" ./scripts/docker/setup.sh ``` Pre-built images are published at the [GitHub Container Registry](https://github.com/openclaw/openclaw/pkgs/container/openclaw). Common tags: `main`, `latest`, `<version>` (e.g. `2026.2.26`).
text* prompt for provider API keys * generate a gateway token and write it to `.env` * start the gateway via Docker Compose During setup, pre-start onboarding and config writes run through `openclaw-gateway` directly. `openclaw-cli` is for commands you run after the gateway container already exists.
textNeed the URL again? ```bash} docker compose run --rm openclaw-cli dashboard --no-open ```
text```bash} # WhatsApp (QR) 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>" ``` Docs: [WhatsApp](/channels/whatsapp), [Telegram](/channels/telegram), [Discord](/channels/discord)
If you prefer to run each step yourself instead of using the setup script:
bashdocker build -t openclaw:local -f Dockerfile . docker compose run --rm --no-deps --entrypoint node openclaw-gateway \ dist/index.js onboard --mode local --no-install-daemon docker compose run --rm --no-deps --entrypoint node openclaw-gateway \ dist/index.js config set --batch-json '[{"path":"gateway.mode","value":"local"},{"path":"gateway.bind","value":"lan"},{"path":"gateway.controlUi.allowedOrigins","value":["http://localhost:18789","http://127.0.0.1:18789"]}]' docker compose up -d openclaw-gateway
The setup script accepts these optional environment variables:
| Variable | Purpose |
|---|---|
text OPENCLAW_IMAGE | Use a remote image instead of building locally |
text OPENCLAW_DOCKER_APT_PACKAGES | Install extra apt packages during build (space-separated) |
text OPENCLAW_EXTENSIONS | Pre-install plugin deps at build time (space-separated names) |
text OPENCLAW_EXTRA_MOUNTS | Extra host bind mounts (comma-separated text source:target[:opts] |
text OPENCLAW_HOME_VOLUME | Persist text /home/node |
text OPENCLAW_PLUGIN_STAGE_DIR | Container path for generated bundled plugin deps and mirrors |
text OPENCLAW_SANDBOX | Opt in to sandbox bootstrap ( text 1text truetext yestext on |
text OPENCLAW_SKIP_ONBOARDING | Skip the interactive onboarding step ( text 1text truetext yestext on |
text OPENCLAW_DOCKER_SOCKET | Override Docker socket path |
text OPENCLAW_DISABLE_BONJOUR | Disable Bonjour/mDNS advertising (defaults to text 1 |
text OPENCLAW_DISABLE_BUNDLED_SOURCE_OVERLAYS | Disable bundled plugin source bind-mount overlays |
text OTEL_EXPORTER_OTLP_ENDPOINT | Shared OTLP/HTTP collector endpoint for OpenTelemetry export |
text OTEL_EXPORTER_OTLP_*_ENDPOINT | Signal-specific OTLP endpoints for traces, metrics, or logs |
text OTEL_EXPORTER_OTLP_PROTOCOL | OTLP protocol override. Only text http/protobuf |
text OTEL_SERVICE_NAME | Service name used for OpenTelemetry resources |
text OTEL_SEMCONV_STABILITY_OPT_IN | Opt in to latest experimental GenAI semantic attributes |
text OPENCLAW_OTEL_PRELOADED | Skip starting a second OpenTelemetry SDK when one is preloaded |
Maintainers can test bundled plugin source against a packaged image by mounting one plugin source directory over its packaged source path, for example
OPENCLAW_EXTRA_MOUNTS=/path/to/fork/extensions/synology-chat:/app/extensions/synology-chat:ro/app/dist/extensions/synology-chatOpenTelemetry export is outbound from the Gateway container to your OTLP collector. It does not require a published Docker port. If you build the image locally and want the bundled OpenTelemetry exporter available inside the image, include its runtime dependencies:
bashexport OPENCLAW_EXTENSIONS="diagnostics-otel" export OTEL_EXPORTER_OTLP_ENDPOINT="http://otel-collector:4318" export OTEL_SERVICE_NAME="openclaw-gateway" ./scripts/docker/setup.sh
The official OpenClaw Docker release image includes the bundled
diagnostics-oteldiagnostics-oteldiagnostics.otel.enabled=truediagnostics.otel.headersPrometheus metrics use the already-published Gateway port. Enable the
diagnostics-prometheustexthttp://<gateway-host>:18789/api/diagnostics/prometheus
The route is protected by Gateway authentication. Do not expose a separate public
/metricsContainer probe endpoints (no auth required):
bashcurl -fsS http://127.0.0.1:18789/healthz # liveness curl -fsS http://127.0.0.1:18789/readyz # readiness
The Docker image includes a built-in
HEALTHCHECK/healthzunhealthyAuthenticated deep health snapshot:
bashdocker compose exec openclaw-gateway node dist/index.js health --token "$OPENCLAW_GATEWAY_TOKEN"
scripts/docker/setup.shOPENCLAW_GATEWAY_BIND=lanhttp://127.0.0.1:18789lanloopbackWhen OpenClaw runs in Docker,
127.0.0.1host.docker.internal| Provider | Host default URL | Docker setup URL |
|---|---|---|
| LM Studio | text http://127.0.0.1:1234 | text http://host.docker.internal:1234 |
| Ollama | text http://127.0.0.1:11434 | text http://host.docker.internal:11434 |
The bundled Docker setup uses those host URLs as the LM Studio and Ollama onboarding defaults, and
docker-compose.ymlhost.docker.internalHost services must also listen on an address reachable from Docker:
bashlms server start --port 1234 --bind 0.0.0.0 OLLAMA_HOST=0.0.0.0:11434 ollama serve
If you use your own Compose file or
docker run--add-host=host.docker.internal:host-gatewayDocker bridge networking usually does not forward Bonjour/mDNS multicast (
224.0.0.251:5353OPENCLAW_DISABLE_BONJOUR=1Use the published Gateway URL, Tailscale, or wide-area DNS-SD for Docker hosts. Set
OPENCLAW_DISABLE_BONJOUR=0For gotchas and troubleshooting, see Bonjour discovery.
Docker Compose bind-mounts
OPENCLAW_CONFIG_DIR/home/node/.openclawOPENCLAW_WORKSPACE_DIR/home/node/.openclaw/workspacedocker-compose.yml${HOME}/.openclaw${HOME}/.openclaw/workspace/tmp/.openclawHOMEdocker compose upThat mounted config directory is where OpenClaw keeps:
openclaw.jsonagents/<agentId>/agent/auth-profiles.json.envOPENCLAW_GATEWAY_TOKENBundled plugin runtime dependencies and mirrored runtime files are generated state, not user config. Compose stores them in the named Docker volume
openclaw-plugin-runtime-deps/var/lib/openclaw/plugin-runtime-depsThe default Compose file sets
OPENCLAW_PLUGIN_STAGE_DIRopenclaw-gatewayopenclaw-cliopenclaw doctor --fixFor full persistence details on VM deployments, see Docker VM Runtime - What persists where.
Disk growth hotspots: watch
media/cron/runs/*.jsonlopenclaw-plugin-runtime-deps/tmp/openclaw/For easier day-to-day Docker management, install
ClawDockbashmkdir -p ~/.clawdock && curl -sL https://raw.githubusercontent.com/openclaw/openclaw/main/scripts/clawdock/clawdock-helpers.sh -o ~/.clawdock/clawdock-helpers.sh echo 'source ~/.clawdock/clawdock-helpers.sh' >> ~/.zshrc && source ~/.zshrc
If you installed ClawDock from the older
scripts/shell-helpers/clawdock-helpers.shThen use
clawdock-startclawdock-stopclawdock-dashboardclawdock-helpSee Hetzner (Docker VPS) and Docker VM Runtime for shared VM deployment steps including binary baking, persistence, and updates.
When
agents.defaults.sandboxSandbox scope can be per-agent (default), per-session, or shared. Each scope gets its own workspace mounted at
/workspaceFor full configuration, images, security notes, and multi-agent profiles, see:
json5{ agents: { defaults: { sandbox: { mode: "non-main", // off | non-main | all scope: "agent", // session | agent | shared }, }, }, }
Build the default sandbox image:
bashscripts/sandbox-setup.sh
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine