How to Install Kuma on Ubuntu 22.04

Kuma is a platform-agnostic open-source control plane for service mesh and microservices management, with support for Kubernetes, VM, and bare-metal environments.

With it you will be able to monitor services through a comfortable and dedicated web interface. Being ‘Agnosctic’ you can install it on any operating system that supports NodeJS and take full advantage of it without any problem.

Some of the main features of Kuma are:

  • Monitoring uptime for HTTP(s) / TCP / HTTP(s) Keyword / Ping / DNS Record / Push / Steam Game Server.
  • Fancy, Reactive, Fast UI/UX.
  • Notifications via Telegram, Discord, Gotify, Slack, Pushover, Email (SMTP), and more.
  • Multi-Languages
  • Simple Status Page
  • Ping Chart

In addition to this, it has an alternative installation via Docker, so the installation becomes completely universal.

Install Kuma on Ubuntu

Before we start we have to meet some requirements on the server such as having it updated and installing a recent version of NodeJS.

Step 1: Install NodeJS on Ubuntu

The application is written in NodeJS so you have to install it as a requirement before the application. So, first, update the system to install the released security patches to improve the system behavior.

sudo apt update
sudo apt upgrade

After this, install NodeJS but not just any version but one of the recent ones. To do this, add the repository of the 17x. branch as follows

curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -
sudo apt install nodejs

This script will add the repository to the system and refresh APT automatically. So to install NodeJS you just need to run

sudo apt install nodejs

This way, you will have NodeJS installed on the system.

Step 2: Install Git on Ubuntu

To install Kuma, you need to clone its Github repository and for that, you need git. For Linux, we have several different methods, but in this case, the version included in the official repositories is enough.

So, install git using

sudo apt install git

With git and NodeJS installed, you can continue.

Step 3: Install Kuma on Ubuntu

With the help of git, you have to clone the Kuma repository. This ensures that we will have the latest stable version of the application as well as being a secure method of installation.

So, clone the repository and save it in a directory like /opt/.

sudo git clone https://github.com/louislam/uptime-kuma.git /opt/uptime-kuma

This will generate a folder with the necessary files. Access it.

cd /opt/uptime-kuma

And finally, perform the installation of the dependencies as follows

sudo npm run setup
Installing Kuma on Ubuntu
Installing Kuma on Ubuntu

Normally you would treat Kuma as a system service. In this case, let’s create one

sudo nano /etc/systemd/system/uptime-kuma.service

And add the following

[Unit]
Description=Uptime Kuma - uptime monitoring tool
After=network.target
 
[Service]
WorkingDirectory=/opt/uptime-kuma
ExecStart=/usr/bin/node server/server.js
Restart=always
 
[Install]
WantedBy=multi-user.target
Kuma service configuration
Kuma service configuration

Save the changes and close the text editor. And to apply the new service configuration run

sudo systemctl daemon-reload

Start the service and enable it to start with the system in the following way

sudo systemctl enable --now uptime-kuma

Sample Output

Created symlink /etc/systemd/system/multi-user.target.wants/uptime-kuma.service → /etc/systemd/system/uptime-kuma.service.

And finally, you can check the status of the service as follows

sudo systemctl status uptime-kuma

So, in the image, you can see that the service is working properly.

Check the results by access to the Kuma interface

Now you will be able to access Kuma through a web browser of our preference. So, open it and go to http://your-server:3001 to see the admin user creation screen.

In this screen, choose the language to display, and a username of the admin user along with its password.

Creating a new Kuma User
Creating a new Kuma User

When you are ready you can click on the Create button.

And you will see the main screen of Uptime Kuma.

Kuma Running on Ubuntu
Kuma Running on Ubuntu

Now it’s your turn to make the most of it,

Conclusion

Kuma is a vital tool for many sysadmin because it monitors many services and is fully compatible with Kubernetes so the utility becomes even greater. It can be installed on many different operating systems quickly and easily. The important thing is that it is another open-source alternative for the professional world helping to spread even more to our system.

So, share our posts through your networks and help us to grow. Thank you.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top