




目标:尽快从零到第一个可用聊天(使用合理的默认值)。
最快聊天:打开 Control UI(无需渠道设置)。运行openclaw dashboard并在浏览器中聊天,或在 Gateway 网关主机上打开http://127.0.0.1:18789/。文档:Dashboard和Control UI。 推荐路径:使用CLI 新手引导向导(openclaw onboard)。它设置:
如果你想要更深入的参考页面,跳转到:向导、设置、配对、安全。 沙箱注意事项:agents.defaults.sandbox.mode: "non-main"使用session.mainKey(默认"main"),因此群组/渠道会话会被沙箱隔离。如果你想要主智能体始终在主机上运行,设置显式的每智能体覆盖:
{ "routing": { "agents": { "main": { "workspace": "~/.openclaw/workspace", "sandbox": { "mode": "off" } } } } }=22pnpm(可选;如果从源代码构建则推荐)openclaw configure --section web(存储tools.web.search.apiKey)。参见Web 工具。macOS:如果你计划构建应用,安装 Xcode / CLT。仅用于 CLI + Gateway 网关的话,Node 就足够了。 Windows:使用WSL2(推荐 Ubuntu)。强烈推荐 WSL2;原生 Windows 未经测试,问题更多,工具兼容性更差。先安装 WSL2,然后在 WSL 内运行 Linux 步骤。参见Windows (WSL2)。
curl -fsSL https://openclaw.ai/install.sh | bash
安装程序选项(安装方法、非交互式、从 GitHub):安装。 Windows (PowerShell):
iwr -useb https://openclaw.ai/install.ps1 | iex
替代方案(全局安装):
npm install -g openclaw@latest
pnpm add -g openclaw@latest
openclaw onboard --install-daemon
你将选择:
claude setup-token。gateway.auth.token。向导文档:向导
claude setup-token。~/.openclaw/credentials/oauth.json~/.openclaw/agents/<agentId/agent/auth-profiles.json无头/服务器提示:先在普通机器上完成 OAuth,然后将oauth.json复制到 Gateway 网关主机。
如果你在新手引导期间安装了服务,Gateway 网关应该已经在运行:
手动运行(前台):
openclaw gateway --port 18789 --verbose
Dashboard(local loopback):http://127.0.0.1:18789/如果配置了令牌,将其粘贴到 Control UI 设置中(存储为connect.params.auth.token)。 ⚠️ Bun 警告(WhatsApp + Telegram):Bun 与这些渠道存在已知问题。如果你使用 WhatsApp 或 Telegram,请使用Node运行 Gateway 网关。
openclaw status openclaw health openclaw security audit --deep
通过 WhatsApp → 设置 → 链接设备扫描。 WhatsApp 文档:WhatsApp
向导可以为你写入令牌/配置。如果你更喜欢手动配置,从这里开始:
Telegram 私信提示:你的第一条私信会返回配对码。批准它(见下一步),否则机器人不会响应。
默认姿态:未知私信会获得一个短代码,消息在批准之前不会被处理。如果你的第一条私信没有收到回复,批准配对:
openclaw pairing list whatsapp openclaw pairing approve whatsapp <code
配对文档:配对
如果你正在开发 OpenClaw 本身,从源代码运行:
git clone https://github.com/openclaw/openclaw.git cd openclaw pnpm install pnpm ui:build # 首次运行时自动安装 UI 依赖 pnpm build openclaw onboard --install-daemon
如果你还没有全局安装,从仓库通过pnpm openclaw ...运行新手引导步骤。pnpm build也会打包 A2UI 资源;如果你只需要运行那个步骤,使用pnpm canvas:a2ui:bundle。 Gateway 网关(从此仓库):
node openclaw.mjs gateway --port 18789 --verbose
在新终端中,发送测试消息:
openclaw message send --target +15555550123 --message "Hello from OpenClaw"
如果openclaw health显示”未配置认证”,回到向导设置 OAuth/密钥认证——没有它智能体将无法响应。 提示:openclaw status --all是最佳的可粘贴、只读调试报告。 健康探测:openclaw health(或openclaw status --deep)向运行中的 Gateway 网关请求健康快照。
