Linux
Gateway 在 Linux 上完全支持。推荐使用 Node 作为运行时。 不建议用 Bun 跑 Gateway(WhatsApp/Telegram 会出 bug)。
原生 Linux 伴侣应用在计划中。欢迎贡献代码。
新手快速上手(VPS)
- 安装 Node 24(推荐;Node 22 LTS 目前
22.16+也可兼容使用) npm i -g openclaw@latestopenclaw onboard --install-daemon- 从你的笔记本:
ssh -N -L 18789:127.0.0.1:18789 <user>@<host> - 打开
http://127.0.0.1:18789/并粘贴 token
分步 VPS 指南:exe.dev
安装
Gateway
Gateway 服务安装(CLI)
以下方式均可:
openclaw onboard --install-daemon
或者:
openclaw gateway install
或者:
openclaw configure
出现提示时选择 Gateway service。
修复/迁移:
openclaw doctor
系统服务(systemd 用户单元)
OpenClaw 默认安装为 systemd 用户服务。如果是共享或常驻服务器,建议使用 system 服务。完整 unit 示例和说明见 Gateway 操作手册。
最简配置:
创建 ~/.config/systemd/user/openclaw-gateway[-<profile>].service:
[Unit]
Description=OpenClaw Gateway (profile: <profile>, v<version>)
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/local/bin/openclaw gateway --port 18789
Restart=always
RestartSec=5
[Install]
WantedBy=default.target
启用:
systemctl --user enable --now openclaw-gateway[-<profile>].service