How to Install Uptime Kuma on Ubuntu 24.04 VPS for Server Uptime Monitoring
How to Install Uptime Kuma on Ubuntu 24.04 VPS for Server Uptime Monitoring
Uptime Kuma is a free, open-source self-hosted monitoring tool that lets you track the availability of your websites, APIs, and services in real time. It features a clean, modern dashboard, multi-channel notification support, and a growing list of monitor types, all without sending your data to a third-party cloud service. If you want full control over your monitoring stack, Uptime Kuma is one of the best tools available today.
In this tutorial, you will install Uptime Kuma on an Ubuntu 24.04 VPS using Docker and Docker Compose, set up an Nginx reverse proxy with a free SSL certificate from Let's Encrypt, and configure your first monitors and alerts. By the end, you will have a production-ready uptime monitoring system running on your own server.
Prerequisites
Before you begin, make sure you have the following in place.
- A fresh Ubuntu 24.04 VPS with at least 1 vCPU and 1 GB of RAM. ByteHosting's Ryzen VPS plans are an excellent choice for lightweight self-hosted tools like this.
- A non-root user with
sudoprivileges. - A domain name pointed at your server's IP address via an A record (required for SSL).
- SSH access to your server.
- Basic familiarity with the Linux command line.
Step 1 - Update Your Ubuntu 24.04 VPS
Always start by updating your package lists and upgrading any outdated packages. This ensures you are working with the latest security patches and software versions.
sudo apt update && sudo apt upgrade -yOnce the upgrade completes, install a few utility packages that will be needed later in this guide.
sudo apt install -y curl gnupg ca-certificates lsb-release apt-transport-https software-properties-commonIf prompted to reboot after a kernel upgrade, go ahead and do so before continuing.
sudo rebootStep 2 - Install Docker and Docker Compose
Uptime Kuma works best when run inside a Docker container. Docker provides isolation, simple updates, and easy management. Follow the steps below to install the official Docker Engine on Ubuntu 24.04.
First, add Docker's official GPG key and repository to your system.
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullNow update your package lists and install Docker Engine along with the Compose plugin.
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginAdd your current user to the docker group so you can run Docker commands without sudo.
sudo usermod -aG docker $USER
newgrp dockerVerify that Docker is installed and running correctly.
docker --version
docker compose versionStep 3 - Deploy Uptime Kuma with Docker Compose
Create a dedicated directory for your Uptime Kuma deployment and navigate into it.
mkdir -p ~/uptime-kuma && cd ~/uptime-kumaCreate the Docker Compose file using your preferred text editor. The configuration below uses the official Uptime Kuma image and mounts a named volume so your data persists across container restarts and image updates.
nano docker-compose.ymlPaste the following content into the file.
services:
uptime-kuma:
image: louislam/uptime-kuma:1
container_name: uptime-kuma
restart: unless-stopped
ports:
- "127.0.0.1:3001:3001"
volumes:
- uptime-kuma:/app/data
volumes:
uptime-kuma:A few important notes about this configuration. Binding to 127.0.0.1:3001 instead of 0.0.0.0:3001 ensures Uptime Kuma is only accessible through the Nginx reverse proxy and not directly from the public internet. The restart: unless-stopped policy means Docker will automatically restart the container after a server reboot, acting as a lightweight systemd-style service manager.
Start the container in detached mode.
docker compose up -dCheck that the container is running.
docker compose psYou should see the uptime-kuma container listed with a status of Up.
Step 4 - Configure a Reverse Proxy with Nginx and SSL
Running Uptime Kuma behind an Nginx reverse proxy lets you serve it over HTTPS using a proper domain name. Install Nginx and Certbot now.
sudo apt install -y nginx certbot python3-certbot-nginxCreate a new Nginx server block configuration file for your domain. Replace yourdomain.com with your actual domain throughout this section.
sudo nano /etc/nginx/sites-available/uptime-kumaPaste the following Nginx configuration into the file.
server {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass http://localhost:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
}The Upgrade and Connection headers are required because Uptime Kuma uses WebSockets to push live status updates to your browser. Without these headers, the dashboard will not load properly.
Enable the configuration by creating a symbolic link and then test for syntax errors.
sudo ln -s /etc/nginx/sites-available/uptime-kuma /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginxNow use Certbot to obtain and install a free SSL certificate from Let's Encrypt. Certbot will automatically modify your Nginx configuration to serve HTTPS traffic.
sudo certbot --nginx -d yourdomain.comFollow the on-screen prompts. Certbot will ask for an email address and ask you to agree to the terms of service. Once complete, your site will be served over HTTPS and the certificate will auto-renew every 90 days via a systemd timer.
Reload Nginx one final time to apply all changes.
sudo systemctl reload nginxStep 5 - Set Up Your First Monitor
Open your browser and navigate to https://yourdomain.com. On your first visit, Uptime Kuma will ask you to create an admin account. Choose a strong username and password and click the create button.
Once logged in, you will land on the main dashboard. To add your first monitor, follow these steps.
- Click the Add New Monitor button in the top-left sidebar.
- Select the monitor type. For a website, choose HTTP(s). Other options include TCP port, ping, DNS, and more.
- Enter a friendly name for the monitor, such as My Website.
- Enter the URL you want to monitor, for example
https://example.com. - Set the heartbeat interval. The default of 60 seconds is fine for most use cases, but you can lower it to 30 seconds for more critical services.
- Click Save.
Uptime Kuma will immediately begin polling the URL and display a live status indicator on the dashboard. You can add as many monitors as you need, covering all your web applications, APIs, databases, and internal services.
Step 6 - Configure Notification Alerts
Uptime Kuma supports over 90 notification providers including email (SMTP), Telegram, Slack, Discord, PagerDuty, and webhook endpoints. Here is how to configure a notification channel and attach it to a monitor.
Click your profile avatar in the top-right corner and select Settings, then navigate to the Notifications tab. Click Setup Notification and choose your preferred provider from the dropdown list.
For email notifications via SMTP, fill in the following fields.
- Friendly Name - A label for this notification, such as Gmail Alerts.
- Hostname - Your SMTP server, for example
smtp.gmail.com. - Port - Typically
587for TLS or465for SSL. - Username - Your email address.
- Password - Your email password or app-specific password.
- From Email - The address alerts will be sent from.
- To Email - The address that receives the alerts.
For Telegram notifications, you will need a bot token from BotFather and your Telegram chat ID. For Slack, you will need an incoming webhook URL from your Slack workspace settings. Once you have saved a notification channel, you can click Test to verify it is working before attaching it to any monitor.
To attach a notification to a monitor, open the monitor's edit screen and scroll down to the Notifications section. Enable the checkbox next to any notification channel you want to use for that monitor and save your changes.
How Uptime Kuma Compares to Other Monitoring Tools
Before committing to any monitoring solution, it is worth understanding how Uptime Kuma stacks up against popular cloud-based alternatives. The table below summarises the key differences.
| Tool | Hosting | Cost | Monitor Limit (Free) | Check Interval (Free) | Data Ownership |
|---|---|---|---|---|---|
| Uptime Kuma | Self-hosted | Free (VPS cost only) | Unlimited | 20 seconds minimum | Full control |
| UptimeRobot | Cloud | Free tier / from $7/mo | 50 | 5 minutes | Third-party |
| StatusCake | Cloud | Free tier / from $20.83/mo | 10 | 5 minutes | Third-party |
| Better Uptime | Cloud | Free tier / from $20/mo | 10 | 3 minutes | Third-party |
Uptime Kuma gives you unlimited monitors with sub-minute check intervals, complete data privacy, and zero recurring SaaS fees. The only cost is your VPS, and with affordable VPS plans starting from just a few euros per month, the total cost of ownership is very low compared to premium cloud monitoring subscriptions.
Keeping Uptime Kuma Updated
Because you used Docker with a named volume, updating Uptime Kuma to the latest release is straightforward and non-destructive. Your monitoring data is stored in the uptime-kuma Docker volume and will not be affected by pulling a new image.
Navigate to your deployment directory and run the following commands.
cd ~/uptime-kuma
docker compose pull
docker compose up -d --force-recreateDocker will pull the latest louislam/uptime-kuma:1 image, stop the old container, and start a fresh one using the updated image while keeping your existing data volume intact. Check that the new container started successfully.
docker compose ps
docker compose logs --tail=50You can automate this process with a cron job or a tool like Watchtower, though for production environments it is generally safer to update manually so you can review changelogs first.
Conclusion
You now have a fully operational Uptime Kuma instance running on Ubuntu 24.04, protected by HTTPS, and ready to monitor all of your web services. With customisable monitors, rich alerting options, and a polished dashboard, Uptime Kuma offers everything you would normally pay for in a commercial monitoring SaaS, at a fraction of the cost.
To get started, you need a reliable VPS to host it on. ByteHosting's Ryzen VPS plans start from just €7.99 per month and are powered by high-frequency AMD Ryzen processors, making them a great fit for lightweight but always-on applications like Uptime Kuma. If you need more power, the Xeon VPS range has you covered as well. Browse all affordable VPS plans or check out our limited-time deals to find the best value for your monitoring setup.