Ubuntu 部署 OpenClaw 完整教程
环境信息
- 系统: Ubuntu 22.04 LTS
- 配置: 4 核 8GB 内存,100M 带宽
- 类型: CPU
一、安装依赖
1.1 更新系统包索引
sudo apt update
1.2 安装 curl
sudo apt install -y curl
1.3 通过 NodeSource 安装最新稳定 LTS 版本
# 添加 NodeSource 仓库并安装
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# 安装完成后,验证版本
node -v
npm -v
实际输出:
ubuntu@gt-ubuntu22-04-cmd-v3-0-8gb-100m:~$ node -v
v24.14.0
ubuntu@gt-ubuntu22-04-cmd-v3-0-8gb-100m:~$ npm -v
11.9.0
1.4 设置淘宝镜像(最常用)
npm config set registry https://registry.npmmirror.com
# 查询是否配置成功
npm config get registry
验证输出:
ubuntu@gt-ubuntu22-04-cmd-v3-0-8gb-100m:~$ npm config get registry
https://registry.npmmirror.com
二、安装 OpenClaw
执行安装脚本(注意:安装过程中要勾选 yes):
curl -fsSL https://openclaw.ai/install.sh | bash


