惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
About on SuperTechFans
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tenable Blog
WordPress大学
WordPress大学
小众软件
小众软件
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
T
The Exploit Database - CXSecurity.com
Attack and Defense Labs
Attack and Defense Labs
Simon Willison's Weblog
Simon Willison's Weblog
C
CXSECURITY Database RSS Feed - CXSecurity.com
量子位
有赞技术团队
有赞技术团队
C
Cisco Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
F
Fortinet All Blogs
S
Schneier on Security
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
Stack Overflow Blog
Stack Overflow Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Spread Privacy
Spread Privacy
F
Full Disclosure
Scott Helme
Scott Helme
GbyAI
GbyAI
N
Netflix TechBlog - Medium
MyScale Blog
MyScale Blog
Cloudbric
Cloudbric
云风的 BLOG
云风的 BLOG
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
Hacker News - Newest:
Hacker News - Newest: "LLM"
Security Latest
Security Latest
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
The GitHub Blog
The GitHub Blog
The Register - Security
The Register - Security
L
Lohrmann on Cybersecurity
PCI Perspectives
PCI Perspectives
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
D
Docker
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
Secure Thoughts
C
Check Point Blog

陈少文的网站

巨变与机遇的未来十年 Kubernetes 平台管理软件压力测试方案 使用镜像部署 Hexo 静态页面 终于等到你 - GitHub 镜像仓库服务(ghcr.io) 一起来学 Go --(6)Interface 一起来学 Go --(5)Goroutine 和 Channel 什么是函数式编程 如何在 Kubernetes 集群集成 Kata 柯里化与偏函数 使用 PyGithub 自动创建 Label 软件产品是团队能力的输出 Helm 2 、Helm 3 比较 IoT 变现 Kubernetes 中的 DNS 服务 国内的 Helm 镜像源 Harbor 使用自签证书支持 Https 访问 DevOps 工具链之 Prow 如何使用 kfctl 安装 Kubeflow VS Code 无法下载 Go 插件的工具包 工程师更应具有服务精神 你不知道的 Docker 使用技巧 使用 Docker 运行 Tensorflow 论中国 什么是左移 如何清空 Git 仓库全部历史记录 一禅小和尚 有风吹过厨房 时间的玫瑰 如何在 CentOS 安装 GPU 驱动 开发 Tips(19) 使用 Velero 备份 Kubernetes 集群 Kubernetes Cheat Sheet 开发 Tips(18) 如何构建一个 Java 工程 开发 Tips(17) KubeSpray 安装 Kubernetes 报错 ip in ansible_all_ipv4_addresses 基于 Kubernetes 和 Jenkins 搭建自动化测试系统 在 Kubernetes 上动态创建 Jenkins Slave 使用 Jenkins 进行服务拨测 开发 Tips(16) Kubernetes 签发 Ingress 证书及日常故障运维 Kubernetes 中 Deployment 的基本操作 Kubernetes 中的证书 如何使用 KubeBuilder 开发一个 Operator Kubernetes 1.6.0 安装问题汇总 镜像管理工具 -- Harbor 开发 Tips(15) Docker 如何拉取镜像 开发 Tips(14) 使用 Helm 安装 harbor 开发 Tips(13) 使用 S2I 构建云原生应用 在 Kubernetes 中使用 emptyDir、hostPath、localVolume 开发 Tips(12) 开发 Tips(11) 代码质量分析工具 SonarQube 使用 Kubeadm 安装 Kubernetes 集群 一起来学 Go --(4)常用函数 Kubernetes 中的 Ceph Kubernetes 之 Volumes Kubernetes 之 Labels、Selectors 开发 Tips(10) 开源正在重构商业模式 Kubernetes 之网络 Kubernetes 之 API 使用 Helm 和 Operator 快速部署 Prometheus Kubernetes 复杂有状态应用管理框架 -- Operator Kubernetes 的包管理器 -- Helm 一起来学 Go --(3)Go Modules 如何一步一步地优化博客方案 kubectl 实用指南 Kubernetes 中的基本概念 搭建远程 Kubernetes 开发环境 大公司和小公司的 ToB 思路 开发 Tips(9) Go 入门指南 一起来学 Go --(2)数据与逻辑结构 如何预防 Web 富文本中的 XSS 攻击 django-xss-cleaner 云工作时代 一起来学 Go --(1)背景与特点 SaaS 开发团队的不同阶段 你不知道的 Git 使用技巧 输出既服务 微服务设计 继续奔跑 开发 Tips(8) 从账户安全到二次验证 Django 性能之数据库查询优化 Django 性能之分库分表 敏捷开发之研发流程 打造一致性的团队 开发 Tips(7) Pytest 进阶学习之 Mock PaaS 部署之 buildpack Go 开发配置 领域输出才是 PaaS 的核心竞争力 Pytest 入门学习 开发 Tips(6) 如何使用 Jenkins、Docker、GitLab 搭建 Django 自动化部署流程
OpenClaw 安装与配置
微信公众号 · 2026-02-26 · via 陈少文的网站

Please enable Javascript to view the contents

1. 准备 Node 环境

  • 安装 nvm
1
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
  • 设置 nvm 环境变量

需要修改 Bash 的配置文件,添加以下内容:

1
2
3
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
  • 安装 Node

2. 安装 OpenClaw

  • 安装包
1
npm install -g openclaw@latest
  • 卸载
1
npm uninstall -g openclaw
  • 设置环境变量

可以添加 KEY=VALUE 用于给 Plugins、Channels、Skills 等使用。

  • 初始化配置

加上 --install-daemon 参数,重启之后,服务自动启动。openclaw onboard --force 会强制重新初始化配置。

  • 调整配置参数

修改 ~/.openclaw/openclaw.json 文件的以下参数:

1
2
3
4
5
6
{
...
            "contextWindow": 262144,
            "maxTokens": 65536
...
}

重启 gateway 服务配置生效。

1
openclaw gateway restart

3. 使用命令

  • 在终端中与 Bot 对话
  • 在浏览器中与 Bot 对话

4. gateway 管理

gateway 是 OpenClaw 的网关模块,主要是需要启动和停止。

  • 启动
  • 停止
  • 重启
1
openclaw gateway restart

5. plugins 管理

plugins 是 OpenClaw 的功能扩展模块,主要是需要安装和启用。

  • 查看已安装插件
  • 安装插件
1
openclaw plugins install telegram
  • 启用插件
1
openclaw plugins enable telegram
  • 禁用插件
1
openclaw plugins disable telegram

6. skills 管理

skills 是 OpenClaw 的技能模块,主要是需要安装和启用。

  • 查看已安装技能
  • 检查技能是否正常
  • 查看技能信息
1
openclaw skills info weather

7. channel 管理

channel 是 OpenClaw 与外部 / 用户交互的通信方式,主要是需要开启和配置。

  • 添加 channel
1
openclaw channels add --channel telegram --token <token>

也可以不加参数,进入交互页面配置 channel 信息。

  • 查看 channel 列表
  • 查看 channel 连接状态
1
openclaw channels status
  • 登出 channel
1
openclaw channels logout  --channel telegram

8. agent 管理

agent 是 OpenClaw 的智能体模块,主要是需要创建和管理。通过 agent 子命令可以创建多个角色的智能体

  • 查看 agent
  • 创建 agent
1
openclaw agents add test
  • 修改 agent 信息
1
openclaw agents  set-identity --agent test --name test2

修改 name/theme/emoji/avatar 等

  • 删除 agent
1
openclaw agents delete test
  • 与 agent 对话
1
openclaw agent --agent main --message "hello"

9. 运维操作

  • 查看 OpenClaw 状态
  • 查看实时日志
  • 安装 daemon
1
openclaw daemon install
  • 卸载 daemon
1
openclaw daemon uninstall
  • 检查
  • 卸载全部服务
1
openclaw uninstall --all --yes --non-interactive

10. 异常处理

  • channel 对话异常
1
2
400 Invalid JSON payload received. Unknown name "patternProperties" at 'tools[0].function_declarations[3].parameters.properties[4].value': Cannot find field.
Invalid JSON payload received. Unknown name "additionalProperties" at 'tools[0].function_declarations[5].parameters.properties[20].value.properties[3].value.items': Cannot find field.

模型配置异常,需要更换模型。


微信公众号