📚 教程文章 中等 约 11 分钟阅读

OpenClaw Deployment Guide

从本地安装到云厂商一键部署,选择最适合你的 OpenClaw 部署方式

V
Victor.Chen
2026年3月19日

Source: OpenClaw Orange Paper v1.2.0, Chapters 10-14

Deployment Options Overview

OpenClaw supports a variety of deployment options, from local to cloud. Which one to pick depends on your technical skill, budget, and use case.

Comparison of Deployment Options

Platform One-click Deploy Minimum Spec New-User Price Built-in Models Difficulty Best For
Local Node.js 22+ Free No Low Developers, macOS/Linux users
npm Node.js 22+ Free No Low Developers, macOS/Linux users
Docker Docker Engine Free No Medium Container-savvy developers
Alibaba Cloud Yes 2C2G 40GB ¥9.9/mo Yes (qwen3.5-plus) Very low (3 steps) Top pick in mainland China, beginner-friendly
Tencent Cloud Yes 2C2G ~¥17/mo No (Coding Plan required) Very low (3 steps) WeCom/QQ ecosystem users
Baidu Cloud Yes 2C4G ¥0.01 for the first month Yes (Qianfan models) Very low (4 steps) Quick trials, ERNIE ecosystem
Huawei Cloud Yes Flexus L instance From ~¥85/mo No (MaaS required) Medium (5+ steps) Enterprise users, compliance needs
Volcengine Yes 2C4G ¥9.9/mo Yes (Ark models) Low (3-4 steps) Top pick for Feishu users
Coze Coding Yes No server needed From ¥49/mo Yes (Seed 2.0, etc.) Very low (2 steps) Zero barrier, no server management
Railway Yes Auto-assigned $5/mo free credit No Very low (1 click) Overseas users, developers
Zeabur Yes Dedicated 2C4G Usage-based billing Yes (AI Hub) Very low (template) Multi-model failover needs

Key Advice

Model costs are the real expense. Server costs have generally dropped very low (¥9.9-99/year); the true ongoing cost is model API calls. When choosing a platform, focus on model bundle pricing rather than the server price alone.

Local Installation

Local installation suits developers and users who want full control over their data. OpenClaw is a TypeScript project that runs on Node.js.

System Requirements

Requirement Details
Node.js >= 22 (mandatory)
Package manager npm / pnpm / bun all work
macOS Xcode Command Line Tools required
Linux Standard build tools (gcc, make)
Windows WSL2 strongly recommended

Option 1: Global npm Install (Recommended)

The most recommended install method — just two commands:

# Install OpenClaw
npm install -g openclaw@latest

# Initialize and install the daemon
openclaw onboard --install-daemon

The onboard command walks you through the initial setup, including choosing a model, configuring API keys, and setting up messaging channels. The --install-daemon flag also installs the daemon so OpenClaw keeps running in the background.

Option 2: One-line Script Install (macOS / Linux)

If you'd rather not install Node.js manually, use the official one-line install script:

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

Note: This command is for macOS and Linux only. Windows users should set up WSL2 first and then run it.

Extra Prep on macOS

Before installing, macOS users must make sure Xcode Command Line Tools are installed:

xcode-select --install

If you need the iMessage channel or the Apple Notes skill, note that they rely on macOS-native AppleScript capabilities and only run on macOS.

A Note for Windows Users

Important: OpenClaw officially strongly recommends running on WSL2 (Windows Subsystem for Linux). Running natively on Windows may hit compatibility issues with paths, permissions, and more.

Once WSL2 is installed, open an Ubuntu terminal and follow the Linux instructions.

The Daemon

The daemon keeps OpenClaw running in the background, even after you close the terminal. Different systems use different process managers:

OS Process Management Notes
macOS launchd Native macOS service management, starts on boot
Linux systemd Standard Linux service management, controlled via systemctl

With the daemon installed, the OpenClaw Gateway keeps listening on ws://127.0.0.1:18789.

Docker Deployment

Docker deployment fits scenarios that need environment isolation, easy migration, or long-term operation on a server.

Quick Start with docker-compose

The OpenClaw repo ships with a built-in docker-compose.yml — one command to start:

# Clone the repository
git clone https://github.com/openclaw/openclaw.git
cd openclaw

# Start
docker-compose up -d

Image Variants

Variant Description Use Case
Standard image Full features, all extension dependencies included General use, full functionality
slim variant Multi-stage build, smaller size Resource-constrained environments, CI/CD
sandbox Sandboxed environment Security isolation, code execution
sandbox-browser Sandbox with a browser Browser automation needs

To use the slim variant: set the environment variable OPENCLAW_VARIANT=slim in docker-compose.yml.

Volumes to Mount

Docker deployment requires mounting two key directories to keep data persistent:

volumes:
  - ~/.openclaw:/root/.openclaw           # Config and state data
  - ~/openclaw/workspace:/workspace        # Workspace (YAML config files)

Important: Without mounting these two directories, all configuration and conversation history will be lost when the container restarts.

Port Mapping

The OpenClaw Gateway listens on port 18789 (WebSocket) by default, and the Web UI uses port 3000 by default:

ports:
  - "18789:18789"  # Gateway WebSocket
  - "3000:3000"      # Web UI

Podman Compatibility

OpenClaw also runs on Podman:

# Start with Podman
podman-compose up -d

For environments that require rootless containers (e.g., corporate security policies), Podman is the better choice.

One-click Deployment on Chinese Cloud Providers

This is the go-to option for most users in mainland China. All major Chinese cloud providers now support one-click OpenClaw deployment.

Alibaba Cloud

The platform with the richest community resources in China — image pre-installed, works out of the box.

Item Details
Spec 2 vCPU + 2 GiB RAM + 40 GiB ESSD system disk
OS Alibaba Cloud Linux 3, with the OpenClaw image pre-installed
Price Limited-time flash sale ¥9.9/mo; annual plans as low as ¥68/year
Models qwen3.5-plus built in by default; Bailian Coding Plan Lite ¥10 for the first month
IM support DingTalk, Feishu, etc. (via the openclaw-china plugin)

Deployment steps:

  1. One-click purchase: open the campaign page and buy a Lightweight Application Server with the OpenClaw image pre-installed
  2. Open ports + configure: allow ports 18789 (Gateway) and 3000 (Web UI) in the security group
  3. Visit the Web UI: open http://YOUR_IP:3000 in a browser

Tencent Cloud

Full support for the four major IMs, with cost-effective Coding Plan model bundles.

Deployment steps:

  1. Purchase a Lighthouse instance
  2. Choose the OpenClaw template: Application Templates → AI Agents → OpenClaw
  3. Configure models + connect IMs: buy a Coding Plan, then connect WeCom/QQ/Feishu/DingTalk

Volcengine

Top pick for Feishu users, deeply integrated with the Feishu ecosystem.

Coze Coding

A zero-barrier option — no server to manage.

Item Details
Price From ¥49/mo
Models Seed 2.0 and more built in
Difficulty Very low (2 steps)
Best for Users who don't want to manage servers

First-time Setup

Initialization Flow

  1. Set an admin password: set it on your first visit to the Web UI
  2. Add an AI model: configure an API key
  3. Pick a default model: set the model you'll use most
  4. Configure channels (optional): connect Feishu/DingTalk/WeChat, etc.

Recommended Model Choices

User Type Recommended Model Why
First-time users Google Gemini Free tier available
Users in mainland China DeepSeek / Kimi Friendly to mainland networks
Quality first Claude / GPT-4 Best results
Cost sensitive Local models (Ollama) Completely free

Getting API Keys

Provider Where to Get It
Google Gemini https://aistudio.google.com/apikey
Claude https://console.anthropic.com/
OpenAI https://platform.openai.com/api-keys
DeepSeek https://platform.deepseek.com/
Kimi https://platform.moonshot.cn/

Recommended Next Step (Hands-on)

If you want to get it running locally first (the most common path), follow this directly:

Deploy OpenClaw on Your Local Machine (15-30 minutes)

For 24/7 cloud operation see Cloud Server Deployment; for common pitfalls see Local Troubleshooting 2026.

Want this set up for you?

Tell us the first job you want automated - join the 14-day setup experiment.

This 14-day experiment

Email is only used to send the pack and a checkout link. No resale. No charge happens on this page.