ClawDock Shell Helpers for Docker-Based OpenClaw Installations

This page covers ClawDock, a lightweight shell helper that wraps Docker for OpenClaw installations. It is intended for users who want to use short commands like clawdock-start instead of longer docker compose calls.

Read this when

  • You run OpenClaw with Docker often and want shorter day-to-day commands
  • You want a helper layer for dashboard, logs, token setup, and pairing flows

ClawDock is a lightweight shell helper that wraps Docker for OpenClaw installations.

It provides short commands such as clawdock-start, clawdock-dashboard, and clawdock-fix-token instead of longer docker compose ... calls.

If Docker is not yet configured, begin with Docker.

Install

mkdir -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 previously installed ClawDock from scripts/shell-helpers/clawdock-helpers.sh, reinstall from the current scripts/clawdock/clawdock-helpers.sh path; the old raw GitHub path has been removed.

The helpers detect your OpenClaw checkout automatically on first use (checking common paths like ~/openclaw, ~/projects/openclaw) and cache the result in ~/.clawdock/config. Set CLAWDOCK_DIR yourself if your checkout is located elsewhere.

What you get

Basic operations

CommandDescription
clawdock-startStart the gateway
clawdock-stopStop the gateway
clawdock-restartRestart the gateway
clawdock-statusCheck container status
clawdock-logsFollow gateway logs

Container access

CommandDescription
clawdock-shellOpen a shell inside the gateway container
clawdock-cli <command>Run OpenClaw CLI commands in Docker
clawdock-exec <command>Execute an arbitrary command in the container

Web UI and pairing

CommandDescription
clawdock-dashboardOpen the Control UI URL
clawdock-devicesList pending device pairings
clawdock-approve <id>Approve a pairing request

Setup and maintenance

CommandDescription
clawdock-fix-tokenWrite the gateway token into the container config
clawdock-updatePull, rebuild, and restart
clawdock-rebuildRebuild the Docker image only
clawdock-cleanRemove containers and volumes

Utilities

CommandDescription
clawdock-healthRun a gateway health check
clawdock-tokenPrint the gateway token
clawdock-cdJump to the OpenClaw project directory
clawdock-configOpen ~/.openclaw
clawdock-show-configPrint config files with redacted values
clawdock-workspaceOpen the workspace directory
clawdock-helpList all ClawDock commands

First-time flow

clawdock-start
clawdock-fix-token
clawdock-dashboard

If the browser indicates pairing is required:

clawdock-devices
clawdock-approve <request-id>

Config and secrets

ClawDock reads two separate .env files, matching the split described in Docker:

  • The project .env next to docker-compose.yml: Docker-specific values like image name, ports, and OPENCLAW_GATEWAY_TOKEN. clawdock-token reads the token from here.
  • ~/.openclaw/.env (mounted into the container): env-backed secrets that OpenClaw manages itself, alongside openclaw.json and agents/<agentId>/agent/auth-profiles.json.

clawdock-fix-token copies the token from the project .env into the container's gateway.remote.token and gateway.auth.token config values and restarts the gateway.

Use clawdock-show-config to inspect openclaw.json and both .env files quickly; it redacts .env values in its printed output.

  • Docker, Canonical Docker install for OpenClaw.

  • Docker VM runtime, Docker-managed VM runtime for hardened isolation.

  • Updating, Updating the OpenClaw package and managed services.