Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
openclaw daemon
Gateway 服務管理命令的舊版別名。
openclaw daemon ... 對應到與 openclaw gateway ... 服務命令相同的服務控制介面。
用法
子命令
status:顯示服務安裝狀態並探測 Gateway 健康狀態install:安裝服務(launchd/systemd/schtasks)uninstall:移除服務start:啟動服務stop:停止服務restart:重新啟動服務
常用選項
status:--url、--token、--password、--timeout、--no-probe、--require-rpc、--deep、--jsoninstall:--port、--runtime <node|bun>、--token、--force、--json- 生命週期(
uninstall|start|stop|restart):--json
status會在可能時解析已設定的 auth SecretRefs,以用於探測驗證。- 如果此命令路徑中所需的 auth SecretRef 未解析,當探測連線能力/驗證失敗時,
daemon status --json會回報rpc.authWarning;請明確傳入--token/--password,或先解析祕密來源。 - 如果探測成功,未解析的 auth-ref 警告會被抑制,以避免誤判。
status --deep會加入盡力而為的系統層級服務掃描。當它找到其他類似 gateway 的服務時,人類可讀輸出會列印清理提示,並警告每台機器一個 gateway 仍是一般建議。- 在 Linux systemd 安裝中,
status權杖漂移檢查會同時包含Environment=和EnvironmentFile=單元來源。 - 漂移檢查會使用合併後的執行階段環境解析
gateway.auth.tokenSecretRefs(先用服務命令環境,再退回程序環境)。 - 如果權杖驗證實際上未啟用(明確的
gateway.auth.mode為password/none/trusted-proxy,或模式未設定且密碼可勝出、沒有權杖候選可勝出),權杖漂移檢查會略過設定權杖解析。 - 當權杖驗證需要權杖且
gateway.auth.token由 SecretRef 管理時,install會驗證 SecretRef 可解析,但不會將解析後的權杖持久化到服務環境中繼資料。 - 如果權杖驗證需要權杖,而已設定的權杖 SecretRef 未解析,安裝會以關閉方式失敗。
- 如果同時設定了
gateway.auth.token和gateway.auth.password,且gateway.auth.mode未設定,安裝會被封鎖,直到明確設定模式。 - 在 macOS 上,
install會讓 LaunchAgent plists 僅限擁有者存取,並透過僅限擁有者存取的檔案和 wrapper 載入受管理的服務環境值,而不是將 API 金鑰或 auth-profile 環境參照序列化到EnvironmentVariables。 - 如果你刻意在同一台主機上執行多個 gateways,請隔離連接埠、設定/狀態和工作區;請參閱 /gateway#multiple-gateways-same-host。
建議
請使用openclaw gateway 查看目前的文件與範例。