GuidesBusiness and monitoringSite checks with Uptime Kuma

Watch your sites with Uptime Kuma and rootless Docker

Uptime Kuma 2 on Debian 13 in its rootless image, in rootless Docker under a user of its own behind Caddy, checking your sites and servers every minute and sending an alert to Matrix when one goes down.

Tested on Docker steps follow the tested rootless Docker base guide on Debian 13 with Docker Engine 29.10.1, Compose 5.8.1 and rootlesskit 3.3.0; the app version and app-specific behaviour are from the tested Podman guide on a Melonslab server. Not re-tested end to end under Docker. Updated November 28, 2026

Recommended server for this guide

SSD RAID 1 · ECC DDR4 · 10 Gbit

VC-P Alloy · 2 vCPU · 8 GB Memory · 60 GB Storage

Month to month, no lock-in 7-day money-back guarantee

€8.99/mo

Deploy now

Quick install on a fresh VM

This command sets up a rootless container engine and a directory for this service. Podman is the default; add --engine docker to the command to use Docker instead.

curl -fsSL https://www.melonslab.com/install/rootless.sh | bash -s -- --app uptime-kuma-docker --manifest uptime-kuma --sha256 6274dc757defaa709b172014e927cf173745c81fd38d849fec2d0cbb5ae08a06
View the script

SHA-256: 97785be3e3e91393181a4a7caeab5f4b52803bf52e960dd488945cb38c6473a2

Run this guide on Melonslab

We ran every step below on our own server. For this workload we recommend VC-P Alloy at €8.99/mo. Order it, pick Debian 13, and follow the guide.

  1. 1. Order the server. Use the button below to order the recommended plan. Choose Debian 13 when the installer asks for an operating system.
  2. 2. Add IPv4 if needed. Add it on the order form when the guide publishes a service on the internet. It is a paid add-on, not included in the plan.
  3. 3. Connect over SSH. Log in as root with the address and credentials from your order, then run the commands below.
  4. 4. Follow the verified steps. Every command in this guide was run on a Melonslab server before it was published.
Deploy now
On this page

What you will set up

Uptime Kuma checks your websites and servers every minute, shows how long each has been up, warns before a certificate expires, and sends an alert when something goes down, to Matrix, email, Telegram, ntfy and many more.

Here it runs from its official rootless image in a Compose project under a user of its own called kuma, behind Caddy from the rootless Docker guide. Its alerts go to a room on the Matrix server from the Matrix guide. The Docker setup follows that tested base; the app results below come from the tested Podman guide on a Melonslab server and were not re-measured under Docker.

The app-specific results below were recorded in the Podman test on a Melonslab server with Debian 13:

  • Uptime Kuma 2.5.5 checked a site elsewhere, an app on the same server and a ping to Quad9, and showed all three as up, with the site's certificate expiry.
  • When a web app on the server was stopped, Kuma posted a Down alert in a Matrix room, and an Up alert when it came back.
  • Kuma logged each login with the visitor's real address, and everything came back by itself after a reboot.

Uptime Kuma used about 130 MB of memory.

A monitor on the same server as the sites it watches cannot tell you that the server itself is down. For that, run Uptime Kuma on another server, and point it at this one.

Before you start

You need:

  • a server set up as in the rootless Docker guide, with Caddy running;
  • an A record and an AAAA record for status.example.com pointing at your server;
  • for alerts in Matrix, a Matrix server as in the Matrix guide, and your own account on it.

The examples use status.example.com for Uptime Kuma, matrix.example.com for the Matrix server and @anna:example.com for your own Matrix account. Replace them throughout.

1. Create the user

As root:

useradd -m -s /bin/bash -U kuma
loginctl enable-linger kuma

Do not add the user to the docker group. The daemon is rootless and belongs to this user.

Everything up to step 4 runs as kuma.

2. Let Kuma reach this server

A check of an app on this server, such as https://matrix.example.com, must reach Caddy rather than Kuma itself. Add a host mapping to the Compose service so the container can call the server by name:

    extra_hosts:
      - "host.docker.internal:host-gateway"

host-gateway is an address that leads to the server outside the container. Use http://host.docker.internal for checks of apps on this server; the apps behind Caddy use their HTTPS names as usual. Checks to the internet are unaffected. This setting was not re-tested under Docker.

3. Describe the Compose service

As kuma, create the app directory and Compose file:

mkdir -p /home/kuma/uptime-kuma/data
cat > /home/kuma/uptime-kuma/compose.yaml <<'YAML'
services:
  uptime-kuma:
    image: docker.io/louislam/uptime-kuma:2-rootless
    ports:
      # Only Caddy, on this server, can reach Uptime Kuma: the port is not open to the internet.
      - "127.0.0.1:8095:3001"
    volumes:
      - ./data:/app/data
    # ping needs raw sockets
    cap_add:
      - NET_RAW
    extra_hosts:
      - "host.docker.internal:host-gateway"
    restart: always
YAML
chown -R kuma:kuma /home/kuma/uptime-kuma

The 2-rootless image runs Uptime Kuma as an ordinary user inside the container too, and the tag follows every release of Uptime Kuma 2. NET_RAW lets its ping checks send ICMP. ./data holds the SQLite database with your monitors and settings.

Start it:

uid=$(id -u kuma)
runuser -u kuma -- env HOME=/home/kuma XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/kuma/uptime-kuma && docker compose pull && docker compose up -d"

Add the weekly docker-update.service and docker-update.timer from the rootless Docker guide, with WorkingDirectory=/home/kuma/uptime-kuma, then enable the timer as kuma. The service pulls a new image and recreates the service.

4. Put Caddy in front

As root, add this block to the end of /home/caddy/Caddyfile:

status.example.com {
    reverse_proxy 127.0.0.1:8095
}

Restart Caddy:

uid=$(id -u caddy)
runuser -u caddy -- env HOME=/home/caddy XDG_RUNTIME_DIR=/run/user/$uid \
  DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus PATH=/usr/bin:/bin \
  bash -lc "export DOCKER_HOST=unix:///run/user/$uid/docker.sock; cd /home/caddy/caddy && docker compose restart caddy"

5. Set it up

Open https://status.example.com. Uptime Kuma first asks which database to use: choose SQLite, a single file in ./data, which suits a few dozen monitors, and Next. Then create your account, with a Username, a Password and Repeat Password, and choose Create.

Next, let Kuma see visitors' real addresses behind Caddy: open the profile menu at the top right, then Settings, Reverse Proxy, set Trust Proxy to Yes, and Save. Under Security in the same settings, you can also turn on two-factor authentication for your account.

6. Add monitors

Choose Add New Monitor. The ones you will use most:

  • HTTP(s), for a website or web app: a Friendly Name and the URL. Kuma also shows when the site's certificate expires. To be warned 21, 14 and 7 days before, tick Certificate Expiry Notification under Advanced, which is off for new monitors. Settings, Notifications changes the days.
  • Ping, for a server: its Hostname or address.
  • TCP Port, for a service such as mail or SSH: a hostname and a port.

Choose Save. Kuma checks each monitor every 60 seconds, which Heartbeat Interval changes.

7. Get alerts in Matrix

Kuma posts its alerts with a Matrix account of its own. As root, run this as the matrix user with that user's DOCKER_HOST; check the container name in docker ps if it is not matrix-synapse. Answer no to the admin question:

uid=$(id -u matrix)
runuser -u matrix -- env HOME=/home/matrix XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  docker exec -it matrix-synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008
docker compose exec -it matrix-synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008

Name it kumabot. Then, from any computer, log in as it to get its access token, with the password you just set in place of BOT_PASSWORD:

curl -s -X POST https://matrix.example.com/_matrix/client/v3/login \
  -H 'Content-Type: application/json' \
  -d '{"type": "m.login.password", "identifier": {"type": "m.id.user", "user": "kumabot"}, "password": "BOT_PASSWORD", "initial_device_display_name": "Uptime Kuma"}'

Copy the value of access_token, and use it in place of ACCESS_TOKEN to create a room for the alerts, with yourself invited:

curl -s -X POST https://matrix.example.com/_matrix/client/v3/createRoom \
  -H 'Authorization: Bearer ACCESS_TOKEN' -H 'Content-Type: application/json' \
  -d '{"name": "Alerts", "invite": ["@anna:example.com"], "preset": "private_chat"}'

The answer has the room's room_id, which starts with !. Accept the invitation in Element. Then, in Uptime Kuma, open Settings, Notifications, and choose Set Up Notification:

  • Set Notification Type to Matrix, and give it a Friendly Name.
  • Enter https://matrix.example.com as Homeserver URL, the room_id as Internal Room ID, and the token as Access Token.
  • Turn on Default enabled, so that new monitors use it, and Apply on all existing monitors.
  • Choose Test. A test message arrives in the room. Then choose Save.

From now on, Kuma posts a message such as [Zabbix] [🔴 Down] Request failed with status code 502 when a monitor goes down, and another when it is up again. The account can only post in the rooms it is in, and the room is not encrypted, so keep the alerts free of secrets. For email or another service, choose it as the Notification Type instead.

8. Back up

As root, stop the service for a few seconds so the copy is consistent:

uid=$(id -u kuma)
runuser -u kuma -- env HOME=/home/kuma XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/kuma/uptime-kuma && docker compose stop"
umask 077
mkdir -p /home/kuma/backup
tar czf /home/kuma/backup/uptime-kuma.tgz -C /home/kuma/uptime-kuma data
uid=$(id -u kuma)
runuser -u kuma -- env HOME=/home/kuma XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/kuma/uptime-kuma && docker compose up -d"

That saves the monitors, their history, your account and the notification settings, with the Matrix token. Copy /home/kuma/backup to another machine, and keep it private.

Troubleshooting

A Ping monitor is down with spawn EPERM. The cap_add: NET_RAW line from step 3 is missing from /home/kuma/uptime-kuma/compose.yaml.

A monitor for an app on this server is down, while the app works in your browser. The extra_hosts line from step 2 is missing, or the monitor still points at the public name. Use http://host.docker.internal for apps on this server, and restart the service:

uid=$(id -u kuma)
runuser -u kuma -- env HOME=/home/kuma XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/kuma/uptime-kuma && docker compose restart"

No alerts arrive. The notification is not on for that monitor. Edit the monitor, and tick the notification under Notifications, or edit the notification, and turn on Apply on all existing monitors.

Run it on your own server

SSD RAID 1 · ECC DDR4 · 10 Gbit

VC-P Alloy

€8.99/mo

vCPU
2
Memory
8 GB
Storage
60 GB
Transfer
10 TB
Performance
SSD · RAID 1
  • Full root access
  • Native /64 IPv6
  • RAID-protected storage
  • Malmö, Sweden
  • Month to month, no lock-in
  • 7-day money-back guarantee
All guides