8.0 KiB
Note
本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
English · 原始项目 · 上游 README
原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
Uptime Kuma
Uptime Kuma 是一款易于使用的自托管监控工具。
🥔 在线演示
快来试试吧!
演示服务器(位置:德国法兰克福):https://demo.kuma.pet/start-demo
这是一个临时的在线演示,所有数据将在 10 分钟后删除。由 Uptime Kuma 赞助者. 赞助
⭐ 功能特性
- 监控以下服务的运行状态:HTTP(s) / TCP / HTTP(s) 关键词 / HTTP(s) JSON 查询 / WebSocket / Ping / DNS 记录 / Push / Steam 游戏服务器 / Docker 容器
- 精美、响应式、快速的 UI/UX
- 通过 Telegram、Discord、Gotify、Slack、Pushover、电子邮件 (SMTP) 以及 90+ 通知服务(点击此处查看完整列表) 发送通知
- 20 秒检测间隔
- 多语言支持
- 多个状态页
- 将状态页映射到特定域名
- Ping 图表
- 证书信息
- 代理支持
- 双因素认证(2FA)支持
🔧 如何安装
🐳 Docker Compose
mkdir uptime-kuma
cd uptime-kuma
curl -o compose.yaml https://raw.githubusercontent.com/louislam/uptime-kuma/master/compose.yaml
docker compose up -d
Uptime Kuma 现已在所有网络接口上运行(例如 http://localhost:3001 或 http://your-ip:3001).
Warning
不支持像 NFS(网络文件系统)这样的文件系统。请映射到本地目录或卷。
🐳 Docker 命令
docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:2
Uptime Kuma 现已在所有网络接口上运行(例如 http://localhost:3001 或 http://your-ip:3001).
如果您只想将其暴露给本地主机(localhost):
docker run ... -p 127.0.0.1:3001:3001 ...
💪🏻 非 Docker 方式
环境要求:
- 平台
- ✅ 主流 Linux 发行版,如 Debian、Ubuntu、Fedora 和 ArchLinux 等
- ✅ Windows 10 (x64)、Windows Server 2012 R2 (x64) 或更高版本
- ❌ FreeBSD / OpenBSD / NetBSD
- ❌ Replit / Heroku
- Node.js >= 20.4
- Git
- pm2 - 用于在后台运行 Uptime Kuma
git clone https://github.com/louislam/uptime-kuma.git
cd uptime-kuma
npm run setup
# Option 1. Try it
node server/server.js
# (Recommended) Option 2. Run in the background using PM2
# Install PM2 if you don't have it:
npm install pm2 -g && pm2 install pm2-logrotate
# Start Server
pm2 start server/server.js --name uptime-kuma
Uptime Kuma 现已在所有网络接口上运行(例如 http://localhost:3001 或 http://your-ip:3001).
更多实用的 PM2 命令
# If you want to see the current console output
pm2 monit
# If you want to add it to startup
pm2 startup && pm2 save
高级安装
如果您需要更多选项或需要通过反向代理访问,请阅读:
https://github.com/louislam/uptime-kuma/wiki/%F0%9F%94%A7-How-to-Install
🆙 如何更新
请阅读:
https://github.com/louislam/uptime-kuma/wiki/%F0%9F%86%99-How-to-Update
🆕 下一步计划?
我会将请求/议题(issues)分配到下一个里程碑。
https://github.com/louislam/uptime-kuma/milestones
❤️ 赞助者
非常感谢!(GitHub Sponsors 将手动更新。OpenCollective 赞助者将自动更新,但列表会被 GitHub 缓存,可能需要一些时间才能显示更新)
🖼 更多截图
浅色模式:
状态页:
设置页:
Telegram 通知示例:
项目初衷
- 我一直在寻找一款类似"Uptime Robot"的自托管监控工具,但很难找到合适的。最接近的一款是 statping,遗憾的是它不稳定且已不再维护。
- 想构建一个精美的 UI。
- 学习 Vue 3 和 Vite.js。
- 展示 Bootstrap 5 的强大功能。
- 尝试在 SPA 中使用 WebSocket 而非 REST API。
- 将我的第一个 Docker 镜像部署到 Docker Hub。
如果您喜欢这个项目,请考虑给它一个 ⭐。
🗣️ 讨论 / 寻求帮助
⚠️ 如有任何一般性或技术性问题,请不要给我发邮件,因为我无法以这种方式提供支持。如果您在那里提问,我不会回复。
我建议使用 Google、GitHub Issues 或 Uptime Kuma 的 Subreddit 来寻找答案。如果找不到所需信息,欢迎在此提问:
我的 Reddit 账号:u/louislamlam 如果您在 Subreddit 上提问,可以提及我。
贡献
创建 Pull Request
我们非常欢迎 Pull Request。 为了保持代码审查快速高效,请确保您已阅读我们的 Pull Request 指南.
测试 Pull Request
目前有大量的 Pull Request,但我没有时间逐一测试。
如果您愿意提供帮助,可以查看这里: https://github.com/louislam/uptime-kuma/wiki/Test-Pull-Requests
测试 Beta 版本
在此查看最新的 Beta 版本:https://github.com/louislam/uptime-kuma/releases
错误报告 / 功能请求
如果您想报告错误或请求新功能,欢迎提交新的 issue.
翻译
如果您想将 Uptime Kuma 翻译成您的语言,请访问 Weblate 自述文件.
拼写与语法
欢迎纠正文档或代码中的语法错误。 我的母语不是英语,语法水平有限。