Skip to content

openclaw daemon

Gateway 服务管理命令的旧版别名。

openclaw daemon ...openclaw gateway ... 服务控制命令对应同一套服务管控接口。

用法

bash
openclaw daemon status
openclaw daemon install
openclaw daemon start
openclaw daemon stop
openclaw daemon restart
openclaw daemon uninstall

子命令

  • status:显示服务安装状态并探测 Gateway 健康状况
  • install:安装服务(launchd/systemd/schtasks
  • uninstall:卸载服务
  • start:启动服务
  • stop:停止服务
  • restart:重启服务

常用选项

  • status--url--token--password--timeout--no-probe--require-rpc--deep--json
  • install--port--runtime <node|bun>--token--force--json
  • 生命周期命令(uninstall|start|stop|restart):--json

注意事项

  • status 在可能时会解析配置的 auth SecretRef 用于探测认证。
  • 如果在此命令路径下必需的 auth SecretRef 无法解析,daemon status --json 会在探测连接/认证失败时报告 rpc.authWarning;请显式传入 --token/--password 或先解决 secret 来源问题。
  • 如果探测成功,未解析的 auth-ref 警告会被抑制,避免误报。
  • 在 Linux systemd 安装中,status 的 token 漂移检查同时包括 Environment=EnvironmentFile= 单元来源。
  • 当 token 认证需要 token 且 gateway.auth.token 由 SecretRef 管理时,install 会验证 SecretRef 可解析性,但不会将解析后的 token 写入服务环境元数据。
  • 如果 token 认证需要 token 而配置的 token SecretRef 无法解析,install 会失败关闭。
  • 如果同时配置了 gateway.auth.tokengateway.auth.password,且 gateway.auth.mode 未设置,install 会被阻止,直到明确设置 mode。

推荐使用

新脚本请改用 openclaw gateway 以获取最新文档和示例。

提示openclaw daemon 是历史遗留命令,功能与 openclaw gateway 完全一致。如果你刚开始养龙虾,直接用 openclaw gateway 命令即可。