serverserv serverserv

OpenClaw Docker: install and run OpenClaw with Docker

By Siam Ahmed, software engineer · 6 min read · Updated

OpenClaw runs well in Docker: the official image, a setup script and Docker Compose get the Gateway running in a few commands, isolated from the rest of your server. This guide covers the requirements, the install steps, connecting chat apps, updating, and running it 24/7 on a VPS. Commands follow the official OpenClaw Docker docs (checked 28 November 2026).

Docker or a normal install?

Docker is optional. Use it when you want an isolated, easy-to-rebuild Gateway, or a server with nothing else installed. If you already develop on the machine, the normal OpenClaw install is simpler.

Requirements

  • Docker Engine (or Docker Desktop) with Docker Compose v2.
  • At least 6 GB RAM only if you build the image from source. A pre-built image avoids this.
  • Disk space for images and logs.
  • On a public server: a firewall. Docker can bypass ufw rules, so review the DOCKER-USER chain.

Full sizing advice: OpenClaw system requirements.

Install OpenClaw with Docker

From the OpenClaw repository folder, pick the official pre-built image and run the setup script:

export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest"
./scripts/docker/setup.sh

The script asks for your AI provider API key, generates a Gateway token and writes it to .env, then starts the Gateway with Docker Compose. Open http://127.0.0.1:18789/ and paste the token from .env into Settings. To print the dashboard link again:

docker compose run --rm openclaw-cli dashboard --no-open

Use only the official images (ghcr.io/openclaw/openclaw or openclaw/openclaw). For a pinned setup, use a version tag instead of latest.

Connect Telegram, WhatsApp or Discord

# WhatsApp (scan the QR code)
docker compose run --rm openclaw-cli channels login
# Telegram
docker compose run --rm openclaw-cli channels add --channel telegram --token "<token>"
# Discord
docker compose run --rm openclaw-cli channels add --channel discord --token "<token>"

Step-by-step: Telegram, WhatsApp, Discord.

Browser image

If your agent needs the Gateway-controlled browser, use the latest-browser image, which has Chromium built in:

export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest-browser"
./scripts/docker/setup.sh

To switch an existing install, change OPENCLAW_IMAGE in .env, then pull and recreate the Gateway with docker compose pull and docker compose up -d openclaw-gateway. Do not rerun setup from an empty shell: it rewrites .env.

Run it 24/7 on a VPS

A Docker Gateway on a laptop stops when the laptop sleeps. On a VPS it keeps answering messages and running scheduled skills around the clock. Keep port 18789 private (SSH tunnel or a secured reverse proxy) and read our OpenClaw security guide.

Two ways to do it with serverserv: a KVM VPS with full root where you run the Docker steps above, or OpenClaw hosting, where we install and connect it for you. Both start at $1 for the first month.

Get OpenClaw hosting See KVM VPS

Questions

Can I run OpenClaw in Docker?

Yes. OpenClaw ships official images on GitHub Container Registry (ghcr.io/openclaw/openclaw) with a Docker Hub mirror (openclaw/openclaw), and a setup script that runs onboarding and starts the Gateway with Docker Compose.

Is Docker required for OpenClaw?

No. Docker is optional. It is useful for an isolated Gateway or a server without local installs; the normal npm install works too.

How much RAM does OpenClaw Docker need?

Building the image from source needs at least 6 GB RAM. Using a pre-built image avoids that build step, so a smaller server works.

What port does OpenClaw use in Docker?

The Control UI opens on port 18789 (http://127.0.0.1:18789/). On a VPS, keep it private and reach it through an SSH tunnel or a secured reverse proxy.

How do I connect Telegram or WhatsApp in Docker?

Run the CLI container: docker compose run --rm openclaw-cli channels login for WhatsApp (QR code), or channels add --channel telegram --token for Telegram.

Ready to deploy?

Pick a plan, choose a term and our team sets up your server for you.

See all plansTalk to sales

Need a custom server, bulk pricing or help moving from another host? Our team will build a quote for you.

Plans from $2.99/moSee plans