Skip to content

快速开始(从 0 到能聊天)

目标:用最少步骤跑起来、能聊天、可扩展。

1. 环境要求

  • Node.js 22+(官方推荐)

说明:有些脚手架/站点生成器也会要求 Node 22。若你只是运行 OpenClaw 现有环境,Node 版本以你安装方式为准。

2. 安装

  • Windows(PowerShell):
powershell
iwr -useb https://openclaw.ai/install.ps1 | iex
  • macOS/Linux:
bash
curl -fsSL https://openclaw.ai/install.sh | bash

3. 跑 onboarding 向导(推荐)

bash
openclaw onboard --install-daemon

向导通常会帮你配置:auth、gateway、可选渠道。

4. 检查 Gateway

bash
openclaw gateway status

5. 打开 Control UI / Dashboard

bash
openclaw dashboard

或浏览器访问:http://127.0.0.1:18789/

建议顺手读:

如果页面显示异常/乱码或提示 unauthorized

常见报错:

  • unauthorized: gateway token missing ...

原因:Control UI 未携带 gateway token

解决(任选一个):

  1. URL 带 token(最快)
  • http://127.0.0.1:18789/?token=<gateway.auth.token>
  1. 在 Control UI 设置里粘贴 token
  • Control UI → Settings → Token → 粘贴 gateway.auth.token

token 从哪里来:OpenClaw 配置文件里的 gateway.auth.token

进阶:如果你要把 Gateway 暴露到公网,建议配合 Cloudflare Access / Tunnel 等做访问控制。

Control UI 是新手最快路径:先能在网页里聊天(不用先配渠道)。