[How-To] Install Uptime Kuma on Ubuntu 24 LTS VM
Purpose
This doc will walk through steps to install Uptime Kuma on a Ubuntu 24 LTS VM.
Prerequisites
List of prerequisites:
- Sudo user
- Ubuntu 24 LTS VM
Full Installation Guide for Uptime Kuma on Ubuntu 24.04
Uptime Kuma is a self-hosted monitoring tool similar to Uptime Robot. It provides an easy-to-use web UI for monitoring services, websites, and endpoints.
Step 1: Prepare the Ubuntu VM
Ensure your Ubuntu VM is fully updated:
sudo apt update && sudo apt upgrade -y
Install necessary dependencies:
sudo apt install -y curl nano git unzip
Step 2: Install Node.js & NPM
Uptime Kuma requires Node.js (LTS version). Install Node.js 18+ using nvm
(Node Version Manager):
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
source ~/.bashrc
nvm install 18
Verify the installation:
node -v
npm -v
✅ You should see versions 18.x.x for Node.js and a matching npm version.
Step 3: Create a Dedicated User (Optional)
For security, it's recommended to run Uptime Kuma as a separate user:
sudo useradd -m -s /bin/bash uptimekuma
Switch to the user:
sudo su - uptimekuma
Step 4: Download and Install Uptime Kuma
Clone the Uptime Kuma repository:
git clone https://github.com/louislam/uptime-kuma.git
cd uptime-kuma
Install dependencies:
npm install
Build Uptime Kuma:
npm run setup
Step 5: Run Uptime Kuma Manually (First Test)
Run Uptime Kuma to check if it works:
node server/server.js
You should see output similar to:
Listening on http://127.0.0.1:3001
✅ Open a browser and go to:
http://your-server-ip:3001
If it works, press CTRL + C
to stop it and continue to the next step.
Step 6: Create a Systemd Service
To keep Uptime Kuma running in the background, create a systemd service:
sudo nano /etc/systemd/system/uptime-kuma.service
Paste the following:
[Unit]
Description=Uptime Kuma
After=network.target
[Service]
Type=simple
User=uptimekuma
WorkingDirectory=/home/uptimekuma/uptime-kuma
ExecStart=/usr/bin/node server/server.js
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Save and exit (CTRL+X
, then Y
, then Enter
).
Reload systemd and enable the service:
sudo systemctl daemon-reload sudo systemctl enable --now uptime-kuma
Check if it’s running:
sudo systemctl status uptime-kuma
✅ You should see "Active: running".
Step 7: Access Uptime Kuma
Open a browser and go to:
Follow the setup wizard to create an admin account.
Step 8: (Optional) Set Up Reverse Proxy with Nginx
If you want to access Uptime Kuma via a domain name (e.g., status.yourdomain.com
), set up Nginx as a reverse proxy.
1. Install Nginx
sudo apt install -y nginx
2. Configure Nginx for Uptime Kuma
Create a new Nginx config:
sudo nano /etc/nginx/sites-available/uptime-kuma
Add the following:
server {
listen 80;
server_name status.yourdomain.com;
location / {
proxy_pass http://127.0.0.1:3001;
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 and exit.
3. Enable the Configuration
sudo ln -s /etc/nginx/sites-available/uptime-kuma /etc/nginx/sites-enabled/
Test and restart Nginx:
sudo nginx -t sudo systemctl restart nginx
✅ Now, Uptime Kuma is accessible at http://status.yourdomain.com
.
Step 9: (Optional) Enable HTTPS with Let’s Encrypt
To secure Uptime Kuma with HTTPS, use Certbot:
sudo apt install -y certbot python3-certbot-nginx
Run:
sudo certbot --nginx -d status.yourdomain.com
Certbot will automatically apply an SSL certificate.
Now, access:
https://status.yourdomain.com
✅ Done! 🎉
Final Notes
- Data Location: All Uptime Kuma data is stored in
/home/uptimekuma/uptime-kuma/data/
- Backup: Regularly back up the
data/
folder. - Updating Uptime Kuma:
sudo su - uptimekuma cd uptime-kuma git pull npm install npm run setup sudo systemctl restart uptime-kuma