Skip to content
Back to search

OpenClawInstaller

ClawdBot 一键部署工具

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/miaoxworld--openclawinstaller/badge.svg)](/listings/miaoxworld--openclawinstaller)

HTML

<a href="/listings/miaoxworld--openclawinstaller"><img src="/api/listings/miaoxworld--openclawinstaller/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 526 lines · 3 findings marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # 🦞 OpenClaw 一键部署工具
  2. <p align="center">
  3. <img src="https://img.shields.io/badge/Version-1.0.0-blue.svg" alt="Version">
  4. <img src="https://img.shields.io/badge/Platform-macOS%20%7C%20Linux-green.svg" alt="Platform">
  5. <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License">
  6. </p>
  7. > 🚀 一键部署你的私人 AI 助手 OpenClaw,支持多平台多模型配置
  8. <p align="center">
  9. <img src="photo/menu.png" alt="OpenClaw 配置中心" width="600">
  10. </p>
  11. ## 📖 目录
  12. - [系统要求](#-系统要求)
  13. - [快速开始](#-快速开始)
  14. - [功能特性](#-功能特性)
  15. - [详细配置](#-详细配置)
  16. - [常用命令](#-常用命令)
  17. - [配置说明](#-配置说明)
  18. - [安全建议](#-安全建议)
  19. - [常见问题](#-常见问题)
  20. - [更新日志](#-更新日志)
  21. ## 💻 系统要求
  22. | 项目 | 要求 |
  23. |------|------|
  24. | 操作系统 | macOS 12+ / Ubuntu 20.04+ / Debian 11+ / CentOS 8+ |
  25. | Node.js | v22 或更高版本 |
  26. | 内存 | 最低 2GB,推荐 4GB+ |
  27. | 磁盘空间 | 最低 1GB |
  28. ## 🚀 快速开始
  29. ### 🖥️ 桌面版 OpenClaw Manager(推荐)
  30. 如果你更喜欢图形界面,推荐使用 **OpenClaw Manager** 桌面应用:
  31. <p align="center">
  32. <a href="https://github.com/miaoxworld/openclaw-manager">
  33. <img src="https://img.shields.io/badge/下载桌面版-OpenClaw%20Manager-blue?style=for-the-badge&logo=github" alt="Download">
  34. </a>
  35. </p>
  36. - 🎨 **现代化 UI** - 基于 Tauri 2.0 + React + TypeScript + Rust 构建
  37. - 📊 **实时监控** - 仪表盘查看服务状态、内存、运行时间
  38. - 🔧 **可视化配置** - AI 模型、消息渠道一键配置
  39. - 💻 **跨平台** - 支持 macOS、Windows、Linux
  40. 👉 **下载地址**: [github.com/miaoxworld/openclaw-manager](https://github.com/miaoxworld/openclaw-manager)
  41. ---
  42. ### 方式一:一键安装(命令行版)
  43. ```bash
  44. curl -fsSL https://raw.githubusercontent.com/miaoxworld/OpenClawInstaller/main/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 60 on GitHub
  45. ```
  46. 安装脚本会自动:
  47. 1. 检测系统环境并安装依赖
  48. 2. 安装 OpenClaw
  49. 3. 引导完成核心配置(AI模型、身份信息)
  50. 4. 测试 API 连接
  51. 5. **自动启动 OpenClaw 服务**
  52. 6. 可选打开配置菜单进行详细配置(渠道等)
  53. ### 方式二:手动安装
  54. ```bash
  55. # 1. 克隆仓库
  56. git clone https://github.com/miaoxworld/OpenClawInstaller.git
  57. cd OpenClawInstaller
  58. # 2. 添加执行权限
  59. chmod +x install.sh config-menu.sh
  60. # 3. 运行安装脚本
  61. ./install.sh
  62. #如果mac有权限问题,可以手动安装clawbot之后再运行install
  63. npm install -g openclaw
  64. ```
  65. ### 安装完成后
  66. 安装完成后脚本会:
  67. 1. **自动询问是否启动服务**(推荐选择 Y)
  68. 2. 后台启动 OpenClaw Gateway
  69. 3. 可选打开配置菜单进行渠道配置
  70. 如果需要后续管理:
  71. ```bash
  72. # 手动启动服务
  73. source ~/.openclaw/env && openclaw gateway
  74. # 后台启动服务
  75. openclaw gateway start
  76. # 运行配置菜单进行详细配置
  77. bash ~/.openclaw/config-menu.sh
  78. # 或从 GitHub 下载运行
  79. curl -fsSL https://raw.githubusercontent.com/miaoxworld/OpenClawInstaller/main/config-menu.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 108 on GitHub
  80. ```
  81. ## ✨ 功能特性
  82. ### 🤖 多模型支持
  83. <p align="center">
  84. <img src="photo/llm.png" alt="AI 模型配置" width="600">
  85. </p>
  86. **主流服务商:**
  87. - **Anthropic Claude** - claude-sonnet-4-5 / claude-opus-4-5 / claude-haiku-4-5 *(支持自定义 API 地址)*
  88. - **OpenAI GPT** - gpt-4o / gpt-4o-mini / gpt-4-turbo *(支持自定义 API 地址,需支持 v1/responses)*
  89. - **Google Gemini** - gemini-2.0-flash / gemini-1.5-pro / gemini-1.5-flash
  90. **多模型网关:**
  91. - **OpenRouter** - 多模型网关,一个 Key 用遍所有模型 (claude-sonnet-4 / gpt-4o / gemini-pro-1.5)
  92. **快速推理:**
  93. - **Groq** - 超快推理,llama-3.3-70b-versatile / llama-3.1-8b-instant / mixtral-8x7b
  94. - **Mistral AI** - mistral-large-latest / mistral-small-latest / codestral-latest
  95. **本地部署:**
  96. - **Ollama** - 本地部署,无需 API Key (llama3 / llama3:70b / mistral)
  97. > 💡 **自定义 API 地址**: Anthropic Claude 和 OpenAI GPT 都支持自定义 API 地址,可接入 OneAPI/NewAPI/API 代理等服务。配置时先输入自定义地址,再输入 API Key。
  98. >
  99. > ⚠️ **OpenAI 中转要求**: 自定义 OpenAI API 地址必须支持 `v1/responses` 路径(OpenAI Responses API),不仅仅是传统的 `v1/chat/completions`。请确认您的中转服务已支持此接口。
  100. ### 📱 多渠道接入
  101. <p align="center">
  102. <img src="photo/social.png" alt="消息渠道配置" width="600">
  103. </p>
  104. - Telegram Bot
  105. - Discord Bot
  106. - WhatsApp
  107. - Slack
  108. - 微信 (WeChat)
  109. - iMessage (仅 macOS)
  110. - 飞书 (Feishu)
  111. ### 🧪 快速测试
  112. <p align="center">
  113. <img src="photo/messages.png" alt="快速测试" width="600">
  114. </p>
  115. - API 连接测试
  116. - 渠道连接验证
  117. - OpenClaw 诊断工具
  118. ### 🧠 核心能力
  119. - **持久记忆** - 跨对话、跨平台的长期记忆
  120. - **主动推送** - 定时提醒、晨报、告警通知
  121. - **技能系统** - 通过 Markdown 文件定义自定义能力
  122. - **远程控制** - 可执行系统命令、读写文件、浏览网络
  123. ## ⚙️ 详细配置
  124. ### 配置 AI 模型
  125. 运行配置菜单后选择 `[2] AI 模型配置`,可选择多种 AI 提供商:
  126. <p align="center">
  127. <img src="photo/llm.png" alt="AI 模型配置界面" width="600">
  128. </p>
  129. #### Anthropic Claude 配置
  130. 1. 在配置菜单中选择 Anthropic Claude
  131. 2. **先输入自定义 API 地址**(留空使用官方 API)
  132. 3. 输入 API Key(官方 Key 从 [Anthropic Console](https://console.anthropic.com/) 获取)
  133. 4. 选择模型(推荐 claude-sonnet-4-5-20250929)
  134. > 💡 支持 OneAPI/NewAPI 等第三方代理服务,只需填入对应的 API 地址和 Key
  135. #### OpenAI GPT 配置
  136. 1. 在配置菜单中选择 OpenAI GPT
  137. 2. **先输入自定义 API 地址**(留空使用官方 API)
  138. 3. 输入 API Key(官方 Key 从 [OpenAI Platform](https://platform.openai.com/) 获取)
  139. 4. 选择模型
  140. > ⚠️ **中转服务要求**: 如使用自定义 API 地址,中转服务必须支持 OpenAI 的 **Responses API** (`v1/responses` 路径),而非仅支持传统的 Chat Completions API (`v1/chat/completions`)。部分老旧或功能不全的中转服务可能不支持此接口,请提前确认。
  141. > 💡 **其他模型**: 配置菜单还支持 Google Gemini、OpenRouter、Groq、Mistral AI、Ollama 等,按菜单提示操作即可。
  142. ### 配置 Telegram 机器人
  143. 1. 在 Telegram 中搜索 `@BotFather`
  144. 2. 发送 `/newbot` 创建新机器人
  145. 3. 设置机器人名称和用户名
  146. 4. 复制获得的 **Bot Token**
  147. 5. 搜索 `@userinfobot` 获取你的 **User ID**
  148. 6. 在配置菜单中选择 Telegram,输入以上信息
  149. ### 配置 Discord 机器人
  150. **第一步:创建 Discord 应用和机器人**
  151. 1. 访问 [Discord Developer Portal](https://discord.com/developers/applications)
  152. 2. 点击 "New Application" 创建新应用
  153. 3. 进入应用后,点击左侧 "Bot" 菜单
  154. 4. 点击 "Reset Token" 生成并复制 **Bot Token**
  155. 5. ⚠️ **开启 "Message Content Intent"**(重要!否则无法读取消息内容)
  156. **第二步:邀请机器人到服务器**
  157. 1. 点击左侧 "OAuth2" → "URL Generator"
  158. 2. Scopes 勾选:`bot`
  159. 3. Bot Permissions 至少勾选:
  160. - View Channels(查看频道)
  161. - Send Messages(发送消息)
  162. - Read Message History(读取消息历史)
  163. 4. 复制生成的 URL,在浏览器打开并选择服务器
  164. 5. 确保机器人在目标频道有权限
  165. **第三步:获取频道 ID**
  166. 1. 打开 Discord 客户端,进入 "用户设置" → "高级"
  167. 2. 开启 "开发者模式"
  168. 3. 右键点击你想让机器人响应的频道
  169. 4. 点击 "复制频道 ID"
  170. **第四步:在配置菜单中配置**
  171. 在配置菜单中选择 Discord,输入 Bot Token 和 Channel ID
  172. ### 配置飞书机器人
  173. > 📖 **详细文档**: 查看 [飞书机器人配置指南](docs/feishu-setup.md) 获取完整的配置说明和常见问题解答。
  174. > 💡 **无需公网服务器**:OpenClaw 使用飞书的 WebSocket 长连接模式接收事件,无需配置 Webhook 地址。
  175. 1. 访问 [飞书开放平台](https://open.feishu.cn/)
  176. 2. 创建企业自建应用(个人账号即可,无需企业认证)
  177. 3. **添加机器人能力**:
  178. - 进入路径:开发者后台 → 应用详情 → 添加应用能力
  179. - 确认:确保"机器人"开关是打开状态
  180. 4. 获取 **App ID** 和 **App Secret**
  181. 5. 在"权限管理"中添加权限:
  182. - `im:message` (收发消息)
  183. - `im:message:send_as_bot` (发送消息)
  184. - `im:chat:readonly` (读取会话信息)
  185. 6. 发布应用:版本管理与发布 → 创建版本 → 发布
  186. 7. **在配置菜单中配置飞书**:输入 App ID 和 App Secret,启动 OpenClaw 服务
  187. 8. 配置"事件订阅"(使用长连接):
  188. - 进入:事件与回调 → 选择「**使用长连接接收事件**」
  189. - 添加事件:`im.message.receive_v1`(接收消息)
  190. - **无需填写 Webhook 地址**
  191. - ⚠️ **注意**:需要 OpenClaw 服务已启动,才能保存长连接设置
  192. 9. 添加机器人到群组:群设置 → 群机器人 → 添加机器人
  193. ### 配置 WhatsApp
  194. > 💡 **无需 Business API**:OpenClaw 通过扫码登录你的 WhatsApp 账号,无需申请 Business API。
  195. 1. 在配置菜单中选择 `[3] 消息渠道配置` → `[3] WhatsApp`
  196. 2. 系统会自动启用 WhatsApp 插件
  197. 3. 扫描终端显示的二维码完成登录
  198. 4. 登录成功后重启 Gateway 使配置生效
  199. 5. **测试**:用自己的 WhatsApp 给自己发消息即可触发机器人回复
  200. > ⚠️ **注意**:WhatsApp 账号只能在一个设备上登录 Web 版,配置后原有的 WhatsApp Web 会被踢下线。
  201. ## 📝 常用命令
  202. ### 服务管理
  203. ```bash
  204. # 启动服务(后台守护进程)
  205. openclaw gateway start
  206. # 停止服务
  207. openclaw gateway stop
  208. # 重启服务
  209. openclaw gateway restart
  210. # 查看服务状态
  211. openclaw gateway status
  212. # 前台运行(用于调试)
  213. openclaw gateway
  214. # 查看日志
  215. openclaw logs
  216. # 实时日志
  217. openclaw logs --follow
  218. ```
  219. ### 配置管理
  220. ```bash
  221. # 打开配置文件
  222. openclaw config
  223. # 运行配置向导
  224. openclaw onboard
  225. # 诊断配置问题
  226. openclaw doctor
  227. # 健康检查
  228. openclaw health
  229. ```
  230. ### 数据管理
  231. ```bash
  232. # 导出对话历史
  233. openclaw export --format json
  234. # 清理记忆
  235. openclaw memory clear
  236. # 备份数据
  237. openclaw backup
  238. ```
  239. ## 📋 配置说明
  240. OpenClaw 使用以下配置方式:
  241. - **环境变量**: `~/.openclaw/env` - 存储 API Key 和 Base URL
  242. - **OpenClaw 配置**: `~/.openclaw/openclaw.json` - OpenClaw 内部配置(自动管理)
  243. - **命令行工具**: `openclaw config set` / `openclaw models set` 等
  244. > 💡 **注意**:配置主要通过安装向导或 `config-menu.sh` 完成,无需手动编辑配置文件
  245. ### 环境变量配置示例
  246. `~/.openclaw/env` 文件内容:
  247. ```bash
  248. # OpenClaw 环境变量配置
  249. export ANTHROPIC_API_KEY=sk-ant-xxxxx
  250. export ANTHROPIC_BASE_URL=https://your-api-proxy.com # 可选,自定义 API 地址
  251. # 或者 OpenAI
  252. export OPENAI_API_KEY=sk-xxxxx
  253. export OPENAI_BASE_URL=https://your-api-proxy.com/v1 # 可选
  254. ```
  255. ### 自定义 Provider 配置
  256. 当使用自定义 API 地址时,安装脚本会自动在 `~/.openclaw/openclaw.json` 中配置自定义 Provider:
  257. ```json
  258. {
  259. "models": {
  260. "providers": {
  261. "anthropic-custom": {
  262. "baseUrl": "https://your-api-proxy.com",
  263. "apiKey": "your-api-key",
  264. "models": [
  265. {
  266. "id": "claude-sonnet-4-5-20250929",
  267. "name": "claude-sonnet-4-5-20250929",
  268. "api": "anthropic-messages",
  269. "input": ["text"],
  270. "contextWindow": 200000,
  271. "maxTokens": 8192
  272. }
  273. ]
  274. }
  275. }
  276. }
  277. }
  278. ```
  279. ### 目录结构
  280. ```
  281. ~/.openclaw/
  282. ├── openclaw.json # OpenClaw 核心配置
  283. ├── env # 环境变量 (API Key 等)
  284. ├── backups/ # 配置备份
  285. └── logs/ # 日志文件 (由 OpenClaw 管理)
  286. ```
  287. ## 🛡️ 安全建议
  288. > ⚠️ **重要警告**:OpenClaw 需要完全的计算机权限,请务必注意安全!
  289. ### 部署建议
  290. 1. **不要在主工作电脑上部署** - 建议使用专用服务器或虚拟机
  291. 2. **使用 AWS/GCP/Azure 免费实例** - 隔离环境更安全
  292. 3. **Docker 部署** - 提供额外的隔离层
  293. ### 权限控制
  294. 1. **禁用危险功能**(默认已禁用)
  295. ```yaml
  296. security:
  297. enable_shell_commands: false
  298. enable_file_access: false
  299. ```
  300. 2. **启用沙箱模式**
  301. ```yaml
  302. security:
  303. sandbox_mode: true
  304. ```
  305. 3. **限制允许的用户**
  306. ```yaml
  307. channels:
  308. telegram:
  309. allowed_users:
  310. - "only-your-user-id"
  311. ```
  312. ### API Key 安全
  313. - 定期轮换 API Key
  314. - 不要在公开仓库中提交配置文件
  315. - 使用环境变量存储敏感信息
  316. ```bash
  317. # 使用环境变量
  318. export ANTHROPIC_API_KEY="sk-ant-xxx"
  319. export TELEGRAM_BOT_TOKEN="xxx"
  320. ```
  321. ## ❓ 常见问题
  322. ### Q: 安装时提示 Node.js 版本过低?
  323. ```bash
  324. # macOS
  325. brew install node@22
  326. brew link --overwrite node@22
  327. # Ubuntu/Debian
  328. curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 448 on GitHub
  329. sudo apt-get install -y nodejs
  330. ```
  331. ### Q: 启动后无法连接?
  332. 1. 检查配置文件是否正确
  333. 2. 运行诊断命令:`openclaw doctor`
  334. 3. 查看日志:`openclaw logs`
  335. ### Q: Telegram 机器人没有响应?
  336. 1. 确认 Bot Token 正确
  337. 2. 确认 User ID 在 allowed_users 列表中
  338. 3. 检查网络连接(可能需要代理)
  339. ### Q: 如何更新到最新版本?
  340. ```bash
  341. # 使用 npm 更新
  342. npm update -g openclaw
  343. # 或使用配置菜单
  344. ./config-menu.sh
  345. # 选择 [7] 高级设置 → [7] 更新 OpenClaw
  346. ```
  347. ### Q: 如何备份数据?
  348. ```bash
  349. # 手动备份
  350. cp -r ~/.openclaw ~/openclaw_backup_$(date +%Y%m%d)
  351. # 使用命令备份
  352. openclaw backup
  353. ```
  354. ### Q: 如何完全卸载?
  355. ```bash
  356. # 停止服务
  357. openclaw gateway stop
  358. # 卸载程序
  359. npm uninstall -g openclaw
  360. # 删除配置(可选)
  361. rm -rf ~/.openclaw
  362. ```
  363. ## 📜 更新日志
  364. ### v1.0.0 (2026-01-29)
  365. - 🎉 首次发布
  366. - ✨ 支持一键安装部署
  367. - ✨ 交互式配置菜单
  368. - ✨ 多模型支持 (Claude/GPT/Ollama)
  369. - ✨ 多渠道支持 (Telegram/Discord/WhatsApp)
  370. - ✨ 技能系统
  371. - ✨ 安全配置
  372. ## 📄 许可证
  373. 本项目基于 MIT 许可证开源。
  374. ## 🔗 相关链接
  375. - [OpenClaw 官网](https://clawd.bot)
  376. - [官方文档](https://clawd.bot/docs)
  377. - [🖥️ OpenClaw Manager 桌面版](https://github.com/miaoxworld/openclaw-manager) - 图形界面管理工具
  378. - [安装工具仓库](https://github.com/miaoxworld/OpenClawInstaller) - 命令行版本
  379. - [OpenClaw 主仓库](https://github.com/openclaw/openclaw)
  380. - [社区讨论](https://github.com/miaoxworld/OpenClawInstaller/discussions)
  381. ---
  382. <p align="center">
  383. Made with ❤️ by <a href="https://github.com/miaoxworld">miaoxworld</a>
  384. </p>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.