Uptime Kuma is a self-hosted monitoring tool that supports HTTP, TCP, DNS, ping, and other checks with a clean web UI and notification integrations. This guide deploys it with Docker, an Nginx reverse proxy, and a Let’s Encrypt SSL certificate.
Prerequisites
Docker and Docker Compose installed — see Install Docker
A domain or subdomain pointed to your server (e.g., status.example.com)
Ports 80 and 443 open in your firewall
Step 1: Deploy Uptime Kuma
Create a directory and Docker Compose file:
mkdir -p /opt/uptime-kuma && cd /opt/uptime-kuma
cat > docker-compose.yml << 'EOF'
services:
uptime-kuma:
image: louislam/uptime-kuma:1
container_name: uptime-kuma
restart: unless-stopped
volumes:
- ./data:/app/data
ports:
- "127.0.0.1:3001:3001"
EOF
Start the container:
Uptime Kuma is now running on 127.0.0.1:3001. It is only accessible locally until we set up the reverse proxy.
Step 2: Install Nginx
Debian / Ubuntu
RHEL / AlmaLinux / Rocky
apt update && apt install -y nginx
systemctl enable nginx
dnf install -y nginx
systemctl enable nginx
systemctl start nginx
Replace status.example.com with your actual domain:
cat > /etc/nginx/sites-available/uptime-kuma << 'CONF'
server {
listen 80;
listen [::]:80;
server_name status.example.com;
location / {
proxy_pass http://127.0.0.1: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;
}
}
CONF
Enable the site and reload Nginx:
ln -sf /etc/nginx/sites-available/uptime-kuma /etc/nginx/sites-enabled/
rm -f /etc/nginx/sites-enabled/default
nginx -t && systemctl reload nginx
RHEL-Based Systems RHEL, AlmaLinux, and Rocky do not use sites-available/sites-enabled by default. Place the configuration in /etc/nginx/conf.d/uptime-kuma.conf instead and skip the symlink step.
Step 4: Install SSL with Certbot
Debian / Ubuntu
RHEL / AlmaLinux / Rocky
apt install -y certbot python3-certbot-nginx
dnf install -y epel-release
dnf install -y certbot python3-certbot-nginx
Obtain and install the certificate:
certbot --nginx -d status.example.com
Certbot will automatically configure HTTPS and set up a redirect from HTTP to HTTPS. Verify automatic renewal is active:
Step 5: Access Uptime Kuma
Open https://status.example.com in your browser. On first visit, you will be prompted to create an admin account.
Updating
To update Uptime Kuma to the latest version:
cd /opt/uptime-kuma
docker compose pull
docker compose up -d
Backup
Uptime Kuma stores all data in a SQLite database. To back up:
# Stop the container to ensure a clean backup
docker compose stop
cp -r /opt/uptime-kuma/data /backup/uptime-kuma- $( date +%Y%m%d )
docker compose start
All-in-One Script
For convenience, here is the complete setup as a single script. Edit the DOMAIN variable before running:
#!/bin/bash
set -euo pipefail
# --- Configuration ---
DOMAIN = "status.example.com"
# ---------------------
echo "=== Uptime Kuma Setup ==="
# Detect distribution
. /etc/os-release
DISTRO = " $ID "
# Verify Docker is installed
if ! command -v docker & > /dev/null ; then
echo "Docker is not installed. Run the Docker install script first."
exit 1
fi
# Deploy Uptime Kuma
echo "--- Deploying Uptime Kuma ---"
mkdir -p /opt/uptime-kuma && cd /opt/uptime-kuma
cat > docker-compose.yml << 'EOF'
services:
uptime-kuma:
image: louislam/uptime-kuma:1
container_name: uptime-kuma
restart: unless-stopped
volumes:
- ./data:/app/data
ports:
- "127.0.0.1:3001:3001"
EOF
docker compose up -d
# Install Nginx
echo "--- Installing Nginx ---"
case " $DISTRO " in
debian | ubuntu )
apt update -qq
apt install -y nginx certbot python3-certbot-nginx
;;
almalinux | rocky | centos | rhel | cloudlinux | fedora )
dnf install -y nginx epel-release
dnf install -y certbot python3-certbot-nginx
systemctl start nginx
;;
esac
systemctl enable nginx
# Configure Nginx
echo "--- Configuring Nginx ---"
case " $DISTRO " in
debian | ubuntu )
NGINX_CONF = "/etc/nginx/sites-available/uptime-kuma"
cat > " $NGINX_CONF " << CONF
server {
listen 80;
listen [::]:80;
server_name $DOMAIN ;
location / {
proxy_pass http://127.0.0.1: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;
}
}
CONF
ln -sf " $NGINX_CONF " /etc/nginx/sites-enabled/
rm -f /etc/nginx/sites-enabled/default
;;
almalinux | rocky | centos | rhel | cloudlinux | fedora )
cat > /etc/nginx/conf.d/uptime-kuma.conf << CONF
server {
listen 80;
listen [::]:80;
server_name $DOMAIN ;
location / {
proxy_pass http://127.0.0.1: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;
}
}
CONF
;;
esac
nginx -t && systemctl reload nginx
# SSL
echo "--- Obtaining SSL Certificate ---"
certbot --nginx -d " $DOMAIN " --non-interactive --agree-tos --register-unsafely-without-email --redirect
echo ""
echo "=== Setup Complete ==="
echo "Access Uptime Kuma at: https:// $DOMAIN "
echo "Create your admin account on first login."
See all 108 lines
The --register-unsafely-without-email flag skips the email prompt for unattended installation. For production use, replace it with --email your@email.com to receive certificate expiration notices.