Chapter 3 / 95 min read

Part 3: Deployment and Setup

For beginners, the best deployment is usually not the most powerful one. It is the one you can get working today without turning setup into a week-long project.

01 Deployment Paths at a Glance

OpenClaw is commonly deployed in a few broad ways:

OptionBest forCost feelDifficulty
Local npm installDevelopers, macOS/Linux usersLowLow
DockerUsers comfortable with containersLowMedium
Alibaba CloudMainland China beginnersVery lowVery low
Tencent CloudQQ / WeCom ecosystem usersLowVery low
Baidu CloudLow-cost trial usersVery lowVery low
Huawei CloudEnterprise and compliance scenariosMediumMedium
VolcengineFeishu-heavy teamsLowLow
Coze CodePeople who do not want to manage serversLowVery low
Railway / ZeaburOverseas developersLow to mediumVery low

The most important economic lesson is that server cost is often not the main cost driver. Model usage usually is.

02 Local Installation

Local install is ideal when you want to fully understand the environment and keep everything under direct control.

Requirements

ItemRequirement
Node.js>= 22
Package managernpm, pnpm, or bun
macOSXcode Command Line Tools recommended
LinuxStandard build tooling
WindowsWSL2 strongly recommended
npm install -g openclaw@latest
openclaw onboard --install-daemon

If you want an install script:

curl -sSL https://get.openclaw.ai | bash

Platform notes

  • On macOS, run xcode-select --install
  • On Windows, prefer WSL2 instead of native Windows execution
  • The daemon keeps OpenClaw alive in the background

Typically that means:

  • launchd on macOS
  • systemd on Linux

03 Docker Deployment

Docker is the safest path when you want isolation, portability, or long-running server deployment.

Quick start

git clone https://github.com/openclaw/openclaw.git
cd openclaw
docker-compose up -d

Image variants

VariantPurposeGood for
StandardFull feature setMost users
slimSmaller imageResource-constrained environments
sandboxMore isolated executionHigher-risk workloads
sandbox-browserIncludes browser execution supportBrowser automation

Persistent mounts

volumes:
  - ~/.openclaw:/root/.openclaw
  - ~/openclaw/workspace:/workspace

If you skip these mounts, state and workspace data can disappear when the container restarts.

Ports

ports:
  - "18789:18789"
  - "3000:3000"
  • 18789 for Gateway / WebSocket
  • 3000 for Web UI

Podman works too:

podman-compose up -d

04 Cloud and Hosted Paths

If your priority is speed, a cloud template can be much easier than building everything by hand.

Common China-facing choices

PlatformStrengthGood fit
Alibaba CloudStrong community docs, low cost, mature templatesMost beginners in China
Tencent CloudGood QQ / WeCom fitOffice IM scenarios
Baidu CloudVery low-cost first experienceCheap trial
Huawei CloudBetter enterprise postureCompliance-focused environments
VolcengineStrong Feishu alignmentFeishu teams
Coze CodeNo server maintenanceZero-infra users

Common overseas choices

PlatformStrength
RailwayExtremely easy deployment
ZeaburFriendly to multi-model failover
SealosBetter for cloud-native and K8s-minded users

A practical selection guide

  • Zero to first success: Coze Code or Baidu Cloud
  • Low-friction but still controllable: Alibaba Cloud or Tencent Cloud
  • Container-first: Docker
  • Overseas deployment: Railway or Zeabur
  • Maximum local control: local install

05 First-Run Setup That Matters

Getting OpenClaw started is only step one. Several first-run settings really matter.

Run diagnostics first

openclaw doctor

If something seems wrong, start there.

Configure Gateway authentication

From v2026.3.7, Gateway authentication must be configured explicitly.

{
  "gateway": {
    "auth": {
      "mode": "token",
      "token": "your-secret-token"
    }
  }
}

You can also use password mode, but public unauthenticated exposure is not a serious option.

Update channels

openclaw update --channel stable
openclaw update --channel beta
openclaw update --channel dev

For most users:

  • stable is the default choice
  • beta is for early adopters
  • dev is for contributors and testers

First-run checklist

  • Gateway starts successfully
  • A model is configured and reachable
  • openclaw doctor has no critical errors
  • Authentication is enabled
  • Persistent directories are mounted or preserved
  • Your first channel config is ready

Once that is done, you move from “reading about OpenClaw” into actually operating it.