New: Earn 20% as an Agensi affiliate. Join now →

    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.

    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 uses) provides structured code review. Free.

    git-commit-writer (232 uses) 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.

    Frequently Asked Questions

    Run docker pull openclaw/openclaw:latest to get the image, then docker run -it -v $(pwd):/workspace -e ANTHROPIC_API_KEY=your_key openclaw/openclaw:latest to start.

    Yes. Mount your skills directory with -v ~/.openclaw/skills:/root/.openclaw/skills and OpenClaw loads them at startup.

    Docker Desktop or Docker Engine installed on your system. The OpenClaw image needs about 500MB of disk space and 2GB of RAM minimum.

    Yes. Docker is the recommended method for VPS and server deployments.

    Run docker pull openclaw/openclaw:latest to pull the newest version. Your skills and config persist because they are mounted from the host.

    Docker for servers, teams, and clean environments. GitHub clone for local development where you want direct access to the source. Both support SKILL.md skills identically.