OpenClaw的踩坑过程

安装

参考官方文档安装

宿主机是Debian 13,PVE作为软路由的,直接使用官方命令安装

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

!!! 但是!Openclaw更新必崩!,截至2026-05-01,我使用的最终稳定版是2026.4.23

配置

只要集中在openclaw.json文件的配置。

使用了nvidia的免费模型,注册的时候,选不到86,所以不要管,直接输入+861**********就可以收到验证码了。
!!!但是!模型会过期!nvidia的页面上是可用的,但是实际上模型临期后就无法正常用了,所以要注意时间随时更换,当然了,如果是收费模型没这个问题

目前按照onboard设置后几乎没有问题了,但是还是有个别官方文档

openclaw.json

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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
{
// 这个节点配合tools中的节点,可以免权限验证
"approvals": {
"exec": {
"enabled": true
}
},
//智能体
"agents": {
"defaults": {
"workspace": "/root/.openclaw/workspace",
// 默认可用的模型
"models": {
"nv/stepfun-ai/step-3.5-flash": {},
"nv/google/gemma-4-31b-it": {},
"nv/deepseek-ai/deepseek-v4-flash": {},
"nv/qwen/qwen3.5-397b-a17b": {},
"nv/minimaxai/minimax-m2.7": {},
"nv/z-ai/glm-5.1": {},
"openrouter/google/gemma-4-31b-it:free": {}
},
"model": {
// 默认智能体默认模型
"primary": "nv/z-ai/glm-5.1",
// 如果智能体默认模型不可用会按照下面的顺序回退尝试
"fallbacks": [
"nv/google/gemma-4-31b-it",
"nv/minimaxai/minimax-m2.7",
"nv/qwen/qwen3.5-397b-a17b",
"nv/z-ai/glm-5.1",
"nv/deepseek-ai/deepseek-v4-flash",
"nv/stepfun-ai/step-3.5-flash",
"openrouter/google/gemma-4-31b-it:free"
]
},
"compaction": {
"mode": "safeguard",
"reserveTokensFloor": 20000,
"memoryFlush": {
"enabled": true
}
},
// 记忆搜索,这个在nvidia模型中搜embed,但是只有这个是可用的,使用openclaw memory status --deep验证
"memorySearch": {
// 这里是不是实际供应商,是协议格式,即使使用的nvidia,也配置openai
"provider": "openai",
"model": "nvidia/nv-embed-v1",
"remote": {
"baseUrl": "https://integrate.api.nvidia.com/v1/",
"apiKey": "nvapi-*************"
}
},
"subagents": {
"allowAgents": [
"*"
]
},
// 默认思考模式:高
"thinkingDefault": "high",
"humanDelay": {
"mode": "natural"
},
"timeoutSeconds": 3600,
"typingMode": "never"
},
"list": [
{
"id": "main"
},
{
"id": "work",
"name": "work",
"workspace": "/root/.openclaw/workspace-work",
"agentDir": "/root/.openclaw/agents/work/agent",
// 智能体指定模型
"model": "nv/deepseek-ai/deepseek-v4-flash",
"reasoningDefault": "stream",
// 心跳
"heartbeat": {
"every": "10m",
"includeReasoning": false,
"directPolicy": "allow",
"target": "telegram",
// 使用telegram聊天的会话,心跳内容会出现在会话中
"session": "agent:work:telegram:work:direct:telegram账号",
"to": "telegram账号",
"accountId": "work",
// 心跳执行时间
"activeHours": {
"start": "06:30",
"end": "23:30",
"timezone": "Asia/Shanghai"
},
"ackMaxChars": 1024,
"suppressToolErrorWarnings": false,
"lightContext": false,
"isolatedSession": false,
"timeoutSeconds": 3600
}
},
{
"id": "home",
"name": "home",
"model": "nv/z-ai/glm-5.1",
"workspace": "/root/.openclaw/workspace-home",
"agentDir": "/root/.openclaw/agents/home/agent",
"reasoningDefault": "stream",
"heartbeat": {
"every": "30m",
"includeReasoning": false,
"directPolicy": "allow",
"target": "telegram",
"to": "telegram账号",
"session": "agent:home:telegram:home:direct:telegram账号",
"accountId": "home",
"activeHours": {
"start": "06:30",
"end": "23:30",
"timezone": "Asia/Shanghai"
},
"ackMaxChars": 1024,
"suppressToolErrorWarnings": false,
"lightContext": false,
"isolatedSession": false
}
}
]
},
"bindings": [
{
"type": "route",
"agentId": "work",
"match": {
"channel": "telegram",
"accountId": "work"
}
},
{
"type": "route",
"agentId": "home",
"match": {
"channel": "telegram",
"accountId": "home"
}
}
],
"channels": {
"defaults": {
"contextVisibility": "all"
},
"telegram": {
"enabled": true,
"capabilities": {
"inlineButtons": "allowlist"
},
"groupPolicy": "open",
"groups": {
"-100群组号": {
"requireMention": false
}
},
"actions": {
"reactions": true,
"sendMessage": true,
"sticker": true
},
"dmPolicy": "allowlist",
"allowFrom": [
"telegram账号"
],
"reactionNotifications": "all",
"reactionLevel": "extensive",
"mediaMaxMb": 256,
// telegram会报网络错误的情况下加的配置
"network": {
"autoSelectFamily": true,
"dnsResultOrder": "ipv4first"
},
// 代理地址,根据实际情况使用
"proxy": "http://127.0.0.1:7890",
"accounts": {
"work": {
"enabled": true,
"botToken": "机器人token"
},
"home": {
"enabled": true,
"botToken": "机器人token"
}
"default": {
"dmPolicy": "allowlist",
"allowFrom": [
"telegram账号"
]
}
}
}
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "token"
},
"port": 18789,
"bind": "loopback",
"tailscale": {
"mode": "off",
"resetOnExit": false
},
"controlUi": {
"allowInsecureAuth": false
},
"nodes": {
"denyCommands": [
"camera.snap",
"camera.clip",
"screen.record",
"contacts.add",
"calendar.add",
"reminders.add",
"sms.send",
"sms.search"
]
}
},
"models": {
"mode": "merge",
"providers": {
// 虽然openclaw后面直接支持了NVIDIA的提供商,但是nvidia的模型变动大并且,默认的NVIDIA模型有时候会无法连接,还是使用自定义
// 为了方式和openclaw直接的nvidia冲突,所以换个名字
"nv": {
"baseUrl": "https://integrate.api.nvidia.com/v1",
"api": "openai-completions",
"apiKey": "nvapi-******",
"models": [
{
"id": "stepfun-ai/step-3.5-flash",
"name": "stepfun-ai/step-3.5-flash",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1000000,
"maxTokens": 256000,
"api": "openai-completions"
},
{
"id": "google/gemma-4-31b-it",
"name": "google/gemma-4-31b-it",
"reasoning": false,
"input": [
"text",
"image" // 这里是不能写video的
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1000000,
"maxTokens": 256000,
"api": "openai-completions"
},
{
"id": "minimaxai/minimax-m2.7",
"name": "minimaxai/minimax-m2.7",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1000000,
"maxTokens": 256000,
"api": "openai-completions"
},
{
"id": "deepseek-ai/deepseek-v4-flash",
"name": "deepseek-ai/deepseek-v4-flash",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1000000,
"maxTokens": 256000,
"api": "openai-completions"
},
{
"id": "z-ai/glm-5.1",
"name": "z-ai/glm-5.1",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1000000,
"maxTokens": 128000,
"api": "openai-completions"
},
{
"id": "qwen/qwen3.5-397b-a17b",
"name": "qwen/qwen3.5-397b-a17b",
"reasoning": false,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1000000,
"maxTokens": 256000,
"api": "openai-completions"
},
{
"id": "nvidia/nemotron-nano-12b-v2-vl",
"name": "nvidia/nemotron-nano-12b-v2-vl",
"reasoning": false,
"input": [
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 128000,
"maxTokens": 8192,
"api": "openai-completions"
}
]
}
}
},
"plugins": {
"entries": {
"openrouter": {
"enabled": true
},
// 开启dreaming支持,使用openclaw plugins enable memory-core开启
"memory-core": {
// 开启后增加config节点内容
"config": {
"dreaming": {
"enabled": true,
"frequency": "0 */1 * * *" //没小时一次
}
},
"enabled": true
},
"memory-lancedb": {
"enabled": true //改为true
}
},
"slots": {
"memory": "memory-core"
}
},
"session": {
"dmScope": "per-account-channel-peer"
},
"tools": {
// 完全放开权限
"profile": "full",
"sessions": {
"visibility": "all"
},
// 这里设置的是work和home两个智能体可以互相聊天,但是只能使用subagent的形式,不能有来有回的,只能一次,也许后面更新会支持
"agentToAgent": {
"enabled": true,
"allow": [
"work",
"home"
]
},
"web": {
"fetch": {
"enabled": true,
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0"
}
},
"media": {
"image": {
"enabled": true,
"maxChars": 4096,
"maxBytes": 104857600,
"models": [
{
"type": "provider",
// 这里是神奇的,提供商要写nvidia,否则会失败,应该是读取了环境变量中的NVIDIA_API_KEY,配置后可以分析图片和视频了
"provider": "nvndia",
"model": "nvidia/nemotron-nano-12b-v2-vl",
// 但是好像没有覆盖默认的提示词,不知为何这个配置不生效
"prompt": "描述内容,包括场景、人物、物体、行为、颜色、氛围等所有细节,并的预估出每个元素的尺寸。",
"capabilities": [
"image",
"video"
]
},
{
"type": "provider",
"provider": "nv",
"model": "google/gemma-4-31b-it",
"prompt": "描述内容,包括场景、人物、物体、行为、颜色、氛围等所有细节,并的预估出每个元素的尺寸。",
"capabilities": [
"image",
"video"
]
}
]
}
},
// 配合approvals 实现免授权
"elevated": {
"enabled": true,
"allowFrom": {
"telegram": [
telegram账号,不需要引号
]
}
},
// 配合approvals 实现免授权
"exec": {
"security": "full",
"ask": "off",
"backgroundMs": 10000,
"timeoutSec": 1800,
"cleanupMs": 1800000,
"notifyOnExit": true
}
},
"auth": {
"profiles": {
"openrouter:default": {
"provider": "openrouter",
"mode": "api_key"
}
}
},
"skills": {
"install": {
"nodeManager": "npm"
}
},
"hooks": {
"internal": {
"enabled": true,
"entries": {
"boot-md": {
"enabled": true
},
"bootstrap-extra-files": {
"enabled": true
},
"command-logger": {
"enabled": true
},
"session-memory": {
"enabled": true
}
}
}
},
"wizard": {
"lastRunAt": "2026-04-30T15:12:01.484Z",
"lastRunVersion": "2026.4.23",
"lastRunCommand": "doctor",
"lastRunMode": "local"
},
"meta": {
"lastTouchedVersion": "2026.4.23",
"lastTouchedAt": "2026-04-30T15:34:10.659Z"
}
}


OpenClaw的踩坑过程
https://oujun.work/2026/04/30/openclaw.html
作者
欧俊
发布于
2026年5月1日
许可协议