Getting alerts when your service goes down (Uptime Kuma)
If you want an instant Discord alert when your website or game server goes down, use Uptime Kuma. It's a free program that regularly tries connecting to your service and lets you know if it doesn't respond. We'll install it with Docker.
1. Install
If you don't have Docker, install it first with Installing and using Docker.
docker run -d --name uptime-kuma --restart unless-stopped \
-p 127.0.0.1:3001:3001 \
-v uptime-kuma:/app/data \
louislam/uptime-kuma:1
It's bound only to 127.0.0.1, so it can't be reached directly from outside. Open the admin screen with one of the two methods below.
2. Open the admin screen
Method A. Open it on a domain (recommended if you'll keep using it)
Set up Nginx and HTTPS by following Putting up a website, and set proxy_pass to http://127.0.0.1:3001. Uptime Kuma uses real-time connections (WebSocket), so also add the lines below inside location /.
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
Method B. Open it briefly with an SSH tunnel
Run this in PowerShell on your PC, then go to http://localhost:3001 in your browser.
ssh -N -L 3001:127.0.0.1:3001 username@server-ip
The first time you visit, you'll see a screen for creating the admin account. Create it right away.
3. Add services to monitor
Click Add New Monitor and choose a type.
| What to monitor | Monitor type | Input |
|---|---|---|
| Website | HTTP(s) | https://mydomain |
| Minecraft or other game server | TCP Port | Server IP, port 25565 |
| Whether the server is on | Ping | Server IP |
The default check interval of 60 seconds is enough.
4. Get alerts on Discord
- Discord channel settings → Integrations → Webhooks → New Webhook → copy the webhook URL
- Profile at the top right of Uptime Kuma → Settings → Notifications → Setup Notification
- Notification type Discord, paste the webhook URL you copied, check it with Test, then save
- Turn on this notification on each monitor's edit screen.
Good to know
- If Uptime Kuma is on the same server as the services it monitors, it can't send alerts when the server itself goes down. You can also check the status of the server itself in your Dashboard.
- Monitoring history is stored in the
uptime-kumavolume. To update, rundocker pull louislam/uptime-kuma:1, remove the container, and run it again with the same command. (Your history stays as long as you don't delete the volume.)