OpenClaw 本地 AI 管家系统安装与配置指南
概述
OpenClaw 是一个自托管的 AI 管家系统:在本地或服务器起一个 Gateway,接入飞书、Telegram 等聊天渠道,支持插件、工具调用、定时任务和仪表盘。适合把 AI 变成能干活的助手,而不仅是聊天。
一句话安装(推荐)
macOS / Linux / WSL2 直接执行:
curl -fsSL https://openclaw.ai/install.sh | bash
安装完成后运行新手引导(建议执行,会把服务也配置好):
openclaw onboard --install-daemon
1)安装前检查(避坑)
OpenClaw 需要:
- Node.js >= 22
- macOS / Linux / Windows (WSL2)
先检查版本:
node -v
npm -v
如果 Node 版本过低:先升级 Node 再继续(macOS 常用 Homebrew;Linux 可用官方源/NodeSource)。
2)安装后验证:确认真的跑起来了
建议依次跑这三条:
2.1 诊断(强烈建议)
openclaw doctor
2.2 查看运行状态
openclaw status
2.3 打开仪表盘
openclaw dashboard
3)备选安装方式
方式 A:手动全局安装(你已经有 Node/npm)
npm install -g openclaw@latest
openclaw onboard --install-daemon
macOS 上 sharp 相关报错怎么办?
有些环境会遇到 sharp 原生编译问题,可以用预编译包绕过:
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
方式 B:从源码安装(适合贡献/二开)
git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install
pnpm ui:build
pnpm build
openclaw onboard --install-daemon
4)常见问题排错
安装成功但提示 openclaw: command not found
99% 是 npm 全局 bin 不在 PATH。
检查:
npm prefix -g
echo $PATH
修复(macOS/Linux):
export PATH=




