Skip to content

OpenClaw

How to install OpenClaw with Docker on a VPS

To install OpenClaw with Docker, clone the openclaw/openclaw repository, point the setup script at the official image and run it. The script asks for your model keys, creates a gateway token and starts OpenClaw on port 18789. On a VPS, keep that port closed and use an SSH tunnel. Or run OpenClaw on Zenith instead.

· $20 a month on Zenith · Discord, Slack, Telegram and WhatsApp · Bring your own model key

Deploy with Zenith

The short version

Run it on Zenith if

  • You want OpenClaw reachable from your chat apps all day without leaving a computer on.
  • You don't want to run Docker, keep the gateway port off the internet, or manage an SSH tunnel.
  • You want the browser tool working out of the box, with Chromium already included.

Install it yourself if

  • You want OpenClaw on your own Mac or PC, with access to its local files and apps.
  • You want to run local models on your own hardware.

What you need for an OpenClaw VPS

OpenClaw is an AI assistant that connects to the chat apps you already use. Its gateway runs all the time, so for an assistant you can reach from your phone you need a machine that stays on. That usually means a VPS.

  • A Linux server with Docker Engine and Docker Compose v2.
  • At least 6 GB of RAM only if you build the image from source. The prebuilt image needs less.
  • A persistent local disk. OpenClaw's docs say not to keep its SQLite state on an NFS, SMB or CIFS mount.
  • An API key from a model provider, such as Anthropic, OpenAI or OpenRouter.
  • A bot token for each chat app you want to connect.

How to install OpenClaw with Docker

These steps follow OpenClaw's Docker guide. Run them on the server over SSH.

  1. 1

    Clone the OpenClaw repository

    The setup script lives in the repository, so clone it first and work from its root.

    git clone https://github.com/openclaw/openclaw.git cd openclaw
  2. 2

    Run the setup script with the prebuilt image

    Point the script at the official image so it doesn't build from source. Use the latest-browser tag instead if you want the agent's browser tool, which needs Chromium.

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

    The script asks for your model provider keys, creates a gateway token and saves it in .env, and starts the gateway with Docker Compose.

  3. 3

    Check the gateway is running

    curl -fsS http://127.0.0.1:18789/readyz
  4. 4

    Open the dashboard through an SSH tunnel

    The gateway listens on port 18789. Don't open that port to the internet. Keep it closed in your cloud firewall and run a tunnel from your own computer instead.

    ssh -N -L 18789:127.0.0.1:18789 user@your-server

    Open http://127.0.0.1:18789/ in your browser and paste the token from .env into Settings. Lost the link? Print it again on the server.

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

    If the dashboard says pairing is required, approve your browser as a device with the request ID.

    docker compose run --rm openclaw-cli devices approve <requestId>
  5. 5

    Connect your chat apps

    Add a channel with its bot token. For WhatsApp, run channels login and scan the QR code.

    docker compose run --rm openclaw-cli channels add --channel telegram --token "<token>" docker compose run --rm openclaw-cli channels add --channel discord --token "<token>" docker compose run --rm openclaw-cli channels login
  6. 6

    Approve your first message

    By default, someone new who messages your Telegram bot gets an eight-character pairing code, and the bot ignores them until you approve it. Send your bot a message, then approve the code it gives you. Codes last an hour.

    docker compose run --rm openclaw-cli pairing list telegram docker compose run --rm openclaw-cli pairing approve telegram <CODE>

How to install OpenClaw without Docker on Mac, Linux or Windows

On your own computer, the official installer is quicker. It installs a supported Node.js if you don't have one. OpenClaw needs Node 24.16 or newer.

On macOS, Linux or WSL2:

curl -fsSL https://openclaw.ai/install.sh | bash openclaw onboard --install-daemon

On Windows, in PowerShell:

iwr -useb https://openclaw.ai/install.ps1 | iex

Run openclaw dashboard to open the Control UI and openclaw gateway status to check it is running. This is the right choice if you want OpenClaw to work with files and apps on that computer. It only answers while the computer is on.

What you skip with OpenClaw hosting on Zenith

On your own VPSOn Zenith
ServerRent a VPS, install Docker and Compose, keep the OS patchedIncluded
InstallClone the repository, run the setup script, pick an imageIncluded
Dashboard accessKeep port 18789 closed and open an SSH tunnel every timeYour own HTTPS address, signed in with the gateway token
Browser toolSwitch to the latest-browser imageChromium included
OpenClaw commandsdocker compose run --rm openclaw-cli over SSHA Terminal tab in your dashboard, with openclaw ready to run
UpdatesPull new images and restart the gatewayIncluded
BackupsBack up OpenClaw's state and workspace yourselfManaged backups, best effort

Deploy OpenClaw on Zenith

  1. 1

    Click Deploy now on the OpenClaw page

    Open OpenClaw in the catalogue and click Deploy now. It costs $20 a month. If you don't have a Zenith account yet, you create one after paying.

  2. 2

    Choose an address

    Pick a name, then click Use this address. Your address becomes the name, a hyphen and your username, ending in .zh.run.

  3. 3

    Add your model key

    In your Zenith dashboard, open OpenClaw, go to Configuration, then Environment. Paste one key: OpenRouter, Anthropic, OpenAI or Google Gemini. An OpenRouter key reaches every model OpenRouter serves. Click Apply & restart.

  4. 4

    Sign in to the Control UI

    Copy the gateway token from the Credentials tab. Open your OpenClaw address and paste it into the Gateway Token field.

  5. 5

    Connect your chat apps

    Add Discord, Slack, Telegram or WhatsApp from OpenClaw's Control UI. Each one needs a bot or account from that service.

  6. 6

    Approve your first message

    Send your Telegram bot a message and it replies with a pairing code. In your Zenith dashboard, open OpenClaw, go to the Terminal tab and approve the code. The openclaw command is already installed there, so there is no docker compose run to type.

    openclaw pairing list telegram openclaw pairing approve telegram <CODE>

Run OpenClaw without a server

$20 a month, with a public HTTPS address, Chromium for the browser tool, managed backups and updates. Bring your own model key.

Deploy with Zenith

Weighing up other agents? Compare Hermes vs OpenClaw, or see our list of OpenClaw alternatives.

Common questions

How do I install OpenClaw?
With Docker, clone github.com/openclaw/openclaw, set OPENCLAW_IMAGE to ghcr.io/openclaw/openclaw:latest and run ./scripts/docker/setup.sh. Without Docker, run curl -fsSL https://openclaw.ai/install.sh | bash and then openclaw onboard --install-daemon.
How do I install OpenClaw on Windows?
In PowerShell, run iwr -useb https://openclaw.ai/install.ps1 | iex. You can also use the Linux installer inside WSL2, or run the Docker setup with Docker Desktop.
How much RAM does OpenClaw need in Docker?
OpenClaw's docs ask for at least 6 GB of RAM only if you build the image from source. Use the prebuilt image from GHCR on a smaller server.
Do I need a VPS to run OpenClaw?
Only if you want it to answer while your own computer is off. OpenClaw's gateway has to stay running for your chat apps to reach it. A VPS or a host like Zenith keeps it on all day.
Should I open port 18789 on my VPS?
No. OpenClaw's docs say not to expose the gateway port to the public internet. Keep it closed in your cloud firewall and reach the dashboard over an SSH tunnel or Tailscale.
Why does the OpenClaw dashboard say pairing required?
The gateway wants to approve your browser as a device. Approve it on the server with docker compose run --rm openclaw-cli devices approve and the request ID.
Which model providers can I use on Zenith?
Paste one key from OpenRouter, Anthropic, OpenAI or Google Gemini in the app's Environment settings. An OpenRouter key reaches every model OpenRouter serves.
Does the model cost extra on Zenith?
Yes. The $20 a month covers running OpenClaw. Your model provider bills you separately for what the agent uses.