Skip to content

Linux 應用程式

Gateway 在 Linux 上受到完整支援。Node 是建議的執行環境。 不建議在 Gateway 上使用 Bun(WhatsApp/Telegram 錯誤)。

原生 Linux 伴隨應用程式正在計畫中。如果您願意協助建構,歡迎貢獻。

  1. 安裝 Node 24(建議;Node 22 LTS,目前為 22.14+,為了相容性仍可使用)
  2. npm i -g openclaw@latest
  3. openclaw onboard --install-daemon
  4. 從您的筆記型電腦:ssh -N -L 18789:127.0.0.1:18789 <user>@<host>
  5. 開啟 http://127.0.0.1:18789/ 並貼上您的權杖

完整的 Linux 伺服器指南:Linux Server。逐步 VPS 範例:exe.dev

使用其中一個:

openclaw onboard --install-daemon

或是:

openclaw gateway install

或是:

openclaw configure

當提示時選擇 Gateway service

修復/遷移:

openclaw doctor

OpenClaw 預設安裝 systemd user 服務。針對共用或恆線伺服器 請使用 system 服務。完整的單元範例與指引位於 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