OpenClaw最近很红火。OpenClaw 是一个轻量级的 AI 代理框架,能打通各种即时通讯软件(比如 QQ、Telegram 等)与各大 AI 大模型(如 ChatGPT、Claude、deepseek、智谱清言等)之间的壁垒。有了它,可以把QQ变成一个拥有超强智力的 AI 助手,不仅能聊天,还能处理各种复杂的任务,甚至直接操作电脑。本文记录了在本地nas上部署并接入QQ的过程。

nas部署OpenClaw

OpenClaw能本地直接安装运行,安全起见,这里部署在docker里。
主机是n5095+16G内存。
项目地址:https://github.com/1186258278/OpenClawChineseTranslation
这是中文汉化版。
docker-compose.yml:

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
services:
openclaw:
image: 1186258278/openclaw-zh:nightly
container_name: openclaw
ports:
- "18789:18789" # 修正:移除多余空格,确保端口号在引号内
volumes:
# 数据持久化(注意:容器以 root 用户运行,配置存储在 /root/.openclaw)
- openclaw-data:/root/.opanclaw/
environment:
# 访问令牌(推荐设置,用于 Dashboard 认证)
- OPENCLAW_GATEWAY_TOKEN=1234567890
# 跳过首次初始化检查(仅高级用户使用)
# - OPENCLAW_SKIP_SETUP=1
restart: unless-stopped
# 默认启动 gateway(首次需要初始化,见下方说明)
command: openclaw gateway run --allow-unconfigured
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:18789/health", "||", "exit", "0"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
openclaw-data:

构建完成后,进入docker内部执行下面的命令。
ssh连接再docker exec -it openclaw bash或web登录fnos,打开Docker图标,点开容器,点击openclaw后面的三个点,选择终端,点击左边的连接/bin/bash进入(不太好用)。
openclaw onboard --install-daemon
选择yes继续,初始化模式,选择快速开始。
模型认证提供商,选择千问,选中后回车,再次确认Qwen OAuth,然后就会调出一个网址。
复制这段网址到浏览器打开,有账号的直接关联,没账号的注册账号(用github帐号可直接关联)。认证成功
返回命令行界面继续配置,default modle选择第一个。




openclaw --version
2026.3.7

安装qqbot

npm install @sliverp/qqbot@1.3.7 --save
复制插件到 OpenClaw 扩展目录,
插件在/.openclaw\node_modules@sliverp\qqbot,扩展目录/.openclaw\node_modules\openclaw\extensions\qqbot
进入插件目录,
cp -r qqbot/ ../../extensions/
openclaw plugins enable qqbot
输出:

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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
root@cf6278f92b5d:~/.openclaw# npm install @sliverp/qqbot@1.3.7 --save
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: 'moltbot@0.1.0',
npm warn EBADENGINE required: { node: '>=24', pnpm: '>=10' },
npm warn EBADENGINE current: { node: 'v22.22.1', npm: '10.9.4' }
npm warn EBADENGINE }
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated gauge@3.0.2: This package is no longer supported.
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm warn deprecated glob@11.1.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated tar@7.5.4: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated tar@6.2.1: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated tar@6.2.1: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me

added 737 packages in 2m

136 packages are looking for funding
run `npm fund` for details
root@cf6278f92b5d:~/.openclaw# openclaw plugins list
01:39:36 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: qqbot (/root/.openclaw/extensions/qqbot/index.ts). Set plugins.allow to explicit trusted ids.
01:39:36 [plugins] qqbot: loaded without install/load-path provenance; treat as untracked local code and pin trust via plugins.allow or install records (/root/.openclaw/extensions/qqbot/index.ts)

🦞 OpenClaw 中文版 2026.3.7 (bfc36cc) — I can't fix your code taste, but I can fix your build and your backlog.

Plugins (6/39 loaded)
Source roots:
stock: /app/extensions
global: /root/.openclaw/extensions

┌──────────────┬──────────┬──────────┬─────────────────────────────────────────────────────────────────────────────────────────────────┬──────────┐
│ Name │ ID │ Status │ Source │ Version │
├──────────────┼──────────┼──────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┤
│ ACPX Runtime │ acpx │ disabled │ stock:acpx/index.ts2026.3.7
│ │ │ │ ACP runtime backend powered by acpx with configurable command path and version policy. │ │
│ @openclaw/ │ bluebubb │ disabled │ stock:bluebubbles/index.ts2026.3.7
│ bluebubbles │ les │ │ OpenClaw BlueBubbles channel plugin │ │
│ @openclaw/ │ copilot- │ disabled │ stock:copilot-proxy/index.ts2026.3.7
│ copilot- │ proxy │ │ OpenClaw Copilot Proxy provider plugin │ │
│ proxy │ │ │ │ │
│ Device │ device- │ loaded │ stock:device-pair/index.ts │ │
│ Pairing │ pair │ │ Generate setup codes and approve device pairing requests. │ │
│ @openclaw/ │ diagnost │ disabled │ stock:diagnostics-otel/index.ts2026.3.7
│ diagnostics- │ ics-otel │ │ OpenClaw diagnostics OpenTelemetry exporter │ │
│ otel │ │ │ │ │
│ Diffs │ diffs │ disabled │ stock:diffs/index.ts2026.3.7
│ │ │ │ Read-only diff viewer and file renderer for agents. │ │
│ @openclaw/ │ discord │ disabled │ stock:discord/index.ts2026.3.7
│ discord │ │ │ OpenClaw Discord channel plugin │ │
│ @openclaw/ │ feishu │ disabled │ stock:feishu/index.ts2026.3.7
│ feishu │ │ │ OpenClaw Feishu/Lark channel plugin (community maintained by @m1heng) │ │
│ @openclaw/ │ google- │ disabled │ stock:google-gemini-cli-auth/index.ts2026.3.7
│ google- │ gemini- │ │ OpenClaw Gemini CLI OAuth provider plugin │ │
│ gemini-cli- │ cli-auth │ │ │ │
│ auth │ │ │ │ │
│ @openclaw/ │ googlech │ disabled │ stock:googlechat/index.ts2026.3.7
│ googlechat │ at │ │ OpenClaw Google Chat channel plugin │ │
│ @openclaw/ │ imessage │ disabled │ stock:imessage/index.ts2026.3.7
│ imessage │ │ │ OpenClaw iMessage channel plugin │ │
│ @openclaw/ │ irc │ disabled │ stock:irc/index.ts2026.3.7
│ irc │ │ │ OpenClaw IRC channel plugin │ │
│ @openclaw/ │ line │ disabled │ stock:line/index.ts2026.3.7
│ line │ │ │ OpenClaw LINE channel plugin │ │
│ LLM Task │ llm-task │ disabled │ stock:llm-task/index.ts2026.3.7
│ │ │ │ Generic JSON-only LLM tool for structured tasks callable from workflows. │ │
│ Lobster │ lobster │ disabled │ stock:lobster/index.ts2026.3.7
│ │ │ │ Typed workflow tool with resumable approvals. │ │
│ @openclaw/ │ matrix │ disabled │ stock:matrix/index.ts2026.3.7
│ matrix │ │ │ OpenClaw Matrix channel plugin │ │
│ @openclaw/ │ mattermo │ disabled │ stock:mattermost/index.ts2026.3.7
│ mattermost │ st │ │ OpenClaw Mattermost channel plugin │ │
│ Memory │ memory- │ loaded │ stock:memory-core/index.ts2026.3.7
│ (Core) │ core │ │ File-backed memory search tools and CLI │ │
│ @openclaw/ │ memory- │ disabled │ stock:memory-lancedb/index.ts2026.3.7
│ memory- │ lancedb │ │ OpenClaw LanceDB-backed long-term memory plugin with auto-recall/capture │ │
│ lancedb │ │ │ │ │
│ @openclaw/ │ minimax- │ disabled │ stock:minimax-portal-auth/index.ts2026.3.7
│ minimax- │ portal- │ │ OpenClaw MiniMax Portal OAuth provider plugin │ │
│ portal-auth │ auth │ │ │ │
│ @openclaw/ │ msteams │ disabled │ stock:msteams/index.ts2026.3.7
│ msteams │ │ │ OpenClaw Microsoft Teams channel plugin │ │
│ @openclaw/ │ nextclou │ disabled │ stock:nextcloud-talk/index.ts2026.3.7
│ nextcloud- │ d-talk │ │ OpenClaw Nextcloud Talk channel plugin │ │
│ talk │ │ │ │ │
│ @openclaw/ │ nostr │ disabled │ stock:nostr/index.ts2026.3.7
│ nostr │ │ │ OpenClaw Nostr channel plugin for NIP-04 encrypted DMs │ │
│ OpenProse │ open- │ disabled │ stock:open-prose/index.ts2026.3.7
│ │ prose │ │ OpenProse VM skill pack with a /prose slash command. │ │
│ Phone │ phone- │ loaded │ stock:phone-control/index.ts │ │
│ Control │ control │ │ Arm/disarm high-risk phone node commands (camera/screen/writes) with an optional auto-expiry. │ │
│ Qwen OAuth │ qwen- │ loaded │ stock:qwen-portal-auth/index.ts │ │
│ │ portal- │ │ OAuth flow for Qwen (free-tier) models │ │
│ │ auth │ │ │ │
│ @openclaw/ │ signal │ disabled │ stock:signal/index.ts2026.3.7
│ signal │ │ │ OpenClaw Signal channel plugin │ │
│ @openclaw/ │ slack │ disabled │ stock:slack/index.ts2026.3.7
│ slack │ │ │ OpenClaw Slack channel plugin │ │
│ @openclaw/ │ synology │ disabled │ stock:synology-chat/index.ts2026.3.7
│ synology- │ -chat │ │ Synology Chat channel plugin for OpenClaw │ │
│ chat │ │ │ │ │
│ Talk Voice │ talk- │ loaded │ stock:talk-voice/index.ts │ │
│ │ voice │ │ Manage Talk voice selection (list/set). │ │
│ @openclaw/ │ telegram │ disabled │ stock:telegram/index.ts2026.3.7
│ telegram │ │ │ OpenClaw Telegram channel plugin │ │
│ Thread │ thread- │ disabled │ stock:thread-ownership/index.ts │ │
│ Ownership │ ownershi │ │ Prevents multiple agents from responding in the same Slack thread. Uses HTTP calls to the │ │
│ │ p │ │ slack-forwarder ownership API. │ │
│ @openclaw/ │ tlon │ disabled │ stock:tlon/index.ts2026.3.7
│ tlon │ │ │ OpenClaw Tlon/Urbit channel plugin │ │
│ @openclaw/ │ twitch │ disabled │ stock:twitch/index.ts2026.3.7
│ twitch │ │ │ OpenClaw Twitch channel plugin │ │
│ @openclaw/ │ voice- │ disabled │ stock:voice-call/index.ts2026.3.7
│ voice-call │ call │ │ OpenClaw voice-call plugin │ │
│ @openclaw/ │ whatsapp │ disabled │ stock:whatsapp/index.ts2026.3.7
│ whatsapp │ │ │ OpenClaw WhatsApp channel plugin │ │
│ @openclaw/ │ zalo │ disabled │ stock:zalo/index.ts2026.3.7
│ zalo │ │ │ OpenClaw Zalo channel plugin │ │
│ @openclaw/ │ zalouser │ disabled │ stock:zalouser/index.ts2026.3.7
│ zalouser │ │ │ OpenClaw Zalo Personal Account plugin via native zca-js integration │ │
│ QQ Bot │ qqbot │ loaded │ global:qqbot/index.ts1.3.7
│ │ │ │ QQ Bot channel plugin │ │
└──────────────┴──────────┴──────────┴─────────────────────────────────────────────────────────────────────────────────────────────────┴──────────┘

注册QQ机器人

浏览器打开 https://bot.q.qq.com/ ,扫码登录,现在QQ提供了快速接入方式,https://q.qq.com/qqbot/openclaw/index.html ,点击创建机器人,命名为openclaw,直接就给出AppID和AppSecret,注意保存。

配置绑定当前QQ机器人,
openclaw channels add --channel qqbot --token "1903066816:bCh3GQTQG0b*******"

重启本地OpenClaw服务,这里是重启docker容器。

在QQ中对话






大模型需要验证:

在docker里运行:
openclaw models auth login --provider qwen-portal

在浏览器里打开 https://chat.qwen.ai/authorize?user_code=ODBYLEFI&client=qwen-code 完成验证。网址在docker中运行命令时有提示。


参考文献:

  1. 飞牛Nas Docker部署中文汉化版OpenClaw,附飞书+QQ机器人配置详解

  2. 手把手教你 OpenClaw 接入 QQ 机器人,让本地 AI 在 QQ 里听你指挥