Linux 安装指南
Linux 是运行 OpenClaw 作为全天候服务的理想选择。
# 更新系统sudo apt update && sudo apt upgrade -y
# 安装 Pythonsudo apt install python3.11 python3.11-venv python3-pip git -y
# 克隆并设置git clone https://github.com/openclaw/openclaw.gitcd openclawpython3.11 -m venv venvsource venv/bin/activatepip install -r requirements.txt作为服务运行
Section titled “作为服务运行”使用 systemd
Section titled “使用 systemd”创建 /etc/systemd/system/openclaw.service:
[Unit]Description=OpenClaw AI AssistantAfter=network.target
[Service]Type=simpleUser=openclawWorkingDirectory=/home/openclaw/openclawExecStart=/home/openclaw/openclaw/venv/bin/python -m openclawRestart=always
[Install]WantedBy=multi-user.target启用并启动:
sudo systemctl daemon-reloadsudo systemctl enable openclawsudo systemctl start openclawVPS 推荐
Section titled “VPS 推荐”| 提供商 | 最低配置 | 价格 |
|---|---|---|
| DigitalOcean | 1GB RAM | ~$6/月 |
| Vultr | 1GB RAM | ~$6/月 |
| Hetzner | 2GB RAM | ~$4/月 |