OpenClaw从入门到应用——CLI:Daemon
通过OpenClaw实现副业收入:《OpenClaw赚钱实录:从“养龙虾“到可持续变现的实践指南》
用法
theme={"theme":{"light":"min-light","dark":"min-dark"}}openclaw daemon status openclaw daemoninstallopenclaw daemon start openclaw daemon stop openclaw daemon restart openclaw daemon uninstall子命令
status:显示服务安装状态并探测网关健康情况install:安装服务(launchd/systemd/schtasks)uninstall:移除服务start:启动服务stop:停止服务restart:重启服务
通用选项
status:--url,--token,--password,--timeout,--no-probe,--deep,--jsoninstall:--port,--runtime,--token,--force,--json- 生命周期命令(
uninstall|start|stop|restart):--json
注意:
status会在可能时解析已配置的认证 SecretRef,用于探测时的认证。- 在 Linux systemd 安装中,
status的 token 漂移检查会同时检查Environment=和EnvironmentFile=单元来源。 - 当令牌认证需要令牌并且
gateway.auth.token由 SecretRef 管理时,install会验证该 SecretRef 是否可解析,但不会将解析后的令牌持久化到服务环境元数据中。 - 如果令牌认证需要令牌,但配置的 token SecretRef 无法解析,则安装失败并终止。
- 如果同时配置了
gateway.auth.token和gateway.auth.password,且gateway.auth.mode未设置,则安装会被阻止,直到显式设置了 mode。
