Ship better AI in 30 seconds. Browse 2,000+ expert-built and security scanned skills -> Browse skills

    Guides
    openclaw
    docker
    installation

    OpenClaw Docker Setup: Run Your AI Agent in a Container (2026)

    Docker is the fastest way to run OpenClaw on a server or clean environment. Pull the image, set your API key, mount your code, and start.

    July 23, 20265 min read
    Share:

    Docker is the fastest way to run OpenClaw on a server or clean environment. Pull the image, set your API key, mount your code, and start.

    Quick Answer: Run docker pull openclaw/openclaw:latest, then docker run -it -v $(pwd):/workspace -e ANTHROPIC_API_KEY=your_key openclaw/openclaw:latest. This mounts your current directory as the workspace and connects to Claude. The container includes all dependencies. No manual installation needed.

    Why should I use Docker for OpenClaw?

    Docker gives you a clean, isolated environment. No dependency conflicts with your system Node.js. No leftover files if you want to remove it. Easy to run on servers, VPS instances, and CI/CD pipelines.

    Docker is the recommended method for server deployments, team environments where everyone needs the same setup, and testing OpenClaw without modifying your system.

    For local development on your personal machine, cloning from GitHub is simpler. See the OpenClaw GitHub setup guide.

    Recommended skills

    How do I pull the OpenClaw Docker image?

    docker pull openclaw/openclaw:latest
    

    The image is based on Node.js 20 and includes all OpenClaw dependencies. It is roughly 500MB.

    How do I run OpenClaw in Docker?

    Basic run with your current directory as the workspace:

    docker run -it \
      -v $(pwd):/workspace \
      -e ANTHROPIC_API_KEY=your_key \
      openclaw/openclaw:latest
    

    This mounts your project directory into the container so OpenClaw can read and modify your files. The -it flag gives you an interactive terminal.

    For GPT or other models, replace the API key variable with the relevant one (OPENAI_API_KEY, etc.).

    How do I use SKILL.md skills with Docker?

    Mount your skills directory:

    docker run -it \
      -v $(pwd):/workspace \
      -v ~/.openclaw/skills:/root/.openclaw/skills \
      -e ANTHROPIC_API_KEY=your_key \
      openclaw/openclaw:latest
    

    OpenClaw loads skills from /root/.openclaw/skills/ inside the container.

    The most popular skills for OpenClaw:

    code-reviewer (764 installs) provides structured code review. Free.

    git-commit-writer (232 installs) writes conventional commit messages. Free.

    Browse all skills for OpenClaw on Agensi.

    How do I set up Docker Compose for OpenClaw?

    For a permanent setup, create a docker-compose.yaml:

    version: '3.8'
    services:
      openclaw:
        image: openclaw/openclaw:latest
        volumes:
          - ./:/workspace
          - ~/.openclaw/skills:/root/.openclaw/skills
          - ~/.openclaw/config.yaml:/root/.openclaw/config.yaml
        environment:
          - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
        stdin_open: true
        tty: true
    

    Run with docker compose run openclaw.

    How do I update OpenClaw in Docker?

    Pull the latest image:

    docker pull openclaw/openclaw:latest
    

    Your skills and config are mounted from your host machine, so they persist across updates.

    Keep reading

    Frequently Asked Questions