uptime-kuma/README.md

147 lines
4.5 KiB
Markdown
Raw Normal View History

2021-07-01 05:00:23 -04:00
# Uptime Kuma
2021-07-13 13:39:04 -04:00
<a target="_blank" href="https://github.com/louislam/uptime-kuma"><img src="https://img.shields.io/github/stars/louislam/uptime-kuma" /></a> <a target="_blank" href="https://hub.docker.com/r/louislam/uptime-kuma"><img src="https://img.shields.io/docker/pulls/louislam/uptime-kuma" /></a> <a target="_blank" href="https://hub.docker.com/r/louislam/uptime-kuma"><img src="https://img.shields.io/docker/v/louislam/uptime-kuma/latest?label=docker%20image%20ver." /></a> <a target="_blank" href="https://github.com/louislam/uptime-kuma"><img src="https://img.shields.io/github/last-commit/louislam/uptime-kuma" /></a>
2021-07-13 13:36:25 -04:00
2021-07-11 04:08:47 -04:00
<div align="center" width="100%">
<img src="./public/icon.svg" width="128" alt="" />
</div>
2021-07-11 02:20:31 -04:00
It is a self-hosted monitoring tool like "Uptime Robot".
2021-07-11 06:32:04 -04:00
<img src="https://louislam.net/uptimekuma/1.jpg" width="512" alt="" />
2021-08-08 12:24:30 -04:00
## Features
2021-07-01 05:00:23 -04:00
* Monitoring uptime for HTTP(s) / TCP / Ping.
* Fancy, Reactive, Fast UI/UX.
2021-07-30 03:04:52 -04:00
* Notifications via Webhook, Telegram, Discord, Gotify, Slack, Pushover, Email (SMTP) and more by Apprise.
2021-07-01 05:00:23 -04:00
* 20 seconds interval.
2021-08-08 12:24:30 -04:00
## How to Use
2021-07-01 05:00:23 -04:00
2021-08-08 12:24:30 -04:00
### Docker
2021-07-14 05:10:51 -04:00
2021-07-11 06:32:04 -04:00
```bash
2021-07-12 08:08:51 -04:00
# Create a volume
docker volume create uptime-kuma
# Start the container
2021-07-19 08:18:27 -04:00
docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1
2021-07-11 04:02:06 -04:00
```
2021-07-01 05:00:23 -04:00
2021-07-11 11:41:21 -04:00
Browse to http://localhost:3001 after started.
2021-07-11 11:41:04 -04:00
Change Port and Volume
```bash
2021-07-19 08:18:27 -04:00
docker run -d --restart=always -p <YOUR_PORT>:3001 -v <YOUR_DIR OR VOLUME>:/app/data --name uptime-kuma louislam/uptime-kuma:1
2021-07-11 11:41:04 -04:00
```
2021-08-09 02:47:10 -04:00
### Without Docker (x86/x64 only)
2021-07-11 06:34:29 -04:00
2021-07-30 03:04:52 -04:00
Required Tools: Node.js >= 14, git and pm2.
2021-07-11 06:34:29 -04:00
2021-08-09 02:47:10 -04:00
(**Not recommanded for ARM CPU users.** Since there is no prebuilt for node-sqlite3, it is hard to get it running)
2021-07-11 06:32:04 -04:00
```bash
2021-07-11 06:44:47 -04:00
git clone https://github.com/louislam/uptime-kuma.git
2021-07-11 04:02:06 -04:00
cd uptime-kuma
2021-07-11 06:51:53 -04:00
npm run setup
2021-07-11 04:02:06 -04:00
2021-07-11 06:32:04 -04:00
# Option 1. Try it
2021-07-11 04:02:06 -04:00
npm run start-server
2021-08-08 12:24:30 -04:00
# (Recommended)
2021-07-11 06:32:04 -04:00
# Option 2. Run in background using PM2
2021-07-11 04:02:06 -04:00
# Install PM2 if you don't have: npm install pm2 -g
2021-07-11 07:08:36 -04:00
pm2 start npm --name uptime-kuma -- run start-server
2021-07-11 04:02:06 -04:00
2021-07-12 06:59:48 -04:00
# Listen to different port or hostname
pm2 start npm --name uptime-kuma -- run start-server -- --port=80 --hostname=0.0.0.0
2021-07-11 04:02:06 -04:00
```
2021-08-08 11:51:23 -04:00
More useful commands if you have installed.
```bash
pm2 start uptime-kuma
pm2 restart uptime-kuma
pm2 stop uptime-kuma
```
2021-07-11 04:02:06 -04:00
Browse to http://localhost:3001 after started.
2021-08-08 12:24:30 -04:00
### (Optional) One more step for Reverse Proxy
2021-07-31 12:15:33 -04:00
2021-07-31 12:23:40 -04:00
This is optional for someone who want to do reverse proxy.
Unlikely other web apps, Uptime Kuma is based on WebSocket. You need two more headers **"Upgrade"** and **"Connection"** in order to reverse proxy WebSocket.
2021-07-31 12:15:33 -04:00
Please read wiki for more info:
https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy
2021-08-08 12:24:30 -04:00
## How to Update
2021-07-12 06:59:48 -04:00
### Docker
Re-pull the latest docker image and create another container with the same volume.
2021-08-04 03:19:06 -04:00
For someone who used my "How-to-use" commands to install Uptime Kuma, you can update by this:
2021-08-08 12:24:30 -04:00
2021-08-04 03:19:06 -04:00
```bash
2021-08-09 02:11:26 -04:00
docker pull louislam/uptime-kuma:1
2021-08-04 03:19:06 -04:00
docker stop uptime-kuma
docker rm uptime-kuma
docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1
```
2021-07-13 13:48:55 -04:00
PS: For every new release, it takes some time to build the docker image, please be patient if it is not available yet.
2021-07-12 06:59:48 -04:00
### Without Docker
```bash
git fetch --all
2021-08-09 09:03:30 -04:00
git checkout 1.1.0 --force
2021-07-12 06:59:48 -04:00
npm install
npm run build
pm2 restart uptime-kuma
```
2021-08-08 12:24:30 -04:00
## What's Next?
2021-07-20 08:27:15 -04:00
2021-07-30 03:04:52 -04:00
I will mark requests/issues to the next milestone.
2021-07-20 08:27:15 -04:00
https://github.com/louislam/uptime-kuma/milestones
2021-08-08 12:24:30 -04:00
## More Screenshots
2021-07-11 06:32:04 -04:00
2021-08-09 10:31:32 -04:00
Dark Mode:
<img src="https://user-images.githubusercontent.com/1336778/128710166-908f8d88-9256-43f3-9c49-bfc2c56011d2.png" width="400" alt="" />
2021-07-11 08:12:37 -04:00
Settings Page:
2021-07-11 06:32:04 -04:00
<img src="https://louislam.net/uptimekuma/2.jpg" width="400" alt="" />
2021-07-11 08:12:37 -04:00
Telegram Notification Sample:
<img src="https://louislam.net/uptimekuma/3.jpg" width="400" alt="" />
2021-08-08 12:24:30 -04:00
## Motivation
2021-07-01 05:00:23 -04:00
2021-07-30 03:04:52 -04:00
* I was looking for a self-hosted monitoring tool like "Uptime Robot", but it is hard to find a suitable one. One of the close one is statping. Unfortunately, it is not stable and unmaintained.
2021-07-01 05:00:23 -04:00
* Want to build a fancy UI.
* Learn Vue 3 and vite.js.
2021-07-30 03:04:52 -04:00
* Show the power of Bootstrap 5.
2021-07-01 05:00:23 -04:00
* Try to use WebSocket with SPA instead of REST API.
* Deploy my first Docker image to Docker Hub.
If you love this project, please consider giving me a ⭐.
2021-08-08 12:24:30 -04:00
## Contribute
2021-07-18 12:34:48 -04:00
2021-07-20 01:04:21 -04:00
If you want to report a bug or request a new feature. Free feel to open a new issue.
2021-07-18 12:34:48 -04:00
2021-07-31 23:11:04 -04:00
If you want to modify Uptime Kuma, this guideline maybe useful for you: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md
2021-07-18 12:34:48 -04:00
2021-07-18 12:40:10 -04:00
English proofreading is needed too, because my grammar is not that great sadly. Feel free to correct my grammar in this Readme, source code or wiki.