How to Install Uptime Kuma on Ubuntu 22.04

In this tutorial you will learn how to self-host Uptime Kuma on your server. Uptime Kuma is like Uptime Robot, it is a uptime monitoring tool that you can use to check the uptime of your website(s).

There are many ways of installing Uptime Kuma on your server, for example : You can install it as docker package, install it manually or deploy it using a panel like easypanel.

In this tutorial we are going to do a manual installation of Uptime Kuma.

Step 1 - Update your system

Run the update command before installing other packages

sudo apt update

Step 2 - Install Nodejs Package

Once you update your system, you need to install nodejs package. Nodejs can be installed very easily, first you need to add nodejs repository to your system and then run the installation command

  1. Add Nodejs Repository
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -

2. Install Nodejs

sudo apt-get install -y nodejs

Step 3 - Git clone Kuma Project

In this step we are going to clone Kuma github project in our system. Simply type the command below and the project will be downloaded on your system.

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

If you don't have Git installed on your system, you can easily install it by using the command below

sudo apt install git

Step 4 - Install Kuma

Once you have downloaded Kuma project, you need to navigate to its folder and run the installation command

1.Go to uptime-kuma folder

cd uptime-kuma

2. Install it

npm run setup

Step 5 - Start Uptime Kuma using pm2

To start Uptime Kuma we are going to use pm2. If you don't have pm2 installed on your system, install it via this command

sudo npm install pm2 -g && pm2 install pm2-logrotate

Start uptime server

Once you install pm2 package, you need to start uptime server

pm2 start server/server.js --name uptime-kuma

The command above will start uptime server one time which means if you reboot your server you will need to start the uptime server again. To avoid this, you can set pm2 to start automatically once the server boots up.

pm2 startup

Next, to access uptime web interface you need to go to the public IP of your server using any browser you want.

The ip should look like this

http://x.x.x.x:3001

Make sure you put the port 3001 on the address as shown on the example above.

And you should be able to set up utime kuma for the first time

Once you fill username and password click "Create", this will log you into uptime kuma web interface, which looks like the image below

Conclusion

In this tutorial you learned how to Install Uptime Kuma and self host on your server.