OpenClaw All-in-One Docker ๐Ÿฆž

March 17, 2026 ยท View on GitHub

Docker Pulls

A ready-to-deploy Docker image for OpenClaw, the powerful open-source AI assistant that brings Claude and GPT to your favorite messaging apps. Built for ODIN Fleet and any Docker-compatible platform.

Features:

  • Zero-config startup โ€” auto-configures on first run
  • HTTPS support with auto-generated or custom certificates
  • Supports Anthropic, OpenAI, and Google Gemini APIs
  • Connect WhatsApp, Telegram, Discord, Slack, and more
  • Persistent storage for seamless container restarts

Quick Start

# 1. Configure
cp .env.example .env
# Edit .env: set your API key and gateway auth (password or token)

# 2. Build & start
docker compose up -d --build

# 3. Access Control UI
# With password: https://localhost:18789 (enter password when prompted)
# With token: https://localhost:18789/?token=YOUR_TOKEN

Data Persistence

OpenClaw stores all configuration and state in /home/node/.openclaw inside the container. This directory must be mounted as a volume to prevent data loss when the container is recreated.

volumes:
  - ./data:/home/node/.openclaw

This folder contains:

  • openclaw.json โ€” main configuration (gateway settings, API keys, TLS config)
  • Channel credentials (WhatsApp sessions, bot tokens, etc.)
  • Auto-generated TLS certificates (if enabled)

Environment Variables

VariablePurposeDefault
OPENCLAW_GATEWAY_HOSTGateway public IP/FQDNlocalhost
OPENCLAW_GATEWAY_PORTGateway port18789
OPENCLAW_GATEWAY_PASSWORDGateway password (user-friendly)-
OPENCLAW_GATEWAY_TOKENGateway token (machine-friendly)Auto-generated
ANTHROPIC_API_KEYAnthropic API key-
OPENAI_API_KEYOpenAI API key-
GEMINI_API_KEYGoogle Gemini API key-
OPENCLAW_AUTH_CHOICEAuth provider if no API keyskip
OPENCLAW_TLS_ENABLEDEnable HTTPSfalse
OPENCLAW_SKIP_ONBOARDSkip auto-setup (for OAuth)false
OPENCLAW_MODELAI model to useAuto-detected
OPENCLAW_AUTO_UPDATEAuto-update on startupfalse
OPENCLAW_UPDATE_CHANNELUpdate channelstable
OPENCLAW_SSH_ENABLEDEnable SSH serverfalse
OPENCLAW_SSH_PORTSSH server port22
OPENCLAW_SSH_AUTHORIZED_KEYSSSH public keys (one per line)-

Auth modes: Set OPENCLAW_GATEWAY_PASSWORD for password auth, or OPENCLAW_GATEWAY_TOKEN for token auth. If neither is set, a token is auto-generated and printed in the logs.

TLS / HTTPS

Set OPENCLAW_TLS_ENABLED=true to enable HTTPS with an auto-generated self-signed certificate.

Custom certificates (mounted):

volumes:
  - ./certs/cert.pem:/certs/cert.pem:ro
  - ./certs/key.pem:/certs/key.pem:ro

Docker Secrets:

secrets:
  - tls_cert
  - tls_key

Disable TLS:

environment:
  - OPENCLAW_TLS_ENABLED=false

SSH Access

Enable SSH for remote access and debugging. Uses public key authentication only (no passwords).

environment:
  - OPENCLAW_SSH_ENABLED=true
  - OPENCLAW_SSH_AUTHORIZED_KEYS=ssh-ed25519 AAAA... user@host
ports:
  - "2222:22"

Multiple keys (via environment):

environment:
  - OPENCLAW_SSH_ENABLED=true
  - |
    OPENCLAW_SSH_AUTHORIZED_KEYS=
    ssh-ed25519 AAAA... user1@host
    ssh-rsa AAAA... user2@host

Via mounted file:

volumes:
  - ./authorized_keys:/ssh/authorized_keys:ro

Via Docker secret:

secrets:
  - ssh_authorized_keys

Then connect: ssh -p 2222 node@<host>

OAuth (Claude.ai / Codex)

# 1. Interactive setup
docker compose run --rm openclaw openclaw onboard

# 2. Set OPENCLAW_SKIP_ONBOARD=true in .env

# 3. Start
docker compose up -d

Adding Channels

# WhatsApp (shows QR code)
docker compose exec -it openclaw openclaw channels login --channel whatsapp

# Telegram
docker compose exec openclaw openclaw channels add --channel telegram --token <BOT_TOKEN>

# Discord
docker compose exec openclaw openclaw channels add --channel discord --token <BOT_TOKEN>

# Slack
docker compose exec openclaw openclaw channels add --channel slack --bot-token <xoxb-...> --app-token <xapp-...>

CLI

docker compose exec openclaw openclaw health
docker compose exec openclaw openclaw channels list
docker compose exec openclaw openclaw <command>

Updating

Auto-update on startup

Set OPENCLAW_AUTO_UPDATE=true to automatically run openclaw update every time the container starts. This keeps OpenClaw at the latest version without rebuilding the image.

OPENCLAW_AUTO_UPDATE=true

You can also choose a release channel (stable, beta, or dev):

OPENCLAW_UPDATE_CHANNEL=beta

Manual update

docker compose pull
docker compose up -d

Or rebuild from source:

docker compose build --no-cache
docker compose up -d

Troubleshooting

docker compose logs -f                 # View logs
rm -rf ./data && docker compose up -d  # Reset and re-run setup

Permission denied on ./data directory:

If you see EACCES: permission denied errors for /home/node/.openclaw/openclaw.json, fix the data directory permissions:

sudo chown -R 1000:1000 ./data

The node user inside the container has UID 1000. This is common on Linux hosts where Docker creates the directory as root.