Clawdbot Linux 設定
在 Linux 伺服器上執行 Clawdbot AI 助手,完整支援 Gateway、systemd 服務管理及 VPS 部署。
Clawdbot Linux 概覽
Clawdbot Gateway 在 Linux 上完整支援。Node 是建議的執行環境。由於 WhatsApp/Telegram 存在問題,不建議在 Gateway 使用 Bun。
原生 Linux 配套應用程式正在規劃中,歡迎貢獻。
新手快速路徑(VPS)
# 安裝 Node 22+
npm i -g clawdbot@latest
clawdbot onboard --install-daemon從您的筆電:
ssh -N -L 18789:127.0.0.1:18789 <user>@<host>開啟 http://127.0.0.1:18789/ 並貼上您的 token。
安裝
請參閱主要安裝指南:
可選流程:
Gateway 服務安裝(CLI)
使用以下方法之一:
# 選項 1:在引導過程中
clawdbot onboard --install-daemon
# 選項 2:直接安裝
clawdbot gateway install
# 選項 3:互動式設定
clawdbot configure
# 提示時選擇「Gateway service」修復/遷移:
clawdbot doctor系統控制(systemd 使用者單元)
Clawdbot 預設安裝 systemd 使用者服務。對於共享或常駐伺服器,請使用系統服務。
最小設定
建立 ~/.config/systemd/user/clawdbot-gateway.service:
[Unit]
Description=Clawdbot Gateway
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/local/bin/clawdbot gateway --port 18789
Restart=always
RestartSec=5
[Install]
WantedBy=default.target啟用它:
systemctl --user enable --now clawdbot-gateway.service服務管理
# 檢查狀態
systemctl --user status clawdbot-gateway
# 查看日誌
journalctl --user -u clawdbot-gateway -f
# 重新啟動
systemctl --user restart clawdbot-gateway
# 停止
systemctl --user stop clawdbot-gateway啟用 Lingering
若要在登出後保持服務執行:
sudo loginctl enable-linger $USERVPS 部署
VPS 部署請參閱詳細指南:
- 遠端存取的 SSH 通道
- 安全網路的 Tailscale
- 容器化部署的 Docker
基本 VPS 設定
- 在您的 VPS 上安裝 Clawdbot
- 設定 Gateway
- 設定 SSH 通道或 Tailscale
- 遠端存取控制 UI
健康檢查
clawdbot status
clawdbot health
clawdbot doctor後續步驟
- Clawdbot macOS - macOS 設定
- Clawdbot Windows - Windows WSL2 設定
- Clawdbot Gateway - Gateway 設定