Skip to content
← Back

Install OpenClaw with Docker

Minimal steps + common fixes.

Prereqs

Quick Start (5 min)

# 1) Clone OpenClaw
git clone https://github.com/openclaw/openclaw.git
cd openclaw

# 2) Generate auth token (one-time)
openclaw token new

# 3) Start with Docker Compose
docker compose up -d

# 4) Verify
docker ps  # should see openclaw container
openclaw status

What Happens

Configuration (Optional)

Edit openclaw.json to customize:

{
  "gateway": {
    "bind": "0.0.0.0:8000",     // publicly accessible
    "token": "auto",             // regenerated on start
    "logLevel": "info"
  },
  "channels": {
    "telegram": { "botToken": "YOUR_BOT_TOKEN" },
    "discord": { "token": "YOUR_DISCORD_TOKEN" },
    "whatsapp": { "token": "YOUR_WHATSAPP_TOKEN" }
    // add more as needed
  }
}

Next Steps

Troubleshooting

❌ Port 8000 already in use

docker compose -f docker-compose.yml up -d -e GATEWAY_PORT=9000

Or edit docker-compose.yml → ports section

❌ Permission denied (docker: cannot connect to daemon)

sudo usermod -aG docker $USER
# then logout + login

❌ Container exits immediately

docker compose logs openclaw  # check error

Common: missing env vars in openclaw.json

❌ Can't reach from outside machine

Check: firewall rules, VPS security group, or NAT. Gateway must bind to 0.0.0.0 not 127.0.0.1

Need the fastest answer?