8.2.19 Deploying Uptime Kuma

The Host Banner Uptime Kuma

Uptime Kuma is a lightweight self-hosted monitoring system (HTTP/HTTPS, TCP, ICMP, DNS, PUSH) that displays service uptime in real time and sends notifications in case of failures. This guide will help you quickly deploy it on Ubuntu 22.04/24.04 using Docker Compose — without manual dependency installation.

Benefits

  • 24×7 monitoring of website / API / server availability
  • Instant alerts via Telegram, Discord, Slack, Email, Pushover
  • Unified dashboard with latency charts and incident logs

Server Preparation

Requirements

Variables to Replace

  • DATA — path to store data (e.g. /opt/uptime-kuma)
  • HTTP_PORT — external port (default is 3001)
  • YOUR_DOMAIN — domain name, if using a reverse proxy
  • SERVER_IP — your server’s IP address

Create Working Directory and Network

sudo mkdir -p /home/uptimeKuma/data
sudo chown -R $USER:$USER /home/uptimeKuma/data

If needed, create a dedicated Docker network for monitoring services:

docker network create monitor-net

docker_network_create

Security

Only open the port that will be used for the web interface.

UFW:

sudo ufw allow HTTP_PORT/tcp   # HTTP UI
sudo ufw reload

iptables:

sudo iptables -A INPUT -p tcp --dport HTTP_PORT -j ACCEPT
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -P INPUT DROP

Installation

Create the docker-compose.yml file:

version: "3.9"

services:
  uptime-kuma:
    image: louislam/uptime-kuma
    container_name: uptime-kuma
    restart: unless-stopped
    volumes:
      - ./data:/app/data
    networks:
      - monitor-net
    ports:
      - "HTTP_PORT:3001"

networks:
  monitor-net:
    external: true

Explanation of parameters:

  • louislam/uptime-kuma:2 — locks version to v2 to avoid breaking changes from updates
  • volumes — stores database, configs, and backups outside the container
  • restart: unless-stopped — ensures container auto-starts after server reboot

Now launch the stack. Compose will download the image (~200 MB) and start the container:

cd /home/uptimeKuma/data
docker compose up -d

Automatic Updates with Watchtower

Watchtower checks for image updates every 6 hours and restarts containers when new versions are available:

docker run -d --name watchtower \
  --restart unless-stopped \
  -v /var/run/docker.sock:/var/run/docker.sock \
  containrrr/watchtower \
  --cleanup --interval 21600

Verification

  1. Open your browser:
http://SERVER_IP:HTTP_PORT
  1. Create an admin account and log in to the dashboard.

  1. Add a test monitor (e.g., https://google.com) and verify the status is UP.

Test Kuma

  1. Check container logs:
docker compose logs -f uptime-kuma

Common Issues
Problem Symptoms Solution
Port already in use bind: address already in use in logs Change HTTP_PORT or stop another service using the same port.
Permission denied when writing data Container exits with code 13 Check ownership of the DATA directory and run chown $USER:$USER.
UI inaccessible via domain 502/404 error from reverse proxy Ensure Nginx is configured with upstream http://127.0.0.1:HTTP_PORT and reload nginx.
Container crashes after a few days OOM Killed in docker inspect Increase RAM or set mem_limit / memswap_limit in Compose.