How To Install Uptime Kuma on Debian 12
In this tutorial, we will show you how to install Uptime Kuma on Debian 12. In the realm of system administration, monitoring tools are indispensable. They provide crucial insights into the performance and health of your services, enabling you to detect and resolve issues promptly. One such tool is Uptime Kuma, an open-source, self-hosted monitoring software that supports a variety of protocols including HTTP, HTTPS, and DNS.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of the Uptime Kuma monitoring tool on a Debian 12 (Bookworm).
Prerequisites
- A server running one of the following operating systems: Debian 12 (Bookworm).
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for Uptime Kuma.
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install Uptime Kuma on Debian 12 Bookworm
Step 1. Start by updating your system packages to the latest versions. Open your terminal and run the following command:
sudo apt update sudo apt upgrade
These commands will fetch the latest package lists from the repositories and upgrade your system to the latest package versions.
Step 2. Installing Necessary Software.
Next, we need to install Apache, NodeJS, and Git. Apache is a popular web server software, NodeJS is a runtime environment for executing JavaScript code server-side, and Git is a version control system that we’ll use to clone the Uptime Kuma repository from GitHub.
To install these software, run the following commands:
sudo apt-get install apache2 sudo apt-get install nodejs sudo apt-get install git
Step 3. Installing Uptime Kuma on Debian 12.
First, navigate to the /opt directory and clone the Uptime Kuma repository from GitHub using the following commands:
cd /opt git clone https://github.com/louislam/uptime-kuma.git
After the repository has been cloned, navigate into the ‘uptime-kuma’ directory and run the setup using the following commands:
cd uptime-kuma npm install npm run start
Step 4. Accessing Uptime Kuma Web UI.
You can access Uptime Kuma through a web browser by navigating to your server’s IP address followed by the port number 3001 (e.g., http://your-server-ip:3001
). This will take you to the Uptime Kuma dashboard.
Uptime Kuma boasts a variety of features designed to make your monitoring tasks easier. You can monitor services over various protocols, receive notifications when a service goes down, and even generate status pages to share with your team or clients. Take some time to explore these features and configure them as per your requirements.
Step 5. Creating a Service File.
For long-term use, it’s recommended to set up Uptime Kuma as a service. This allows Uptime Kuma to start automatically when the system boots, ensuring continuous monitoring of your services.
To set up Uptime Kuma as a service, we need to create a service file for it. Open a new service file in the /etc/systemd/system
directory using the following command:
sudo nano /etc/systemd/system/uptime-kuma.service
In the opened file, add the following content:
[Unit] Description=Uptime Kuma After=network.target [Service] ExecStart=/usr/bin/npm run start WorkingDirectory=/opt/uptime-kuma User=root Restart=always [Install] WantedBy=multi-user.target
Now, reload the systemd
manager configuration and enable the Uptime Kuma service using the following commands:
sudo systemctl daemon-reload sudo systemctl enable uptime-kuma
You can now start the Uptime Kuma service with the command:
sudo systemctl start uptime-kuma
Congratulations! You have successfully installed Uptime Kuma. Thanks for using this tutorial to install the latest version of the Uptime Kuma monitoring tool on Debian 12 Bookworm. For additional help or useful information, we recommend you check the official Uptime Kuma website.