Install OpenClaw on Docker

Deploy OpenClaw on servers, NAS, or homelab setups using Docker or Docker Compose.

This page focuses on containerised deployments. For local desktop installs, see the OS-specific pages under Install.

Why Docker?

  • Easy to deploy on VPS, dedicated servers, and homelabs
  • Isolated environment with reproducible builds
  • Simple backups and migration using volumes

Minimal Docker Compose example

A very small example to get you started (adapt this to your environment):

version: \"3.9\" services: openclaw: image: ghcr.io/openclaw/openclaw:latest container_name: openclaw restart: unless-stopped ports: - \"3000:3000\" environment: # Fill in your model API keys and settings ANTHROPIC_API_KEY: your_key_here OPENAI_API_KEY: your_key_here volumes: - ./data:/var/lib/openclaw

Then run:

docker compose up -d

Volumes & persistence

The ./data volume in the example above is where OpenClaw stores its configuration, memory, and logs.

  • Back up this directory regularly if you care about long-term memory.
  • Mount it to a persistent path on your server or NAS.

Networking

By default, the example exposes port 3000 on the host. In many setups you’ll want to put a reverse proxy (Nginx, Caddy, Traefik) or a Cloudflare Tunnel in front.

These examples are intentionally minimal. For production-ready setups, tune resource limits, logging, and security according to your environment, and always cross-check with the official documentation.