Install Uptime Kuma 2 with docker on Ubuntu 24.04

Install Uptime Kuma 2 with docker on Ubuntu 24.04

Uptime Kuma is an open-source, self-hosted monitoring platform designed to check the availability of websites, APIs, servers, and other network services. It can be used as an alternative to hosted monitoring platforms such as Pingdom or StatusCake, while keeping the monitoring system entirely under your control. Uptime Kuma provides a simple web interface for creating monitors, reviewing uptime history, configuring alerts, and publishing public status pages. It is actively maintained, lightweight, and works particularly well when deployed with Docker.


This guide explains how to run Uptime Kuma in Docker, create different types of monitors, configure notifications, and publish a status page for your services.


Why Self-Host Your Monitoring

Many commercial monitoring platforms base their pricing on the number of monitored services or the frequency of checks. With a self-hosted Uptime Kuma installation, you can monitor multiple services and choose your own check intervals without additional per-monitor costs.

Another advantage is that monitoring data remains on your own infrastructure, giving you greater control over configuration, history, retention, and alerting. The main consideration is that you are responsible for maintaining the monitoring server itself, although using Docker makes deployment and ongoing management relatively simple.


Install Docker

Update the package index and install Docker:

apt update && apt install -y docker.io

Enable Docker and start it immediately:

systemctl enable --now docker

Install Uptime Kuma 2

Run Uptime Kuma 2 as a Docker container and store its persistent data in a Docker volume:

root@lab-pc:~# docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:2
Unable to find image 'louislam/uptime-kuma:2' locally
2: Pulling from louislam/uptime-kuma
3da948dc29b9: Pull complete
07683a18a1c6: Pull complete
4ef4f0c79ca2: Pull complete
c6700029e14a: Pull complete
068fedd6b0f1: Pull complete
5d96d7777a32: Pull complete
575d46df4705: Pull complete
5d2860e0a811: Pull complete
250c5b24ba65: Pull complete
d7466d782dc4: Pull complete
3d75e56d73fd: Pull complete
7e0b8e884178: Pull complete
fd31133e23d8: Pull complete
79b3835561d3: Pull complete
864b7b0f219e: Pull complete
44136fa355b3: Download complete
fb64dc15f466: Download complete
Digest: sha256:3e24e96c89efff0e3a4b0698cbdd36c15ad3022371db57166e5588853002ee5c
Status: Downloaded newer image for louislam/uptime-kuma:2
b098be81a649265d19954d5b6f8711e9fcf54873cb6ac88f8d7118a37dd9110c

The --restart=always option automatically starts Uptime Kuma again after a server reboot or container failure. The uptime-kuma Docker volume keeps the application data persistent.

Check Uptime Kuma Container

Verify that the container is running and healthy:

root@lab-pc:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b098be81a649 louislam/uptime-kuma:2 "/usr/bin/dumb-init …" 8 seconds ago Up 5 seconds (healthy) 0.0.0.0:3001->3001/tcp uptime-kuma

Open Uptime Kuma

Open a web browser and connect to port 3001 of the Ubuntu server:

http://<your-server-ip-here>:3001

On the first visit, Uptime Kuma will ask you to create the administrator account.




Check Uptime Kuma Logs

Follow the container logs in real time:

docker logs -f uptime-kuma

Press Ctrl+C to exit the log view without stopping the container.

Restart Uptime Kuma

Restart the Uptime Kuma container:

docker restart uptime-kuma

Stop and Start Uptime Kuma

Stop the container:

docker stop uptime-kuma

Start it again:

docker start uptime-kuma

Remove the Uptime Kuma Container

Stop and remove the container:

docker stop uptime-kuma && docker rm uptime-kuma

This does not remove the persistent Uptime Kuma data stored in the Docker volume.

Remove Uptime Kuma Data

To permanently remove the persistent Uptime Kuma data, first remove the container and then delete the Docker volume:

docker stop uptime-kuma && docker rm uptime-kuma
docker volume rm uptime-kuma

Warning: Removing the Docker volume permanently deletes the Uptime Kuma configuration, monitors, history and other stored application data.

Useful Docker Commands

docker ps
docker logs -f uptime-kuma
docker restart uptime-kuma
docker stop uptime-kuma
docker start uptime-kuma
docker stop uptime-kuma && docker rm uptime-kuma
docker volume rm uptime-kuma