Install Uptime Kuma on Linux

Linux is the preferred choice of OS when it comes for servers. It is stable, has plenty of support and does not use much resources. In this Uptime Kuma installation guide, we will be using Ubuntu as our base Linux distribution.

Follow the steps below in order to Install Uptime Kuma on Ubuntu or any other Debian-based Linux distribution.

Requirements

Downloading Uptime Kuma for Linux

Once you have made sure that the above software mentioned under “Requirements” are met, please go to Uptimekuma.org and click on the “Download” button at the center of the page or at the top-right of the page. Alternatively, you can also visit that page from here.

Uptime Kuma Linux Installation
Uptime Kuma Linux Installation 2

Install Uptime Kuma on Ubuntu with Node.js and Nginx

One of the first steps is to install Node.js on Ubuntu but before you do so make sure your server is updated. Please run the x2 commands below before following the tutorial.

Once your OS is updated, you can run the below command to install Node.js:

Once Node.js is installed, you will need to clone the Git Repo of Uptime Kuma, however before doing that make sure you have Git installed with the below command:

To clone the Uptime Kuma GitHub repository locally, please run the below command in your terminal which will clone the latest release:

Make a note of the directory where you cloned the repository e.g. /home and navigate to it.

Once you are in the relevant directory you need to run the setup script along with the PM2 process manager which will keep Uptime Kuma running:

We also recommend setting up log rotation with the below command as logs will help you troubleshoot if any issues arise:

Once you have the above setup, it is now time to start Uptime Kuma with a simple command below and to ensure that if you ever reboot your server, Uptime Kuma starts back automatically:

To make sure Uptime Kuma can be accessed via the browser and a domain name, Nginx or Apache needs to be setup as a reverse proxy, in this case we will be using Nginx:

Once Nginx has been installed, make sure it is installed and running the latest version with the below commands:

Now you have to create a Nginx configuration file, also known as a “conf” file with the below contents that you can copy and paste, you can either use Vim or Nano editor:

Configuration file contents with improved security added along with performance enhancements, replace “uptime-kuma.yourdomainname.com” with your own domain name if you have one:

Once you have saved the above configuration file, just restart Nginx and you will now have Uptime Kuma running on your Linux server:

You should be able to access the Uptime Kuma dashboard now at your domain name, our example used in this guide was “uptime-kuma.yourdomainname.com”.

As always, you can refer to our detailed troubleshooting section for any questions or queries you may have.