OpenClaw 是一个开源的 AI 代理系统,提供完整的 API 网关、渠道管理和监控 Dashboard 功能。本手册将帮助你快速部署和管理 OpenClaw 系统。
OpenClaw 系统由以下核心组件组成:
使用二进制安装:
# 下载最新版本
wget https://github.com/clawstu/openclaw/releases/latest/download/openclaw-linux-amd64.tar.gz
# 解压
tar -xzf openclaw-linux-amd64.tar.gz
cd openclaw
# 安装
./install.sh
# 前台启动(调试用)
openclaw gateway --port 18789
# 后台守护进程启动
openclaw gateway --port 18789 --daemon
# 安装为系统服务
openclaw gateway install
/etc/openclaw/config.yaml~/.openclaw/config.yaml./config.yaml# 服务器配置
server:
port: 18789
host: "0.0.0.0"
# 数据库配置
database:
type: "mysql" # 或 "postgresql"
host: "localhost"
port: 3306
username: "openclaw"
password: "your_password"
name: "openclaw"
# 日志配置
log:
level: "info" # debug, info, warn, error
file: "/var/log/openclaw/gateway.log"
OpenClaw 支持接入多个 AI 服务提供商,通过 Channel 模块进行管理。
openclaw channel add --name "openai-prod" --type openai --key "sk-xxx"
Dashboard 提供以下监控功能:
openclaw gateway status
openclaw gateway restart
tail -f /var/log/openclaw/gateway.log