Docker Compose Generator

Create the perfect deployment configuration for your OpenClaw instance in seconds.

Local deployment requires your computer to stay on. Recommended for testing only. Use a VPS for 24/7 availability.

docker-compose.yml
version: '3.8'

services:
  openclaw-gateway:
    image: openclaw:local
    build: .
    restart: unless-stopped
    ports:
      - "18789:18789"
    environment:
      - SANDBOX_ENABLED=true
      - ANTHROPIC_API_KEY=sk-ant-api-key-placeholder
      - PORT=18789
    volumes:
      - ./data:/home/node/.openclaw
      - ./workspace:/home/node/.openclaw/workspace

  openclaw-cli:
    image: openclaw:local
    build: .
    volumes:
      - ./data:/home/node/.openclaw
      - ./workspace:/home/node/.openclaw/workspace
    profiles:
      - tools
Quick Start Guide
  1. Clone the OpenClaw repository and enter the directory.
  2. Save the code above as docker-compose.yml (replacing the existing one).
  3. Run docker compose run --rm openclaw-cli onboard to set up.
  4. Start the gateway: docker compose up -d openclaw-gateway
  5. Access Control UI at http://localhost:18789.

Why use the Docker Compose Generator?

Deploying autonomous AI agents requires a robust infrastructure. Manually configuring docker-compose.yml files is prone to syntax errors and security misconfigurations. This tool ensures you follow OpenClaw's best practices for:

  • Security Sandboxing: Automatically configures the SANDBOX_ENABLED environment variable to prevent unauthorized file system access.
  • Data Persistence: Correctly maps Docker volumes to /home/node/.openclaw so your agent's memory and identity persist across restarts.
  • Network Configuration: Sets up the correct port mappings (default 18789) for the Gateway Protocol.

Supported Platforms

We support generating configurations for all major deployment environments:

  • Local Development: For testing on Mac or Windows machines.
  • Vultr & DigitalOcean: Optimized for high-performance VPS hosting.
  • Zeabur: One-click serverless deployment for users who want zero maintenance.