OpenClaw 龙虾

安装

官网: https://openclaw.ai/

文档地址: https://docs.openclaw.ai/getting-started

Windows 安装

在 windows 系统上安装

检查环境

winget -v
choco -v
node -v
npm -v
git -v

Windows 安装 Nodejs

https://nodejs.org/zh-cn/download

下载安装: Nodejs x64 Windows 安装包

或者

powershell -c "irm https://community.chocolatey.org/install.ps1|iex"
choco install nodejs --version="24.14.0"
node -v
npm -v

Windows 加速安装 Nodejs

https://nodejs.cn/en/download

国内下载: Nodejs x64 Windows 安装包

Windows Git 安装

https://git-scm.com/install/windows

下载安装: Git x64 Windows 安装包

或者命令行安装:

winget install --id Git.Git -e --source winget

Windows 加速下载 Git

https://registry.npmmirror.com/binary.html?path=git-for-windows/v2.53.0.windows.1/

下载安装: Git x64 Windows 安装包

Windows 安装 VS

https://visualstudio.microsoft.com/zh-hans/downloads/

下载安装: Visual Studio 2026 社区版安装包

Windows 安装 OpenClaw

npm i -g openclaw@2026.3.2

配置 OpenClaw

openclaw onboard

Mac 安装

在 Mac OS 系统上安装

检查环境

uname -m
brew -v
node -v
npm -v
pnpm -v
git -v

Mac 安装 Nodejs

https://nodejs.cn/en/download

国内下载: Nodejs x64 Mac 安装包

或者

curl -o- https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash
brew install node@24
node -v
npm -v

Mac 安装 Git

通过安装 xcode 安装

Mac 安装 pnpm

npm i -g pnpm

Mac 安装 OpenClaw

npm config set registry https://registry.npmmirror.com
npm config get registry
npm i -g openclaw@2026.3.2

配置 OpenClaw

openclaw onboard

OpenClaw 常用命令

配置

openclaw onboard

启动网关

openclaw gateway start

重启网关

openclaw gateway restart

查看状态

openclaw gateway status

停止网关

openclaw gateway stop

打开 Web UI

也可用于查看 gateway token

openclaw dashboard

安装国内渠道插件

openclaw plugins install @openclaw-china/channels

飞书

https://www.feishu.cn/

Feishu

  1. 下载飞书
  2. 飞书开发者后台
  3. OpenClaw 飞书文档
openclaw plugins install @openclaw/feishu

Q&A

Mac 安装 权限问题

wode@wodeMacBook-Pro ~ % npm i -g openclaw@latest

npm error code EACCES
npm error syscall mkdir
npm error path /usr/local/lib/node_modules/openclaw
npm error errno -13
npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/openclaw'
npm error     at async mkdir (node:internal/fs/promises:856:10)
npm error     at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:572:20
npm error     at async Promise.allSettled (index 0)
npm error     at async #reifyPackages (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:309:11)
npm error     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:121:5)
npm error     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:151:5)
npm error     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:208:9)
npm error     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:67:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'mkdir',
npm error   path: '/usr/local/lib/node_modules/openclaw'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error A complete log of this run can be found in: /Users/wode/.npm/_logs/2026-03-05T11_51_29_925Z-debug-0.log

处理方案:

mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
echo $SHELL

zsh

source ~/.zshrc

bash

source ~/.bash_profile
npm config get prefix

Mac 没有配置有效的 SSH 公钥来访问 GitHub 私有仓库

wodeMacBook-Pro:~ wode$ npm install -g openclaw
npm error code 128
npm error An unknown git error occurred
npm error command git --no-replace-objects ls-remote ssh://git@github.com/whiskeysockets/libsignal-node.git
npm error git@github.com: Permission denied (publickey).
npm error fatal: Could not read from remote repository.
npm error
npm error Please make sure you have the correct access rights
npm error and the repository exists.
npm error A complete log of this run can be found in: /Users/wode/.npm/_logs/2026-03-07T13_45_15_177Z-debug-0.log

处理方案:

git config --global http.sslVerify false
git config --global url."https://ghfast.top/https://github.com/".insteadOf https://github.com/
git config --global url."https://ghfast.top/https://github.com/".insteadOf ssh://git@github.com/

处理 2026.3.2+ 默认权限问题

openclaw config set tools.profile "full"
openclaw gateway restart