How to Deploy a Self-Hosted Uptime Kuma Monitoring Dashboard on a Linux VPS

Learn how to build a robust, self-hosted Uptime Kuma monitoring dashboard on your Linux VPS. Complete guide with Docker Compose, Nginx reverse proxy, and optimization tips.

How to Deploy a Self-Hosted Uptime Kuma Monitoring Dashboard on a Linux VPS

Whether you manage personal websites or enterprise web applications, knowing when your services go down is critical. Outages cost money, damage reputation, and frustrate users. While there are countless managed monitoring solutions like UptimeRobot or Pingdom, they often hide the best features behind expensive paywalls.

Enter Uptime Kuma—a self-hosted, open-source monitoring tool that features a gorgeous, intuitive UI, extensive notification integrations (Discord, Telegram, Slack, Email), and robust monitoring capabilities (HTTP(s), TCP, Ping, DNS, Push, and more).

In this expert guide, we will walk you through deploying a self-hosted Uptime Kuma monitoring dashboard on a Linux VPS using Docker Compose, complete with an Nginx reverse proxy and SSL encryption for secure access.

Why Host Your Own Uptime Kuma?

  1. Complete Data Privacy: Your uptime history and service endpoints remain entirely on your own server.
  2. Unlimited Monitors: Don’t get restricted by free tier limits. Monitor as many services as your server can handle.
  3. Advanced Features for Free: Get features like 20-second check intervals and custom status pages without paying premium subscriptions.

While a standard VPS is perfect for most Uptime Kuma deployments, if you are an enterprise agency or a web host monitoring hundreds of mission-critical customer endpoints with aggressive ping intervals, you might need bare-metal performance. In such high-scale scenarios, deploying on Dedicated Servers provides the unshared CPU resources and network reliability required. For localized, low-latency monitoring within the region, relying on Dedicated Servers in Pakistan ensures the highest accuracy and the fastest incident response times for domestic infrastructure.

Prerequisites

Before we start, you will need:

  • A Linux VPS (Ubuntu 22.04 or 24.04 recommended).
  • A domain or subdomain pointed to your VPS’s IP address (e.g., status.yourdomain.com).
  • Docker and Docker Compose installed on your server.
  • Basic familiarity with the Linux command line.

Step 1: Set Up the Docker Environment

First, connect to your VPS via SSH. We will create a dedicated directory for Uptime Kuma to keep our configuration organized.

mkdir -p /opt/uptime-kuma
cd /opt/uptime-kuma

Next, create the docker-compose.yml file. It’s best practice to bind the container’s port specifically to the localhost (127.0.0.1) so that Uptime Kuma is not directly accessible over the internet without going through your Nginx reverse proxy.

nano docker-compose.yml

Paste the following configuration:

version: '3.8'
services:
  uptime-kuma:
    image: louislam/uptime-kuma:latest
    container_name: uptime-kuma
    restart: unless-stopped
    ports:
      - "127.0.0.1:3001:3001"
    volumes:
      - ./uptime-kuma-data:/app/data

Save and exit (CTRL+O, Enter, CTRL+X).

Now, start the container in detached mode:

docker compose up -d

Uptime Kuma is now running locally on port 3001.

Step 2: Configure Nginx as a Reverse Proxy

We need to serve Uptime Kuma over standard HTTP/HTTPS ports (80/443) and map it to your subdomain. Uptime Kuma relies heavily on WebSockets for its real-time frontend dashboard. Thus, your Nginx config must pass WebSocket headers correctly.

Install Nginx if you haven’t already:

sudo apt update
sudo apt install nginx -y

Create a new Nginx server block for Uptime Kuma:

sudo nano /etc/nginx/sites-available/uptime-kuma

Paste the following, ensuring you replace status.yourdomain.com with your actual domain:

server {
    listen 80;
    server_name status.yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:3001;
        proxy_http_version 1.1;
        
        # Required for WebSockets
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        
        # Standard Proxy Headers
        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;
    }
}

Save the file and enable the configuration by creating a symlink:

sudo ln -s /etc/nginx/sites-available/uptime-kuma /etc/nginx/sites-enabled/

Test your Nginx configuration for syntax errors:

sudo nginx -t

If it reports syntax is ok, restart Nginx:

sudo systemctl restart nginx

Note: Uptime Kuma must be hosted at the root of a domain or subdomain. Hosting it in a subdirectory (e.g., example.com/kuma) is not supported.

Step 3: Secure with SSL (Certbot)

Never send your login credentials over plain HTTP. We will use Certbot to provision a free Let’s Encrypt SSL certificate.

Install Certbot and its Nginx plugin:

sudo apt install certbot python3-certbot-nginx -y

Request the certificate:

sudo certbot --nginx -d status.yourdomain.com

Certbot will automatically modify your Nginx configuration to force HTTPS traffic and handle certificate renewals.

Step 4: Initial Setup & Optimization

Navigate to https://status.yourdomain.com in your web browser. You will be greeted by the initial setup screen asking you to create an admin account.

Important Settings to Configure:

  1. Trust Proxy: Once logged in, go to Settings → Reverse Proxy. Under HTTP Headers, set Trust Proxy to Yes. Because Uptime Kuma is sitting behind Nginx, enabling this setting ensures your logs record the actual client IP addresses instead of the local Nginx proxy IP (127.0.0.1).
  2. Notification Providers: Head over to the Settings → Notifications tab. Set up your preferred alerting method. Uptime Kuma supports over 90 services. A simple Discord Webhook or Telegram Bot is incredibly effective for instant push notifications to your mobile device.
  3. Status Pages: Click on the Status Pages section at the top of the dashboard. You can create public-facing status pages and map them to custom domains (e.g., uptime.yourcompany.com) to keep your users informed during incidents.

Conclusion

By deploying Uptime Kuma on your Linux VPS, you now possess a powerful, localized, and private incident management hub. You’ll be the first to know when a service falters, giving you the critical head start needed to troubleshoot and resolve issues before your end-users notice.

Keep your Docker images updated by periodically running docker compose pull followed by docker compose up -d to ensure you benefit from the active community’s newest features and security patches.