Documentation Index
Fetch the complete documentation index at: https://openclaw.zhcndoc.com/llms.txt
Use this file to discover all available pages before exploring further.
openclaw daemon
网关服务管理命令的旧别名。
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,--jsonrestart:--force,--wait <duration>,--json- lifecycle (
uninstall|start|stop):--json
status会在可能的情况下解析已配置的 auth SecretRef,用于探测认证。- 如果在此命令路径中某个必需的 auth SecretRef 未解析,
daemon status --json会在探测连接/认证失败时报告rpc.authWarning;请显式传入--token/--password,或先解析 secret 来源。 - 如果探测成功,则会抑制未解析的 auth-ref 警告,以避免误报。
status --deep会额外进行一次尽力而为的系统级服务扫描。当发现其他类似 gateway 的服务时,人工输出会打印清理提示,并警告“一台机器一个 gateway”仍然是正常建议。- 在 Linux 的 systemd 安装中,
status的 token 漂移检查会同时包含Environment=和EnvironmentFile=单元来源。 - 漂移检查会使用合并后的运行时环境解析
gateway.auth.token的 SecretRef(先用服务命令环境,再用进程环境回退)。 - 如果 token 认证并未实际启用(
gateway.auth.mode明确为password/none/trusted-proxy,或者未设置 mode 且密码可能生效并且没有 token 候选可以生效),token 漂移检查会跳过配置 token 的解析。 - 当 token 认证需要 token 且
gateway.auth.token由 SecretRef 管理时,install会验证该 SecretRef 可解析,但不会将解析后的 token 持久化到服务环境元数据中。 - 如果 token 认证需要 token,而配置的 token SecretRef 未解析,安装会失败并关闭。
- 如果同时配置了
gateway.auth.token和gateway.auth.password,且gateway.auth.mode未设置,则安装会被阻止,直到显式设置 mode。 - 在 macOS 上,
install会保持 LaunchAgent plist 仅限所有者可读写,并通过仅所有者可访问的文件和包装器加载托管的服务环境值,而不是将 API 密钥或 auth-profile 环境引用序列化到EnvironmentVariables中。 - 如果你有意在一台主机上运行多个 gateway,请隔离端口、配置/状态和工作区;参见 /gateway#multiple-gateways-same-host。
优先使用
当前文档和示例请使用openclaw gateway。