openclaw daemon

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

openclaw daemon ... 映射到与 openclaw gateway ... 服务命令相同的控制接口。

用法

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, --deep, --json
  • install--port, --runtime <node|bun>, --token, --force, --json
  • 生命周期命令(uninstall|start|stop|restart):--json

注意事项:

  • status 在可能时会解析配置的认证 SecretRef 用于探测认证。
  • 在 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 获取最新的文档和示例。