Debian安装openclaw
安装npm
# 1. 安装 nvm(使用国内镜像加速)
sudo apt update
sudo apt install --reinstall ca-certificates git
export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node/
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# 2. 加载 nvm
source ~/.bashrc
# 或source ~/.zshrc
# 3. 验证 nvm 安装
nvm --version
# 4. 安装 Node.js 22 LTS(满足 Agent Reach 和 OpenClaw 要求)
nvm install 22
nvm use 22
nvm alias default 22
# 5. 验证安装
node --version # 应显示 v22.x.x
npm --version # 应显示版本号
-----------------------
或:
# 1. 设置 npm 镜像源
npm config set registry https://mirrors.cloud.tencent.com/npm/
# 2. 验证是否设置成功
npm config get registry
# 应输出:https://registry.npmmirror.com
# 3. 安装 n 版本管理工具(现在会很快)
npm install -g n
# 4. 安装 Node.js 22
n 22
# 5. 验证版本
node --version
npm --version
# 6.安装openclaw
npm i -g openclaw
openclaw onboard
————————————
或
# 1. First, clean up the broken installation
npm uninstall -g openclaw 2>/dev/null
rm -rf /root/.nvm/versions/node/v22.22.1/lib/node_modules/openclaw
# 2. Clear npm cache
npm cache clean --force
# 3. Use the official installer (recommended method)
curl -fsSL https://openclaw.ai/install.sh | bash
启动网关看UI
openclaw gateway
/vol1/1000/workspace/.openclaw/workspace
18789
20000
