继续实践OpenClaw,好不容易把web 管理面板调通,再给它配上一个大模型

继续实践OpenClaw,好不容易把web 管理面板调通,再给它配上一个大模型

OpenClaw小龙虾是github 获得星标最多的项目,OpenClaw之所以能在GitHub上获得极高的关注度,主要原因在于它提供了一个功能强大、易于扩展的AI助手开发平台。把整个操作系统,打造成AI!

OpenClaw官网:OpenClaw — Personal AI Assistant

以前的安装记录:https://skywalk.blog.ZEEKLOG.net/article/details/157554991

本来感觉OpenClaw安装是挺简单的,没想到巨坑,有一台机器装好后没有web管理面板.....所以本来很简短的文档,写成了巨幅文档。

安装OpenClaw

先在192.168.1.12安装,但是它没有systemd服务,导致OpenClaw的服务无法自动启动。需要手工执行openclaw gateway命令启动。

后在192.168.1.19安装。但是装好后没有web管理面板,反复删除重装也没有,最后是安装的openclaw-cn ,才解决了问题。参见这个文档:https://skywalk.blog.ZEEKLOG.net/article/details/158741109

 npm安装

npm i -g openclaw

安装后启动

但是启动失败,没有openclaw命令。于是还是用一键安装。

pnpm安装

先配置pnpm
pnpm setup
激活pnpm环境
source /home/skywalk/.bashrc
安装OpenClaw
pnpm add -g openclaw@latest pnpm approve-builds -g # approve openclaw, node-llama-cpp, sharp, etc. 

耗时:

pnpm add -g openclaw@latest Done in 2m 20s using pnpm v10.30.3

pnpm approve-builds -g 选择build所有,耗时约5分钟

配置OpenClaw
openclaw onboard --install-daemon

一键安装

一键安装的好处是省心省力,啥依赖的软件都可以自己装,还能获得源代码。

缺点是国内会很慢,而且会因为github抽风而安装失败。

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

也可以用这句

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

显示

 🦞 OpenClaw Installer Your AI assistant, now without the $3,499 headset. ✓ Detected: linux Install plan OS: linux Install method: git Requested version: latest Git directory: /home/skywalk/openclaw Git update: 1 [1/3] Preparing environment · Node.js not found, installing it now · Installing Node.js via NodeSource · Installing Linux build tools (make/g++/cmake/python3)

安装的时候发现windows的powershell下可以一键安装,但是不想用自己的windows机器,就还是用ubuntu,用192.168.1.19那台。后来换成了1.12那台。

安装加速

为了加快安装速度,先apt安装上python3.11 

sudo apt install python3.11 

为了加速,手工安装了nodejs 24 ,参见文档:https://skywalk.blog.ZEEKLOG.net/article/details/149314275

也可以升级node,用命令:

npm install -g n 

因为github抽风,一键安装时到后期有可能报错:

fatal: unable to access 'https://github.com/openclaw/openclaw.git/': SSL connection timeout

那就用gitcode的镜像,手工下载,或者一键之前,先手工下载:

git clone https://gitcode.com/GitHub_Trending/cl/openclaw

注意,需要安装在用户根目录。

然后一键安装

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

即使这样,因为github抽风,有时候也会碰到一些库无法安装成功的问题。

启动控制板

启动配置:

openclaw onboard

详细配置

配置模型

配置hooks

 Enable hooks? │ ◻ Skip for now │ ◻ 🚀 boot-md │ ◻ 📎 bootstrap-extra-files │ ◻ 📝 command-logger │ ◻ 💾 session-memory └ Please select at least one option.

显示:

◇ Control UI ───────────────────────────────────────────────────────────────────────────────╮ │ │ │ Web UI: http://127.0.0.1:18789/ │ │ Web UI (with token): │ │ http://127.0.0.1:18789/#token=020470d43020470d43 │ │ Gateway WS: ws://127.0.0.1:18789 │ │ Gateway: not detected (gateway closed (1006 abnormal closure (no close frame)): no close │ │ reason) │ │ Docs: https://docs.openclaw.ai/web/control-ui │ │ │ ├──────────────────────────────────────────────────────────────────────────────────────────◇ Dashboard ready ────────────────────────────────────────────────────────────────╮ │ │ │ Dashboard link (with token): │ │ http://127.0.0.1:18789/#token=020470d43020470d43 │ │ Copy/paste this URL in a browser on this machine to control OpenClaw. │ │ No GUI detected. Open from your computer: │ │ ssh -N -L 18789:127.0.0.1:18789 [email protected] │ │ Then open: │ │ http://localhost:18789/ │ │ http://localhost:18789/#token=020470d43020470d43 │ │ Docs: │ │ https://docs.openclaw.ai/gateway/remote │ │ https://docs.openclaw.ai/web/control-ui │ │ │ ├──────────────────────────────────────────────────────────────────────────────────╯ │ ◇ Web search (optional) ─────────────────────────────────────────────────────────────────╮ │ │ │ If you want your agent to be able to search the web, you’ll need an API key. │ │ │ │ OpenClaw uses Brave Search for the `web_search` tool. Without a Brave Search API key, │ │ web search won’t work. │ │ │ │ Set it up interactively: │ │ - Run: openclaw configure --section web │ │ - Enable web_search and paste your Brave Search API key │ │ │ │ Alternative: set BRAVE_API_KEY in the Gateway environment (no config changes). │ │ Docs: https://docs.openclaw.ai/tools/web │ │ │ ├─────────────────────────────────────────────────────────────────────────────────────────╯──╯

发现只能本地登录,寻找可以远程访问的方法。(后来发现官方给出ssh转发的解决方案,实践文档见:https://skywalk.blog.ZEEKLOG.net/article/details/158654550)

开启局域网访问

如果为了安全,并不需要开启局域网访问,如果要开,用这句:

openclaw config set gateway.bind lan

OpenClaw 的默认配置中,gateway.bind 选项的值是 ‌loopback‌。

这意味着网关默认只监听本地回环地址(如 127.0.0.1 或 localhost),因此只能在本地访问控制界面。

可以使用ssh映射来解决真侦听本地的问题:https://skywalk.blog.ZEEKLOG.net/article/details/158654550

启动服务

openclaw gateway --port 18789 --verbose

web登录127.0.0.1:18789

配对和批准

如果登录报错:pairing required ,那就需要进行配对操作。

列出配对值

openclaw devices list

批准配对

openclaw devices approve

最终web 控制面板终于可以打开了。

先进行到这里,以后再调试大模型部分。

配置大模型

尝试了很多免费的大模型,比如星河社区免费部署的ERNIE-4.5-21B-A3B-Paddle ,Atomgit的三款免费模型,都无法使用,主要是那些免费模型都只提供4k的token 长度,不够用。

用千帆大模型ERNIE-Lite-Pro-128K进行了测试,跑出来效果如下:

总结

这次安装OpenClaw走了很多弯路,甚至一些弯路到现在都不知道为什么会出问题。总之github这块很坑。

现在能跑通的方案是:

直接安装openclaw-cn国产软件:

pnpm install -g openclaw-cn --registry=https://registry.npmmirror.com # 初始化配置(自动生成国内适配的配置文件) openclaw-cn onboard --install-daemon

然后再搭载国产收费大模型即可。

大模型的使用量较大

openclaw跑起来是吞金兽,用下来使用千帆最便宜的模型Ernie lite pro一次对话(比如问个天气,问下当前系统软硬件情况)大约要花费0.02元,稍微问2-3个问题就要花费0.1元左右,贵的模型价格大约5-10倍,这样就要1元左右,真要让它完成点任务,不包月是不行的。

调试

提醒npm notice To update run: npm install -g [email protected]

npm notice New minor version of npm available! 11.6.2 -> 11.11.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.11.0
npm notice To update run: npm install -g [email protected]
npm notice

直接安装新版本

npm install -g [email protected]

提醒npm error [email protected]: Permission denied (publickey).

npm i -g openclaw
npm error code 128
npm error An unknown git error occurred
npm error command git --no-replace-objects ls-remote ssh://[email protected]/whiskeysockets/libsignal-node.git
npm error [email protected]: Permission denied (publickey).
npm error fatal: Could not read from remote repository.
npm error
npm error Please make sure you have the correct access rights
npm error and the repository exists.

可能是github抽风的问题,npm升级到11.11.0之后,再次安装就成功了

npm i -g openclaw

安装报错

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

> [email protected] canvas:a2ui:bundle /home/skywalk/openclaw
> bash scripts/bundle-a2ui.sh


 ERROR  Build failed with 1 error:

[UNRESOLVED_ENTRY] Error: Cannot resolve entry module apps/shared/OpenClawKit/Tools/CanvasA2UI/bootstrap.js.


    at aggregateBindingErrorsIntoJsError (/home/skywalk/.cache/pnpm/dlx/c8943ea703ce9e1da9a357b31cbe8add6ea77c112c8662bde3843783de9e1e34/19cb6887e19-1f57/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/shared/error-BYPsvVEN.mjs:52:18)
    at unwrapBindingResult (/home/skywalk/.cache/pnpm/dlx/c8943ea703ce9e1da9a357b31cbe8add6ea77c112c8662bde3843783de9e1e34/19cb6887e19-1f57/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/shared/error-BYPsvVEN.mjs:22:128)
    at #build (/home/skywalk/.cache/pnpm/dlx/c8943ea703ce9e1da9a357b31cbe8add6ea77c112c8662bde3843783de9e1e34/19cb6887e19-1f57/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/shared/rolldown-build-BsRSEDqH.mjs:3356:34)
    at async bundleInner (/home/skywalk/.cache/pnpm/dlx/c8943ea703ce9e1da9a357b31cbe8add6ea77c112c8662bde3843783de9e1e34/19cb6887e19-1f57/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/cli.mjs:428:49)
    at async bundleWithConfig (/home/skywalk/.cache/pnpm/dlx/c8943ea703ce9e1da9a357b31cbe8add6ea77c112c8662bde3843783de9e1e34/19cb6887e19-1f57/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/cli.mjs:342:7)
    at async main (/home/skywalk/.cache/pnpm/dlx/c8943ea703ce9e1da9a357b31cbe8add6ea77c112c8662bde3843783de9e1e34/19cb6887e19-1f57/node_modules/.pnpm/[email protected]/node_modules/rolldown/dist/cli.mjs:600:3)

A2UI bundling failed. Re-run with: pnpm canvas:a2ui:bundle
If this persists, verify pnpm deps and try again.
ELIFECYCLE  Command failed with exit code 1.
ELIFECYCLE  Command failed with exit code 1.

pnpm update

不管用。

进入openclaw目录,执行

pnpm store prune rm -rf node_modules # 重新安装依赖并构建 pnpm install

还是没有openclaw命令,build

pnpm build

重新安装?

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

不行,最后这里总算用sudo过去了....

sudo npm i -g openclaw

浏览器登录报错origin not allowed

origin not allowed (open the Control UI from the gateway host or allow it in gateway.controlUi.allowedOrigins)

修改.openclaw/openclaw.json 文件

 "gateway": { "port": 18789, "mode": "local", "bind": "lan", "controlUi": { "allowedOrigins": [ "http://localhost:18789", "http://127.0.0.1:18789", "http://192.168.1.12:18789"

加入这句: "http://192.168.1.12:18789"

加入这句之后报错变成:

control ui requires device identity (use HTTPS or localhost secure context)

最后使用ssh转发到127.0.0.1的方式

chat报错:403 status code (no body)

星河社区的模型:PaddlePaddle/ERNIE-4.5-21B-A3B-Paddle 
在OpenClaw里面使用,报错:403 status code (no body)

这个可能是星河社区的模型未启动。

启动后,报错是:

OpenClaw一键安装报错:Updating repository failed — re-run with --verbose for details

[2/3] Installing OpenClaw
· Installing OpenClaw from git checkout: /home/skywalk/openclaw
✓ Git already installed
✓ pnpm ready (pnpm)
✗ Updating repository failed — re-run with --verbose for details
✗ Installing dependencies failed — re-run with --verbose for details

加上--verbose

curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method git --verbose

看详细的报错信息。

我晕,原来是空间用完了

25G 24G 0 100% /

再多分15G过来

继续安装。

一键安装报错ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED  Failed to prepare git-hosted package fetched from 

Downloading @rolldown/[email protected]: 8.47 MB/8.47 MB, done
ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED  Failed to prepare git-hosted package fetched from "https://github.com/tloncorp/api-beta.git": The git-hosted package "@tloncorp/[email protected]" needs to execute build scripts but is not in the "onlyBuiltDependencies" allowlist.

Add the package to "onlyBuiltDependencies" in your project's pnpm-workspace.yaml to allow it to run scripts. For example:
onlyBuiltDependencies:
  - "@tloncorp/api"

再重新运行一次:

curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method git --verbose

碰到新的报错:

报错ERROR  Command failed with exit code 128: git fetch --depth 1 origin

ERROR  Command failed with exit code 128: git fetch --depth 1 origin 7eede1c1a756977b09f96aa14a92e2b06318ae87
error: RPC failed; curl 16 Error in the HTTP2 framing layer
fatal: expected flush after ref listing

pnpm: Command failed with exit code 128: git fetch --depth 1 origin 7eede1c1a756977b09f96aa14a92e2b06318ae87
error: RPC failed; curl 16 Error in the HTTP2 framing layer
fatal: expected flush after ref listing
    at makeError (/home/skywalk/.cache/node/corepack/v1/pnpm/10.23.0/dist/pnpm.cjs:12901:17)
    at handlePromise (/home/skywalk/.cache/node/corepack/v1/pnpm/10.23.0/dist/pnpm.cjs:13472:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async execGit (/home/skywalk/.cache/node/corepack/v1/pnpm/10.23.0/dist/pnpm.cjs:97574:7)
    at async gitFetcher (/home/skywalk/.cache/node/corepack/v1/pnpm/10.23.0/dist/pnpm.cjs:97527:11)
    at async fetcher (/home/skywalk/.cache/node/corepack/v1/pnpm/10.23.0/dist/pnpm.cjs:108986:16)
    at async run (/home/skywalk/.cache/node/corepack/v1/pnpm/10.23.0/dist/pnpm.cjs:108377:23)

1.19服务器碰到Not Found问题

 curl http://localhost:18789/
Not Found

看看端口,有侦听啊

openclaw config get gateway.bind 🦞 OpenClaw 2026.3.2 (85377a2) — I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges. loopback skywalk@ub19:~/.openclaw$ netstat -an |grep 18789 tcp 0 0 127.0.0.1:18789 0.0.0.0:* LISTEN tcp6 0 0 ::1:18789 :::* LISTEN

发现直接用127.0.0.1地址,是拒绝

skywalk@ub19:~/.openclaw$ curl 127.0.0.1:18789 curl: (7) Failed to connect to 127.0.0.1 port 18789 after 0 ms: Connection refused skywalk@ub19:~/.openclaw$ curl localhost:18789 Not Founds

最后是安装openclaw-cn软件解决的,见:https://skywalk.blog.ZEEKLOG.net/article/details/158741109

1.12服务碰到报错pairing required

Chat

Direct gateway chat session for quick interventions.

pairing required

                              Main Session                        |

Disconnected from gateway.

pairing required

是因为没有配对,先列出来:

openclaw devices list

批准配对

openclaw devices approve 9f52af31-fcd # 配对值

问题解决

1.12服务器碰到报错:Inference Serverless API for this model not found.

应该是推理模型还有点问题。

最终是在1.19这台服务器,用ERNIE-Lite-Pro-128K模型跑通的。

Read more

Trae IDE 终极指南:从入门到精通,释放你的 AI 编程潜力(上)

Trae IDE 终极指南:从入门到精通,释放你的 AI 编程潜力(上)

💡 就像选择手机一样:iPhone 简洁易用,Android 功能丰富。Trae 和 Cursor 也是如此——一个是"开箱即用的 iPhone",一个是"高度定制的 Android"。本文将帮你找到最适合自己的 AI 编程助手! 在当今的软件开发领域,AI 编程助手已成为提升效率、激发创意的关键工具。而 Trae IDE 作为一款为开发者量身打造的智能开发环境,其强大的模型管理功能,更是让它在众多工具中脱颖而出。无论你是想快速上手,还是希望深度定制,Trae 都能满足你的需求。 本文将作为你的终极向导,带你深入探索 Trae IDE 的模型世界,从轻松切换内置模型,到添加和管理你自己的专属模型,助你将 Trae 的能力发挥到极致。 📑 文章目录 第一部分:基础入门 🎯 1.

By Ne0inhk
嵌入式AI?

嵌入式AI?

就当做嵌入式的一个外设来看待就行了。  什么是嵌入式AI 嵌入式 AI(Embedded AI)是指将人工智能技术与算法集成到嵌入式系统中,使设备能够在本地(无需依赖云端服务器)实现数据处理、分析和决策的技术形态。它融合了嵌入式系统的实时性、低功耗特性与AI 的智能化能力,让传统硬件设备具备 “边端智能”,适用于对响应速度、隐私保护、网络依赖性要求高的场景。 核心特点 本地化运行 无需联网即可完成数据处理和决策,避免网络延迟和断网风险(如自动驾驶汽车在隧道中实时避障)。 保护用户隐私:敏感数据(如人脸、医疗信息)无需上传云端,直接在设备端处理。 低功耗与轻量化 受限于嵌入式设备的算力和电池容量(如智能手环、智能家居设备),需对 AI 模型进行压缩优化(如模型剪枝、量化、知识蒸馏),使其适配低功耗芯片(如 ARM 处理器、NPU 神经处理单元)。 实时性与可靠性 适用于对延迟敏感的场景(如工业机器人实时抓取、智能摄像头动态追踪)

By Ne0inhk

用 OpenClaw + 飞书,快速搭建 5 个可协作的 AI 助理团队

多个飞书机器人 + 独立工作空间 + 互相协作 = 专业化分工的 AI 助理团队 写在前面 如何用 OpenClaw 搭建一套多 Agent 系统,让 AI 助理各司其职、协同工作?通过 OpenClaw 多 Agent 架构,你可以实现: * 多个独立的飞书机器人,每个人设不同 * 各自独立的工作空间,数据完全隔离 * 可以互相协作,通过 agentToAgent 通信 * 共享长期记忆,跨渠道信息同步 本文将详细介绍如何在腾讯云服务器上,用 OpenClaw 搭建一套飞书多 Agent 系统,包括完整配置流程、常见问题解决方案和实战协作案例。 目录 1. 为什么需要多 Agent 2. 前置准备 3. 5 个 Agent

By Ne0inhk
医疗AI场景下算法编程的深度解析(2026新生培训讲稿)(一)

医疗AI场景下算法编程的深度解析(2026新生培训讲稿)(一)

前言 人工智能正在重塑医疗健康领域的每一个角落。从辅助医生解读医学影像,到为患者提供个性化的健康管理建议,再到优化医疗系统的运营效率,AI技术正以前所未有的深度和广度融入现代医学的肌体之中。 然而,技术的落地从来不是一帆风顺的。医疗AI面临着一系列独特的挑战:数据的高敏感性与隐私保护要求、模型决策的可解释性需求、临床场景中对准确率的严苛标准,以及日益复杂的法规监管环境。这些挑战要求从业者不仅掌握算法原理,更要理解医疗场景的特殊性,懂得如何在真实世界中构建可靠、安全、可落地的AI系统。 2026开学教程旨在为医疗AI领域的算法工程师、数据科学家、医工交叉研究人员提供一份从理论到实践的完整指南。我们将从医疗AI的发展脉络出发,深入解析k-近邻、逻辑回归、决策树、随机森林、支持向量机、Boosting等经典机器学习算法在医疗场景中的应用,并通过大量实战案例展示从数据处理到模型部署的全流程。 特别地,我们将医疗数据的特殊性贯穿全教程:小样本问题、类别不平衡、多模态融合、可解释性要求——这些在通用AI领域或许可以妥协的问题,在医疗领域必须直面并解决。 本书历时一年完成,感谢所有为本书贡

By Ne0inhk