If you run a website or an app on a VPS, you've probably had this unpleasant moment: the site has been down for hours, and you only find out because a visitor complains. The cause is often something small, such as a stopped container, a full disk, or an expired SSL certificate.
Checking every site by hand is clearly not a solution. There are plenty of paid uptime monitoring services, but their free plans usually limit the number of monitors and how often they check.
This is where Uptime Kuma becomes an attractive option. It's an open source app you install on your own server. It watches your websites and services around the clock and sends a message to Telegram the moment something goes wrong.
In this article, we'll walk through how to install Uptime Kuma with Docker Compose, from starting the container, creating your first monitor, setting up Telegram notifications, and building a status page, to adding HTTPS, backups, and updates. Let's get started!
What is Uptime Kuma?
Uptime Kuma is a self-hosted monitoring app created by Louis Lam and released as an open source project on GitHub. Its job is simple: check your services at regular intervals, record the results, and tell you when something stops responding.
Uptime is how long a service has been running normally and reachable. The opposite is downtime, when the service can't be reached.
Think of Uptime Kuma as a security guard who walks around every minute, knocks on the door of each of your services, and calls you right away if a door doesn't open.
According to the official documentation, Uptime Kuma can monitor many kinds of services, including:
- HTTP(s): checks whether a URL responds with the right status.
- HTTP(s) Keyword and JSON Query: check whether the response contains a certain word or value.
- TCP Port and Ping: check whether a port or a server is reachable.
- DNS Record: checks what a domain resolves to.
- Push: the reverse of the others, where your service "reports in" to Uptime Kuma. Great for monitoring cron jobs.
- Docker Container: checks the status of containers on a Docker host.
At the time of writing, the latest stable release is the 2.5 series, while version 3.0 is still in beta. This article uses the stable version 2.
Why Use Uptime Kuma?
There are several reasons why Uptime Kuma is popular among self-hosting fans:
- Free with no monitor limit: there's no monthly fee and no cap on how many services you can monitor. The only limit is what your server can handle.
- Short check intervals: checks can run as often as every 20 seconds.
- Notifications to many services: Telegram, Discord, Slack, Gotify, Pushover, Email (SMTP), and more than 90 others.
- Built-in status pages: you can create public status pages for your visitors, and more than one of them.
- SSL certificate monitoring: HTTPS monitors also show certificate information, so you know before a certificate expires.
- Easy to install: a single container, with no separate database.
- A pleasant interface: the UI is modern, responsive, and available in many languages.
Drawbacks of Uptime Kuma
To keep things balanced, here are a few things to know before you use it:
- It can't report its own death: if Uptime Kuma runs on the same VPS as your website and that VPS goes down completely, Uptime Kuma goes down with it and no notification is sent. We'll cover how to deal with this in the tips section.
- It checks from a single location: paid services usually check from many countries at once.
- It's not a resource monitor: Uptime Kuma only knows whether a service is up or down and how fast it responds. For CPU, RAM, and disk charts, you need another tool such as Netdata or Prometheus.
- No subdirectory support: Uptime Kuma has to be served from its own domain or subdomain, such as
status.example.com, and not fromexample.com/status.
Preparation
Before you begin, make sure you have:
- A Linux server running Ubuntu 24.04 LTS or 26.04 LTS. The commands in this article are written for both versions. A small VPS with 1 GB of RAM is generally enough, and a Raspberry Pi at home works too.
- Docker Engine and the Docker Compose plugin already installed. If you don't have them yet, follow Learn Docker Compose first.
- A Telegram account to receive notifications (optional, but highly recommended).
- A domain or subdomain if you want to reach Uptime Kuma over HTTPS (optional).
In the examples in this article, we'll use the IP address 203.0.113.10, the user budi, and the subdomain status.example.com. Replace them with your own.
How to Install Uptime Kuma with Docker Compose
Step #1: Create the Project Folder
It's a good habit to keep each Compose app in its own folder. Create a folder for Uptime Kuma and move into it with the following commands:
mkdir -p ~/apps/uptime-kuma
cd ~/apps/uptime-kumaStep #2: Write the compose.yaml File
Create the Compose file with the nano editor:
nano compose.yamlThen add the following configuration:
services:
uptime-kuma:
image: louislam/uptime-kuma:2
restart: unless-stopped
volumes:
- ./data:/app/data
ports:
- "127.0.0.1:3001:3001"Save the file by pressing Ctrl+X, then Y, and Enter. This file follows the official compose.yaml from Uptime Kuma, with one change to the port mapping. Here's what each part does:
image: louislam/uptime-kuma:2: uses the latest version 2 release. Don't use thelatesttag, because according to the official documentation it is deprecated and still points to version 1.restart: unless-stopped: the container starts again automatically after a server reboot or a crash../data:/app/data: all data (monitors, history, settings) is stored in thedatafolder next tocompose.yaml, which makes it easy to back up.127.0.0.1:3001:3001: port3001is only open to the server itself, not to the internet.
Why
127.0.0.1? The official file uses"3001:3001", which exposes Uptime Kuma on all network interfaces. On a VPS, a port published by Docker this way is still reachable from the internet even if UFW doesn't allow it, and the traffic isn't encrypted yet. With127.0.0.1, we reach it through an SSH tunnel first, then add HTTPS in a later section.
Important: the official documentation states that network file systems such as NFS are not supported for the data folder. Keep the
datafolder on a local disk.
Step #3: Start the Container
Start Uptime Kuma in the background with the following command:
docker compose up -dDocker downloads the image first, so the first run takes a little longer. Once it's done, check the status:
docker compose psThe output looks roughly like this:
NAME IMAGE SERVICE STATUS PORTS
uptime-kuma-uptime-kuma-1 louislam/uptime-kuma:2 uptime-kuma Up 40 seconds (healthy) 127.0.0.1:3001->3001/tcpIf the STATUS column shows Up and then healthy, Uptime Kuma is running. If it keeps showing Restarting, find the cause in the logs with docker compose logs -f.
Step #4: Open the Dashboard and Create the Admin Account
Because the port is only open on 127.0.0.1, we need an SSH tunnel from the local computer. Open a new terminal on your own computer (not on the server), then run the following command:
ssh -L 3001:127.0.0.1:3001 [email protected]As long as this SSH session stays open, port 3001 on your computer is connected to port 3001 on the server. Now open http://localhost:3001 in your browser.
Note: if Uptime Kuma runs on a Raspberry Pi or a home server that isn't directly exposed to the internet, you can change the port mapping to
"3001:3001"and open it athttp://SERVER-IP:3001.
On the first visit, Uptime Kuma version 2 asks you to choose a database. Pick SQLite, since it's the simplest option and more than enough for personal use or a small team. The MariaDB options only start to pay off when you monitor hundreds of services.
After that, create the admin account by entering a username and password, then click Create. Use a strong password, especially if this dashboard will later be exposed to the internet.
How to Use Uptime Kuma
Step #1: Add Your First Monitor
Once you're in the dashboard, click the Add New Monitor button at the top left, then fill in the following:
- Monitor Type: choose HTTP(s) to monitor a website.
- Friendly Name: a name you'll recognize, for example
Teknotut Blog. - URL: the full address of the site, for example
https://www.example.com. - Heartbeat Interval: the time between checks, in seconds. A value of
60(one minute) suits most websites. - Retries: how many times a check may fail before the service is marked as down. In version 2, the default is
0. It's better to set2or3so a brief network hiccup doesn't trigger a notification right away.
Click Save. Within a few seconds, the monitor shows a green Up status along with a response time chart. For HTTPS monitors, Uptime Kuma also shows how long the SSL certificate remains valid.
Repeat this step for every service you want to monitor. Here's a quick guide to choosing a monitor type:
| What you monitor | Monitor type | Example input |
|---|---|---|
| Website or API | HTTP(s) | https://www.example.com |
| Page must contain certain text | HTTP(s) - Keyword | URL and the keyword Welcome |
| Database, SSH, or another service | TCP Port | host 203.0.113.10, port 5432 |
| Server or device on the network | Ping | 192.168.1.1 |
| Cron job or backup script | Push | URL called by the script |
Step #2: Set Up Telegram Notifications
A monitor without notifications is like an alarm without sound. We'll use Telegram because it's free and messages land straight on your phone. First, create a Telegram bot:
- Open Telegram, search for @BotFather, and send the
/newbotcommand. - Follow the prompts to give the bot a name and a username.
- BotFather gives you the bot token. Keep this token safe and don't share it with anyone.
- Open a chat with your new bot and send any message, for example
hello. This step is needed so the bot is allowed to message you.
Next, in the Uptime Kuma dashboard, open Settings → Notifications, click Setup Notification, then fill in:
- Notification Type: choose Telegram.
- Friendly Name: for example
My Telegram. - Bot Token: paste the token from BotFather.
- Chat ID: click the Auto Get button so Uptime Kuma fills it in automatically.
Click Test. If the test message arrives in Telegram, the configuration is correct. Before saving, turn on Default enabled so new monitors use this notification automatically, and also turn on the option to apply it to all existing monitors. Finally, click Save.
From now on, you'll get a message whenever a service goes down and when it comes back up.
Step #3: Create a Status Page
A status page is a public page that shows the state of your services, just like the status pages of big service providers. It lets users or clients check for themselves without having to ask you.
Here's how to create one:
- Click the Status Pages menu at the top, then click New Status Page.
- Fill in the Name (the page title) and the Slug (the last part of the address, for example
services), then click Next. - Click Add Group to create a group, for example
Website, then add the monitors you want to display to it. - Click Save.
The status page is now available at /status/services, with no login required. Visitors only see the names and statuses of the monitors you picked, not your dashboard settings.
Step #4: Monitor Cron Jobs with a Push Monitor
All the monitors above work by "visiting" a service. So how do you monitor something that has no address, such as a backup script that runs every night? The answer is the Push monitor type.
Create a new monitor with Monitor Type set to Push, then set the Heartbeat Interval to match the script's schedule. For a daily backup, use 86400 (24 hours) plus a little slack, for example 90000. Uptime Kuma will show you a unique Push URL.
All you have to do is call that URL at the end of your script, and only when the script succeeds. Here's an example with curl:
curl -fsS -m 10 --retry 3 "https://status.example.com/api/push/YOUR-TOKEN?status=up&msg=OK" > /dev/nullReplace the address above with the Push URL from your dashboard. If the script fails or doesn't run at all, Uptime Kuma receives no "report" before the time limit runs out, marks the monitor as down, and sends a notification. This pairs very well with the script in How to Automate Backups on Linux with rsync and Cron.
Accessing Uptime Kuma over HTTPS with Caddy
An SSH tunnel is fine for personal use. But if you want to open the dashboard from your phone, or share a status page with other people, Uptime Kuma needs to be reachable through a domain with HTTPS. The easiest way is to put it behind a reverse proxy.
This section continues the setup from Caddy Reverse Proxy with Docker Compose: Caddy is already running, the proxy Docker network already exists, and the subdomain status.example.com already points to the server's IP through an A record.
Step #1: Connect Uptime Kuma to the proxy Network
Open ~/apps/uptime-kuma/compose.yaml again and change it to look like this:
services:
uptime-kuma:
image: louislam/uptime-kuma:2
restart: unless-stopped
volumes:
- ./data:/app/data
networks:
- proxy
networks:
proxy:
external: trueThe ports section is removed because all access now goes through Caddy, and the service joins the proxy network. Apply the change with the following command:
docker compose up -dStep #2: Add a Site Block to the Caddyfile
Move to the Caddy folder (~/apps/caddy), open conf/Caddyfile, and add the following block at the bottom:
status.example.com {
reverse_proxy uptime-kuma:3001
}Uptime Kuma talks to the browser over WebSocket, so the reverse proxy has to pass this kind of connection through. The good news is that Caddy's reverse_proxy directive handles it automatically, so no extra settings are needed.
Apply the new configuration by reloading Caddy:
docker compose exec -w /etc/caddy caddy caddy reloadWithin a few seconds, Caddy obtains a certificate for the subdomain. Open https://status.example.com in your browser, and the Uptime Kuma dashboard is now reachable from anywhere.
Important: once the dashboard is exposed to the internet, enable two-factor authentication right away in Settings → Security. Also open Settings → Reverse Proxy and set Trust Proxy to Yes, so Uptime Kuma records the real visitor IP address instead of Caddy's.
Backup, Update, and Password Reset
How to Back Up Uptime Kuma Data
Starting with version 2, the JSON backup and restore feature in the dashboard has been removed. According to the official documentation, the only supported backup method is copying the data folder.
So the database isn't being written while it's copied, stop the container, create an archive, then start it again. Run the following commands from the ~/apps/uptime-kuma folder:
docker compose stop
sudo tar -czf ~/uptime-kuma-backup-$(date +%F).tar.gz data
docker compose startThis only takes a few seconds. Keep the archive off the server, for example by sending it to another computer with rsync.
How to Update Uptime Kuma
Because we use the 2 tag, updating is just a matter of pulling the newest image and recreating the container. The following commands match the official update guide:
docker compose pull
docker compose up -d --force-recreateYour data stays safe because it lives in the data folder, not inside the container. Even so, make a habit of backing up before you update.
Note: the
2tag will not move to version 3 on its own. When version 3 becomes stable and you want to switch, read the official migration guide first and make a backup before changing the tag.
How to Reset the Admin Password
Forgot the admin password? Don't panic. Run the following command from the project folder, then follow the prompts to set a new password:
docker compose exec uptime-kuma npm run reset-passwordTips for Using Uptime Kuma
Tip #1: Don't Install It on the Same Server It Monitors
This is the most important rule in monitoring: the monitor should live outside the system it watches. If you can, install Uptime Kuma on another cheap VPS, or on a Raspberry Pi at home like the one in How to Install Pi-hole on a Raspberry Pi.
If you only have one server, Uptime Kuma is still useful for catching stopped containers, erroring apps, and certificates that are about to expire. It just can't tell you when the server itself goes down.
Tip #2: Set Retries to Avoid a Flood of Notifications
The internet isn't always smooth. A single failed check doesn't necessarily mean your website is down. With Retries set to 2 or 3, Uptime Kuma tries a few more times before sending a notification, so you don't get used to ignoring false alarms.
Tip #3: Be Careful with the Docker Container Monitor
To monitor containers, Uptime Kuma needs access to the Docker socket, which you grant by adding the line - /var/run/docker.sock:/var/run/docker.sock under volumes. The official documentation warns that this gives Uptime Kuma full control over Docker on the host, and it's not recommended when Uptime Kuma is exposed to the internet.
If your dashboard is publicly reachable, it's safer to monitor the apps inside your containers with HTTP(s) or TCP Port monitors instead.
Tip #4: Use the slim Image When Disk Space Is Tight
There's also a 2-slim tag that is hundreds of MB smaller. This image doesn't include the embedded MariaDB and Chromium, so monitor types that need a browser aren't available. For HTTP, TCP, Ping, and Push monitors with the SQLite database, 2-slim is enough.
Conclusion
From this article, we can conclude that running your own monitoring system isn't hard at all. With Uptime Kuma and a single compose.yaml file, you get an uptime monitor that checks your services every minute, sends notifications to Telegram, and provides a status page for your visitors.
Things to Remember
- Use the
2image tag, notlatest. - On a VPS, publish the port to
127.0.0.1or route access through a reverse proxy with HTTPS. - Set up notifications from the start and verify them with the Test button.
- Backups are done by copying the
datafolder. - Ideally, Uptime Kuma runs on a different server from the services it monitors.
Next Steps
Once the basic monitors are running, try adding a Push monitor for your backup script, creating a status page for your clients, and enabling two-factor authentication. Also make sure the server running Uptime Kuma is secure by following How to Secure a New Linux VPS.
Resources and Useful Links
- Uptime Kuma repository on GitHub
- Official Uptime Kuma wiki
- Reverse proxy guide for Uptime Kuma
- Uptime Kuma environment variables
Have a question or your own experience with Uptime Kuma? Feel free to share it, and stay tuned to Teknotut!
I hope this article helps.



