1. 安装过程
安装nodejs
安装git
安装openclaw
1
| npm install -g openclaw@latest
|
2. 配置openclaw
- 运行引导命令
会出现配置引导页面。所有选项后续都可以调整
所以核心配置下 Model/auth provider (模型提供配置) 。
其它的都可以选择跳过。
如果使用的模型不是引导页面中支持的,还可以选择 Skip for now 。
后续通过配置文件进行文本配置,后面会给到 阿里百炼 的例子
配置操作示例:
| 配置项 |
建议配置 |
| I understand this is powerful and inherently risky. Continue? |
选择 Yes |
| Onboarding mode |
选择 QuickStart |
| Model/auth provider |
选择 Skip for now (稍后配置百炼模型) |
| Filter models by provider |
选择 All providers |
| Default model |
选择 Keep current |
| Select channel (QuickStart) |
选择 Skip for now (稍后配置渠道) |
| Configure skills now? (recommended) |
选择 No |
| Enable hooks? |
按空格键选中选项,按回车键进入下一步 |
| How do you want to hatch your bot? |
选择 Do this later |
接下来,需要为 OpenClaw 配置百炼模型以启用 AI 对话能力。
- 运行gateway
1
| openclaw gateway --port 18789
|
- 浏览器打开 http://127.0.0.1:18789
- 获取openclaw gateway token
OpenClaw Gateway 首次启动时会自动生成一个 Token 并保存在配置文件中。
打开配置文件(路径:C:\Users\你的用户名\.openclaw\openclaw.json),找到 gateway.auth.token 字段,复制其值(一串随机字符)。
1 2 3 4 5 6 7 8
| "gateway": { "port": 18789, "mode": "local", "bind": "loopback", "auth": { "mode": "token", "token": "xxxxxxxxxxxxxx" },
|
配置token

配置模型
如果你的模型不在引导页面的默认支持中,那么可以使用下面的配置方式。参照阿里云百炼的文档
1
| C:/Users/yourusername/.openclaw/openclaw.json
|
- 添加百炼配置
复制并粘贴以下配置内容,将DASHSCOPE_API_KEY替换为百炼 API Key:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| { "meta": { "lastTouchedVersion": "2026.2.1", "lastTouchedAt": "2026-02-03T08:20:00.000Z" }, "models": { "mode": "merge", "providers": { "bailian": { "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1", "apiKey": "DASHSCOPE_API_KEY", "api": "openai-completions", "models": [ { "id": "qwen3.5-plus", "name": "qwen3.5-plus", "reasoning": false, "input": ["text", "image"], "contextWindow": 1000000, "maxTokens": 65536 }, { "id": "qwen3-coder-next", "name": "qwen3-coder-next", "reasoning": false, "input": ["text"], "contextWindow": 262144, "maxTokens": 65536 } ] } } }, "agents": { "defaults": { "model": { "primary": "bailian/qwen3.5-plus" }, "models": { "bailian/qwen3.5-plus": {}, "bailian/qwen3-coder-next": {} } } }, "gateway": { "mode": "local", "auth": { "mode": "token", "token": "test123" } } }
|
3. gateway后台常驻相关命令
- gateway 安装
1
| openclaw gateway install
|
- gateway 启动
- gateway 关闭
- gateway 卸载
1
| openclaw gateway uninstall
|
相关路径
- workspace
1
| C:\Users\yourusername\.openclaw\workspace
|
skills 市场
skills
找到合适的技能后,将具体的链接给openclaw,和他对话,让他自己安装就可以。如果遇到网络问题,openclaw无法打开对应的网页。你也可以自己下载skills后,告诉小龙虾你的下载路径,让他自己安装

nginx 反向代理配置
nginx配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| server { #监听443端口 listen 443 ssl; #你的域名 server_name youropenclawdomain.xxx.xxx; #ssl证书的pem文件路径 include /config/nginx/ssl.conf; proxy_http_version 1.1; # webscoket proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; # real ip proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Proto $scheme; location / { proxy_pass http://youropenclawip:18789; } }
|
opencalw配置信任域名
1 2 3 4 5 6 7 8 9 10 11
| "gateway": { "port": 18789, "mode": "local", "bind": "lan", "controlUi": { "allowedOrigins": [ "http://localhost:18789", "http://127.0.0.1:18789", "https://youropenclawdomain.xxx.xxx" ] },
|
设备配对
devices docs
批准待处理的设备配对请求。如果省略 requestId,OpenClaw 会自动批准最近一次待处理的请求。
1 2 3
| openclaw devices approve openclaw devices approve <requestId> openclaw devices approve --latest
|