How To Self-Host Uptime Kuma for Server and Website Monitoring on Ubuntu
Goal
In this tutorial, you will deploy Uptime Kuma with Docker Compose, complete its first-run admin setup, add a monitor, wire up a notification channel so you're alerted on status changes, optionally publish a public status page, and put the dashboard behind Nginx with TLS for long-term use.
Prerequisites
- Ubuntu 22.04 or 24.04 server with a non-root sudo user
- Docker Engine and the Docker Compose plugin already installed
- A domain name with DNS pointed at the server, plus Nginx and Certbot already set up (for the TLS step)
- Basic familiarity with the Linux command line and SSH
Let an AI agent do this for you
Copy a ready-made prompt for an AI coding assistant with terminal access to your server (Claude Code, Cursor, or similar) — it can carry out the steps below for you. Review what it plans to run before it executes anything.
Uptime Kuma is a self-hosted, open-source monitoring tool with its own web dashboard. It polls the targets you configure — HTTP(S) endpoints, raw TCP ports, DNS records, ping, and more — on a schedule you set, keeps a history of response times and status changes, and fires a notification through email, Slack, Discord, Telegram, or one of its many other supported channels the moment something goes down. Because you run it yourself, there's no per-monitor pricing and no third party holding your uptime data.
This tutorial deploys Uptime Kuma with Docker Compose, walks through first-run setup, adds a monitor and a notification channel, and finishes by putting the dashboard behind Nginx with TLS so it's safe to leave running long-term.
Step 1 — Install Uptime Kuma with Docker Compose
Create a directory for the project and its Compose file. Keeping each self-hosted service in its own directory under /opt makes it easy to find, back up, and tear down later.
sudo mkdir -p /opt/uptime-kuma
cd /opt/uptime-kumaCreate docker-compose.yml with the following contents:
services:
uptime-kuma:
image: louislam/uptime-kuma:1
volumes:
- uptime_kuma_data:/app/data
ports:
- "3001:3001"
restart: unless-stopped
volumes:
uptime_kuma_data:The image tag :1 pins to the 1.x release line, so `docker compose pull` later gives you patch and minor updates without an unannounced major-version jump. The named volume persists Uptime Kuma's internal SQLite database — monitors, history, users, notification settings — outside the container, so recreating the container never loses your data. The ports line publishes 3001 on every network interface on the host; that's needed for first-run setup, and you'll restrict it in Step 7 once Nginx is in front.
docker compose up -d
docker compose ps“Until you complete Step 7, port 3001 is reachable by anyone who can route to this server's public IP, not just you. Complete the account setup below and move on to the reverse proxy in Step 6 as soon as you can, to limit that window.”
Step 2 — Complete first-run setup
With the container running, visit http://<server-ip>:3001 in your browser, replacing <server-ip> with this server's public IP address. The first visit lands on an account creation screen. Choose a unique admin username and a strong, unique password — this is the only account gating your monitors and, later, any SMTP credentials or webhook URLs you add for notifications. Store it in a password manager; Uptime Kuma has no separate step you can skip and redo.
Tricknowtech VPS Hosting
Dedicated KVM resources and full root access — deployed in under 60 seconds, no ticket required.
Ready to try it yourself?
Create a free account and follow along.