Skip to Content

1. 前置依赖

OpenClaw 需要以下工具:

依赖版本要求
Node.js24(推荐),支持 22 LTS(22.16+)
Git任意版本

如果尚未安装,请先查看 前置依赖安装指引


2. 安装 OpenClaw

如果下载失败或超时,见下方常见问题 — 网络代理配置

方式一:安装脚本(推荐)

使用官方安装脚本,自动处理 Node 检测、安装和新手引导:

macOS / Linux / WSL2:

curl -fsSL https://openclaw.ai/install.sh | bash

Windows (PowerShell):

iwr -useb https://openclaw.ai/install.ps1 | iex

方式二:npm 安装

# 全局安装 npm install -g openclaw@latest # 运行新手引导并安装守护进程 openclaw onboard --install-daemon

验证安装:

openclaw --version

3. 基础配置

安装脚本会自动运行新手引导,完成以下配置:

  • 创建配置文件和状态目录(默认 ~/.openclaw/
  • 安装并启动 Gateway 网关服务
  • 引导配置 AI 模型 API Key
  • 设置安全认证

如果跳过了新手引导,可以手动运行:

openclaw onboard --install-daemon

配置 API Key

API Key 在 openclaw onboard 新手引导过程中会自动引导配置。如果需要后续修改,可以重新运行 onboard 或在 OpenClaw 的 Web 界面中调整。

安全配置要点

OpenClaw 默认配置 bind: "loopback",即只允许本机访问(127.0.0.1),同时会自动生成 token 用于认证。切勿将 bind 修改为非 loopback 模式,否则会暴露到局域网甚至公网。

验证配置

# 检查配置和系统状态 openclaw doctor # 打开浏览器 UI openclaw dashboard

4. 启动 OpenClaw

Gateway 网关服务已自动启动,直接打开浏览器 UI:

openclaw dashboard

访问 http://localhost:18789,使用配置的密码登录。


5. 连接 Signal Skills

步骤 A:获取 API Key

前往 授权申请 页面获取 Signal Skills API Key。详细流程见 快速开始

步骤 B:下载技能包

下载 OpenClaw 版技能包 并解压,解压后得到 trade-signal-skills-openclaw 目录:

trade-signal-skills-openclaw/ ├── feed/ ├── analysis/ ├── mcporter.json.example ← MCP 连接配置模板 ├── openclaw.json.example ← Skills 加载配置模板 ├── soul.md └── README.md

步骤 C:配置 MCP 连接

1. 安装 mcporter

mcporter  是 OpenClaw 用于连接 MCP 服务的工具:

npm install -g mcporter@latest

2. 创建 mcporter 配置

创建配置目录:

macOS / Linux / WSL2:

mkdir -p ~/.mcporter

Windows (PowerShell):

mkdir -p $env:USERPROFILE\.mcporter

参照技能包内的 mcporter.json.example,创建配置文件并填入实际值:

macOS / Linux / WSL2: ~/.mcporter/mcporter.json

Windows: C:\Users\你的用户名\.mcporter\mcporter.json

{ "mcpServers": { "trade-signal": { "type": "http", "url": "<Feed 服务地址>/mcp", "headers": { "x-api-key": "<你的 Signal Skills API Key>" } } } }

步骤 D:配置 Skills 加载

编辑 ~/.openclaw/openclaw.json(Windows 为 %USERPROFILE%\.openclaw\openclaw.json),添加 Skills 加载路径和 mcporter 配置:

macOS / Linux / WSL2:

{ "skills": { "load": { "extraDirs": [ "/Users/你的用户名/.agents/skills/trade-signal-skills-openclaw/feed", "/Users/你的用户名/.agents/skills/trade-signal-skills-openclaw/analysis" ] }, "entries": { "mcporter": { "enabled": true, "env": { "MCPORTER_CONFIG": "/Users/你的用户名/.mcporter/mcporter.json" } } } } }

Windows:

{ "skills": { "load": { "extraDirs": [ "C:\\Users\\你的用户名\\.agents\\skills\\trade-signal-skills-openclaw\\feed", "C:\\Users\\你的用户名\\.agents\\skills\\trade-signal-skills-openclaw\\analysis" ] }, "entries": { "mcporter": { "enabled": true, "env": { "MCPORTER_CONFIG": "C:\\Users\\你的用户名\\.mcporter\\mcporter.json" } } } } }

注意:路径必须使用绝对路径。Windows 路径中的反斜杠 \ 需要写成 \\

步骤 E:移动技能包到目标目录

配置完成后,将解压的技能包移动到 OpenClaw skills 目录:

macOS / Linux / WSL2:

mkdir -p ~/.agents/skills/ mv trade-signal-skills-openclaw ~/.agents/skills/

Windows (PowerShell):

mkdir -p $env:USERPROFILE\.agents\skills\ Move-Item trade-signal-skills-openclaw $env:USERPROFILE\.agents\skills\

步骤 F:重启并验证

# 重启 Gateway openclaw gateway restart # 验证 Skills 加载 openclaw skills list

开始使用

配置完成后,在 OpenClaw 对话界面中直接提问即可:

查一下贵州茅台实时行情 帮我深度分析一下宁德时代 今天 A 股市场怎么样,帮我复盘一下

常见问题

网络代理配置

安装时使用淘宝镜像(国内用户推荐):

npm install -g openclaw@latest --registry=https://registry.npmmirror.com

运行时配置代理(访问 AI API):

# macOS/Linux export HTTP_PROXY="http://127.0.0.1:7890" export HTTPS_PROXY="http://127.0.0.1:7890" # Windows (PowerShell) $Env:HTTP_PROXY="http://127.0.0.1:7890" $Env:HTTPS_PROXY="http://127.0.0.1:7890"

端口号 7890 以你本地代理工具的实际端口为准(Clash 7890、V2Ray 10809)。

无法访问 Web 界面

  1. 确认 OpenClaw 已启动:openclaw status
  2. 确认访问地址为 http://localhost:18789
  3. 检查防火墙是否阻止了本地访问

如何更新

npm install -g openclaw@latest

如何卸载

# 推荐方式 openclaw uninstall # 或手动卸载 npm rm -g openclaw rm -rf ~/.openclaw # macOS/Linux

常用命令

命令说明
openclaw dashboard打开浏览器 UI
openclaw status查看运行状态
openclaw doctor检查配置问题
openclaw uninstall卸载 OpenClaw

免责声明

使用 OpenClaw 需自行承担安全风险、数据风险和合规风险。本文档作者和 Signal Skills 团队不对因使用 OpenClaw 导致的任何损失承担责任。

建议: 仅在可信任的本地环境部署,定期备份数据,及时更新版本。

Last updated on