网关运行手册
网关运行手册
本页面用于网关服务的 day-1 启动和 day-2 运维。
深度故障排除
以症状为导向的诊断,包含精确的命令阶梯和日志特征。
配置
任务导向的设置指南 + 完整配置参考。
密钥管理
SecretRef 契约、运行时快照行为和迁移/重载操作。
密钥计划契约
精确的 secrets apply 目标/路径规则和仅引用的认证配置文件行为。
5 分钟本地启动
1
启动网关
openclaw gateway --port 18789
# debug/trace 镜像到标准输出
openclaw gateway --port 18789 --verbose
# 强制终止选定端口上的监听器,然后启动
openclaw gateway --force
2
验证服务健康
openclaw gateway status
openclaw status
openclaw logs --follow
健康基线:Runtime: running 和 RPC probe: ok。
3
打开控制 UI
openclaw dashboard
在浏览器中打开 http://localhost:18789/openclaw。
日常运维
检查网关状态
# 完整状态
openclaw gateway status
# 快速健康检查
openclaw health
# 查看日志
openclaw logs --tail 100
重启网关
# 优雅重启
openclaw gateway restart
# 强制重启
openclaw gateway restart --force
配置管理
# 查看当前配置
openclaw gateway config.get
# 应用配置
openclaw gateway config.apply /path/to/config.json
# 补丁配置
openclaw gateway config.patch '{"agents": {"defaults": {"model": {"primary": "anthropic/claude-3.5-sonnet"}}}}'
生产部署
作为系统服务运行
macOS:
openclaw gateway install-daemon
Linux (systemd):
openclaw gateway install-daemon --user
健康检查端点
网关提供 HTTP 健康检查:
curl http://localhost:18789/health
响应示例:
{
"status": "ok",
"uptime": "2h15m",
"agents": 3,
"channels": 2
}
故障排除
相关文档: