AI 大行其道,以后必将成为每个人生活中必不可少的工具,不会使用怎么办???
没关系,我来教你如何本地安装部署本地。

目前上门安装可是很贵的,咸鱼上一次上门安装价格500+,看会了这篇教程立即净赚500,还不赶紧试一试!!!

1. 检查npm版本

在终端执行以下命令检查npm版本:

npm -v

若返回版本号(如9.6.7)表示已安装。若未安装,请参考MAC 安装/升级 npm/Node完成安装。


2. 设置npm镜像源

建议切换至国内镜像源,加速下载依赖:

npm config set registry https://registry.npmmirror.com

验证配置是否生效:

npm config get registry

3. 安装OpenClaw

通过官方推荐的安装方式执行安装(安装脚本执行成功后会自动进入初始化配置):

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

安装结束后会自动出现提示信息,请根据提示信息完成 OpenClaw 配置,参考配置如下:

配置项 配置内容
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 使用默认配置
Select channel (QuickStart) 选择 “Skip for now”,后续可以配置
Configure skills now? (recommended) 选择 “No”,后续可以配置。
Enable hooks? 按空格键选中选项,按回车键进入下一步。
How do you want to hatch your bot? 选择 “Web UI”。

4. 配置云模型接入

以上步骤执行完成后,默认会启动 openclaw gateway,如果没有自动启动,可以使用如下命令打开webUI

openclaw dashboard

注:这里接入的是阿里云百炼大模型(千问),需要个人开通订阅服务才能获取token,可以在个人用量范围内开通一个便宜的订阅套餐,不要 开启自动续费,体验一段时间后再确认是否继续订阅。

  1. 打开openclaw本地控制台

http://127.0.0.1:18789/

  1. 修改配置文件

webUI->设置->配置->Raw 中修改配置:
webUI->设置->配置->Raw

  • 在 JSON 根对象中加入如下 models 配置(如果已存在则替换)。请将 YOUR_API_KEY 替换为您的 Coding Plan API Key

注:以下不是完整json,请仅替换 JSON 根对象中 models 的配置内容;

"models": {
  "mode": "merge",
  "providers": {
    "bailian": {
      "baseUrl": "https://coding.dashscope.aliyuncs.com/v1",
      "apiKey": "YOUR_API_KEY",
      "api": "openai-completions",
      "models": [
        {
          "id": "qwen3.5-plus",
          "name": "qwen3.5-plus",
          "reasoning": false,
          "input": ["text", "image"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "contextWindow": 1000000,
          "maxTokens": 65536
        },
        {
          "id": "qwen3-max-2026-01-23",
          "name": "qwen3-max-2026-01-23",
          "reasoning": false,
          "input": ["text"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "contextWindow": 262144,
          "maxTokens": 65536
        },
        {
          "id": "qwen3-coder-next",
          "name": "qwen3-coder-next",
          "reasoning": false,
          "input": ["text"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "contextWindow": 262144,
          "maxTokens": 65536
        },
        {
          "id": "qwen3-coder-plus",
          "name": "qwen3-coder-plus",
          "reasoning": false,
          "input": ["text"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "contextWindow": 1000000,
          "maxTokens": 65536
        },
        {
          "id": "MiniMax-M2.5",
          "name": "MiniMax-M2.5",
          "reasoning": false,
          "input": ["text"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "contextWindow": 204800,
          "maxTokens": 131072
        },
        {
          "id": "glm-5",
          "name": "glm-5",
          "reasoning": false,
          "input": ["text"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "contextWindow": 202752,
          "maxTokens": 16384
        },
        {
          "id": "glm-4.7",
          "name": "glm-4.7",
          "reasoning": false,
          "input": ["text"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "contextWindow": 202752,
          "maxTokens": 16384
        },
        {
          "id": "kimi-k2.5",
          "name": "kimi-k2.5",
          "reasoning": false,
          "input": ["text", "image"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "contextWindow": 262144,
          "maxTokens": 32768
        }
      ]
    }
  }
}
  • 找到 agents.defaults 对象,并替换或添加以下两个字段:
"model": {
	"primary": "bailian/qwen3.5-plus"
},
"models": {
	 "bailian/qwen3.5-plus": {},
	 "bailian/qwen3-max-2026-01-23": {},
	 "bailian/qwen3-coder-next": {},
	 "bailian/qwen3-coder-plus": {},
	 "bailian/MiniMax-M2.5": {},
	 "bailian/glm-5": {},
	 "bailian/glm-4.7": {},
	 "bailian/kimi-k2.5": {}
}
  • 更新配置

配置编辑完成后,点击saveupdate,触发配置更新。
save 并 update 配置

  • 开始聊天吧

配置更新完成后,可以开始和AI助理聊天了。
AI助理会先让你给他取名、职责定位、确定称呼等。之后你就可以给他分配任务,让他开始干活了!
开始聊天

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐