OpenClaw Install

How to Run OpenClaw in Docker?

Docker is an excellent way to run OpenClaw in an isolated, reproducible environment. It simplifies updates, rollbacks, and lets you run multiple instances on a single server.

Make sure Docker and Docker Compose are installed on your system. Create a docker-compose.yml file with the OpenClaw service configuration. The official image — openclaw/openclaw:latest — contains everything needed.

Volumes are critical. The /app/data directory inside the container stores configuration, conversation history, and memory. Without a bound volume, all data is lost when the container is recreated. Also map port 3000 (or your chosen port) for Gateway access.

Environment variables go in a .env file next to docker-compose.yml. Store API keys, messenger tokens, and other secrets there. Never commit .env files to Git.

After starting the container, run the onboarding wizard inside it. Docker Compose automatically restarts the container on crashes thanks to the restart: unless-stopped policy.

Updating is simple: pull the new image and recreate the container. Your data persists in the volume. For multi-agent setups, duplicate the service block in docker-compose.yml with different ports and data volumes for each instance.

bash
docker pull openclaw/openclaw:latest
yaml
# docker-compose.yml
services:
  openclaw:
    image: openclaw/openclaw:latest
    ports:
      - "3000:3000"
    volumes:
      - openclaw_data:/app/data
    env_file:
      - .env
    restart: unless-stopped

volumes:
  openclaw_data:
bash
docker compose up -d

Don't want to do it yourself?

We'll set up OpenClaw for you — from installation to skills

Get Started