96SEO 2026-07-24 10:00 0
这篇文章详细记录了在云端 Linux 服务器上从旧版 Clawbot 更新到最新版 OpenClaw 并配置飞书机器人的完整流程。按理说,
| 场景 | 全新安装 | 更新升级 |
|---|---|---|
| 配置文件 | 需要创建自动迁移旧插件无需要清理兼容性问题Gateway 服务新安装需要替换旧服务 |
使用 SSH 连接到你的 Linux 服务器:
ssh root@your-server-ip
node --version
说到要求,Node.js v18 或更高版本。
示例输出

v22.
npm --version
.
如果版本不符合要求,需要升级 Node.js。对于 Ubuntu/Debian:
# 使用 NodeSource 仓库安装最新 LTS 版本curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -apt-get install -y nodejs
OpenClaw 的依赖包libsignal-node 需要通过 git 从 GitHub 拉取。npm 默认使用 SSH 协议访问 GitHub。
但服务器可能没有配置 SSH 密钥,导致安装失败。
npm error command git --no-replace-objects ls-remote ssh:///whiskeysockets/libsignal-node.gitnpm error : Permission denied .npm error fatal: Could not read from remote repository.
. 检查现有 git 配置
. 清理旧配置
. 添加 URL 重写规则
. 验证配置
. 检查现有 git 配置
git config --global --list | grep url
. 清理旧配置
. 清理可能存在的旧代理配置git config --global --unset-all url."https://ghproxy.com/https://github.com/".insteadofgit config --global --unset-all url."https://github.com/".insteadof
. 添加 URL 重写规则
# 将 ssh:/// 转换为 https://github.com/git config --global url."https://github.com/".insteadOf "ssh:///"# 将 : 转换为 https://github.com/git config --global --add url."https://github.com/".insteadOf ":"
. 验证配置
git config --global --list | grep url
预期输出
url.https://github.com/.insteadof=ssh:///url.https://github.com/.insteadof=:
★ Insight ─────────────────────────────────────
git 的url. .insteadOf
URL 重写。当 git遇到匹配的 URL 前缀时会自动替换为指定的 URL。这样所有通过 SSH协议访问 GitHub 的请求都会被转换为 HTTPS 请求,不需要 SSH密钥就能正常工作。─────────────────────────────────────────────────
:安装 OpenClaw
全局安装最新版
npm i -g openclaw// 使用镜像安装npm install -g openclaw@latest --registry=https ://registry.npmmirror.
安装过程可能需要 - 分钟,取决于服务器性能表现和网络速度。从你会看到来看,示例输出
added packages in min
验证安装
openclaw--version
示例输出 .
常见错误处理
错误 :Permission denied
解决 :回到接下来。确认 git 配置正确,再看第四步,处理旧配置迁移
配置迁移说明
OpenClaw会自动检测并迁移旧版 Clawbot的配置:
* ~~方法~~old path`~/.clawdbot/`
* 新方法new path`~/.openclaw/`
* ~~置~~old config`clawdbot.json`
* 新配 new config `openclaw.json`
预期迁移输出
◇ Doctor changes ─╮
│ │
│ - State dir:/root/.clawdbot → /root/.openclaw|
│ │
├────────────────────────────────┘
插件兼容性问题
Invalid config at/root/.openclaw/openclaw.json:- plugins: plugin manifest not found:/root/.openclaw/extensions/feishu/openclaw.plugin.json
**解决方法** :
1. 删除旧的飞书插件目录:
rm-rf~/.openclaw/extensions/feishu
2. 运行 doctor修复:
openclw doctor--fix
第五步的观点是。运行配置向导
启动配置向导
openclaw onboard
选择 QuickStart:推荐
选择 Custom:高级使用者
检测现有配置
◇ Existing config detected ─╮
│ │
│ workspace:~/ clawd │
│ model: ark/glm- │
│ gateway.mode: local │
│ gateway.port: │
│ gateway.bind: loopback │
│ │
├──────────────────┘
操作 :选择Update values更新现有设置。Gateway 设置
Gateway port:
Gateway bind: Loopback
Gateway auth: Token
保持默认设置。选择Custom Provider
API Base URL`https ://openai-proxy.miracleplus.
Paste API key now
API Key输入你的密钥
Anthropic-compatible
模型 IDclaude-opus--
成功后显示Verification successful.
检测已有的飞书 channel:
◇ Channel status ─╮
│ │
│ Feishu: connected as ou_xxxxx │
│ │
├────────────┘
操作 :选择Feishu/Lark,接下来选择Modify settings更新设置。连接模式WebSocket
中国区部署feishu.cn-China
根据需求选择allowlist或 open。完成
Feishu : okAgents : mainGateway : reachableWeb UI : http ://.:/
第六步 安装飞书官方插件
为什么需要官方插件?
OpenClaw自带的飞书插件作用有限,提供了更完整的插件支持更多功能:
* 日历管理 Calendar management
* 多维表格 Bitable
* 文档操作 Document operations
* 云空间 Cloud storage
* 知识库 Wiki
设置 npm 源
npmconfigsetregistry https ://registry.npmmirror.
下载飞书官方插件安装工具
curl-o /tmp/feishu-openclaw-plugin-onboard-cli.tgz https ://sf3-cn.feishucdn.
obj/open-platform-opendoc/195a94cb3d9a45d862d417313ff62c9c_gfW8JbxtTd.tgz
安装工具
npminstall/tmp/feishu-openclaw-plugin-onboard-cli.tgz-g
清理临时文件
运行插件安装命令
feishu-plugin-onboardinstall
预期输出
Starting installation...Setting npm registry...Disabling built-in Feishu plugin...Installing official Feishu plugin...Installing plugin @larksuiteoapi/feishu-openclaw-plugin...Downloading @larksuiteoapi/feishu-open claw-plugin…Installing to /root/.open claw/extensions/fe ishu-open claw-plugin…Installing plugin dependencies…✅ Registered all OAPI toolsInstalled plugin : fe ishu-open claw-pluginRestart gateway to load plugins.?
Current Fe ishu App ID is cli_xxxxx.Do you want to use it?YesInstallation complete!You can now run "openclw gateway run".
安全警告说明
WARNING : Plugin "fe ishu-open claw-plugin " contains dangerous code patterns :- Environment variable access combined with network send- Shell command execution detected
这是正常的,因为飞书插件需要:
访问环境变量获取凭证 execute some system commands
重启 Gateway使插件生效:
openclw gatewayrestart
第七步调整模型配
问题背景
使用自定义模型服务商时可能会使用默认的模型参数,导致:
配置项
默认值
问题
contextWindow|16000
太小,频繁触发会话压缩
maxTokens|4096
最大输出长度受限
问题表现
日志中出现警告 low context window : ctx =
会话频繁压缩 Agent每次读完人设文档就会压缩会话,导致:
* 信息丢失 Loss of context information response变慢 timeout
响应超时 embedded run timeout : timeoutMs =
推荐配
对于 claude-opus--模型。推荐:
配置项
值value
说明
contextWindow|200000
200K
maxTokens|8192
最大输出8K tokens
方法一 命令行配
示例 :
openclwconfigsetmodels.providers.custom-openai-proxy-miracleplus-com.models.claude-opus--.contextWindow openclwconfigsetmodels.providers.custom-openai-proxy-miracleplus-com.models.claude-opus--.maxTokens
验证配
openclwconfiggetmodels.providers..models.claude-opus--
预期输出 :{ "id": "claude-opus--","contextWindow":,"maxTokens":,...}
重启生效
openclwgatewayrestart
第八批准配对并测试
批准机制
当有人第一次给机器人发消息时会生成一个 Pairing Code,需要在服务器上批准。话说回来,
批准配对命令格式
openclwpairingapprovefeishu<配对码>
示例 :
openclwpairingapprovefeishuxxxxxxxx
成功后显示Approved feishusenderou_xxxxx.
在飞书里给机器人发送消息。如你好,如果机器人正常回复则表示成功!
第九远程访问 Dashboard
SSH 端口转发命令格式
ssh-N-L.:.:root @your-server-ip
保持 SSH 连接,在浏览器中访问http ://localhost:
获取 Token 命令格式
openclwconfiggetgateway.auth.token
常见问题排查
错误信息Permission denied
解决办法
gitconfig--globalurl ."https :// github.
com/" .insteadof"s sh://git@ github. com/" gitconfig--global--addurl ."https :// github. com/" .insteadof "git@ github. com :"
错误信息plugin manifestnotfound
rm-rf~ /.open claw/extensions/fe ishuopenclwdoctor--fix
查看群聊策略
openclwconfiggetchannels.fe ishu.groupPolicy
如果是allowlist但白名单为空可以改为 open
openclwconfigsetchannels.fe ishu.groupPolicy "open "
检查状态
systemctl--userstatusopen claw-gateway.service
重新启动
systemctl--userrestartopen claw-gateway.service
查看志
open clwlogs
检查模型配
open cl wconfigget models
重新配模型
open cl wconfigure--sectionmodel
症状
日志中出现警告 low context windowctx
Agent响应缓慢频繁进行会话压缩 响应超时分钟后仍未返回timeoutMs=
原因
自定义模服务商的contextWindow默认值,对于 claude-opus--等支持200K上下文的模型来说太小了。按理说,
解决
网络错误或依赖安失败。其实,
步骤 1. 检查 Gateway 是否运 行pen cl wstatus 2. 检查飞书连接状态pen cl wstatus 3 查看详细志pen cl wlogs or tail-f/tmp/open claw/open claw-$.log
更新流程回顾 1. ✅ 检查 Node.js 环境Check Node.js environmentdone!2 ✅ 配置HTTPS访问 GitHconfigure HTTPS access to GitHdone!3 ✅ 全局安 OpenClawin OpenClaw globallydone!4 ✅ 清理旧件并运 doctorClean up legacy plugins and run doctordone!5 ✅ 运行onboard更新配 Runon board to update configurationdone!6 ✅ 安飞官方件Install Feis Official Plugindone!7 ✅ 化模配 Optimize Model Config done!8 ✅ 配自定模服务商Configure Custom Model Providerdone!9 ✅批准对并测Approve pairing and testdone!
关键命令速查 Cheat Sheet
相关资源 Related Resources * 文档Documentationdocs.open claw.ai/ * GitH仓库GitHub Repogithub. om/open claw/op…* 书开放网站Feis Open Platformop en.feis hu.cn/
附录 systemd 服务管理 Appendixsystemd Service Management
查看 Gateway 服务状态 Check Gateway Service Status
systemctl-user status pen claw-gateway.service
启动停止重启服StartStopRestart Service
开机自启 Enable Auto-start on Boot
作为专业的SEO优化服务提供商,我们致力于通过科学、系统的搜索引擎优化策略,帮助企业在百度、Google等搜索引擎中获得更高的排名和流量。我们的服务涵盖网站结构优化、内容优化、技术SEO和链接建设等多个维度。
| 服务项目 | 基础套餐 | 标准套餐 | 高级定制 |
|---|---|---|---|
| 关键词优化数量 | 10-20个核心词 | 30-50个核心词+长尾词 | 80-150个全方位覆盖 |
| 内容优化 | 基础页面优化 | 全站内容优化+每月5篇原创 | 个性化内容策略+每月15篇原创 |
| 技术SEO | 基本技术检查 | 全面技术优化+移动适配 | 深度技术重构+性能优化 |
| 外链建设 | 每月5-10条 | 每月20-30条高质量外链 | 每月50+条多渠道外链 |
| 数据报告 | 月度基础报告 | 双周详细报告+分析 | 每周深度报告+策略调整 |
| 效果保障 | 3-6个月见效 | 2-4个月见效 | 1-3个月快速见效 |
我们的SEO优化服务遵循科学严谨的流程,确保每一步都基于数据分析和行业最佳实践:
全面检测网站技术问题、内容质量、竞争对手情况,制定个性化优化方案。
基于用户搜索意图和商业目标,制定全面的关键词矩阵和布局策略。
解决网站技术问题,优化网站结构,提升页面速度和移动端体验。
创作高质量原创内容,优化现有页面,建立内容更新机制。
获取高质量外部链接,建立品牌在线影响力,提升网站权威度。
持续监控排名、流量和转化数据,根据效果调整优化策略。
基于我们服务的客户数据统计,平均优化效果如下:
我们坚信,真正的SEO优化不仅仅是追求排名,而是通过提供优质内容、优化用户体验、建立网站权威,最终实现可持续的业务增长。我们的目标是与客户建立长期合作关系,共同成长。
Demand feedback