Ubuntu操作系统服务器安装OpenClaw详细教程
·
需要先切换root才可以安装依赖
sudo -i
先更新系统依赖
apt update && apt upgrade -y
安装 Linux 构建工具(对应脚本里的 make/g++/cmake/python3)
apt install -y build-essential cmake python3 python3-pip
安装系统原生 Node.js 22.x
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
配置阿里云npm源
npm config set registry https://registry.npmmirror.com
配置腾讯云npm源 ( 二选一 )
npm config set registry http://mirrors.tencent.com/npm/
避免 SSL 校验失败
npm config set strict-ssl false
移除代理配置
npm config delete proxy
npm config delete https-proxy
查看配置信息
npm config list
npm config ls -l | grep registry
npm config get registry
安装 OpenClaw指定版本 ( 推荐安装 2026.3.8或者2026.3.28 )
npm add -g openclaw@v2026.3.28
npm add -g openclaw@v2026.3.8
先验证版本( 确保没有安装失败 )
openclaw --version
which openclaw
测试 openclaw 是否正常
直接运行测试
openclaw --help
需要自行手动安装通道,默认使用的飞书。根据自己的实际情况来定
初始化openclaw
openclaw onboard
启动
openclaw gateway start
停止
openclaw gateway stop
重启
openclaw gateway restart
强制重启
openclaw gateway stop && sleep 2 && openclaw gateway start
状态
openclaw gateway status
设备配对,批准最新设备配对
openclaw devices approve --latest
查看已配对设备
openclaw devices list
验证进程
ps aux | grep openclaw | grep -v grep
验证是否在跑
ps aux | grep openclaw
更多推荐




所有评论(0)