Install openclaw.ai on Docker

Beginner ⏱ 15 minutes 📅 Updated Aug 2026

📋 Prerequisites

1

Quick Start

Use OpenClaw's official setup script. It prepares persistent state, runs onboarding, configures Gateway authentication, and starts the Compose stack:

bash
git clone https://github.com/openclaw/openclaw.git
cd openclaw
export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest"
./scripts/docker/setup.sh
💡

Official Images

GHCR is the primary registry. Docker Hub's openclaw/openclaw:latest is the official mirror.

2

Docker Compose (Recommended)

The setup script creates and starts the supported Compose stack. Check the Gateway, then print the authenticated Control UI URL:

bash
docker compose ps
docker compose logs -f openclaw-gateway
docker compose run --rm openclaw-cli dashboard --no-open

Open http://127.0.0.1:18789/ and paste the Gateway token from .env when prompted.

3

With Local LLM (Ollama)

Run Ollama on the host, pull a model, and make the service reachable from Docker:

bash
ollama pull llama3.2
OLLAMA_HOST=0.0.0.0:11434 ollama serve

Run ./scripts/docker/setup.sh again and choose Ollama during onboarding. Use http://host.docker.internal:11434 as the base URL. Do not append /v1.

📋 Useful Docker Commands

bash
# View logs
docker compose logs -f openclaw-gateway

# Stop containers
docker compose down

# Update to latest version
export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest"
./scripts/docker/setup.sh

# Run a CLI command
docker compose run --rm openclaw-cli status

# Remove all data (fresh start)
docker compose down -v