1.安装nodejs 22+
# 添加nodejs安装包仓库地址脚本并执行
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
# 安装nodejs
sudo apt-get install nodejs
# 验证nodejs版本
node -v
2.npm设置国内源
npm config set registry https://registry.npmmirror.com
# 查看当前镜像源
npm config get registry
3.安装openclaw-cn
# 安装
npm install -g openclaw-cn@latest
# 运行安装向导
openclaw-cn onboard --install-daemon
# 启动网关, openclaw-cn gateway以前台启动, openclaw-cn gateway start以后台服务启动
openclaw-cn gateway
4.设置局域网访问
openclaw-cn config set gateway.bind lan
openclaw-cn config set gateway.controlUi.allowInsecureAuth true
5.从终端启动openclaw中文版对话框
openclaw-cn tui