In this post, I will show you how to install Uptime Kuma on a Linux server.
Table of Contents:
- Required Tools
- Step 1: Clone Uptime Kuma Repository
- Step 2: Uptime Kuma Directory
- Step 3: Run Uptime Kuma Setup
- Step 4: Start Uptime Kuma
- Step 5: Access Uptime Kuma Dashboard
Make sure you have the following tools installed on your Linux server:
Node.js: Uptime Kuma is built on Node.js, so you’ll need to have it installed on your server. If you don’t have Node.js installed, you can follow these commands to install it:
sudo apt update sudo apt install nodejs -y sudo apt install npm -y
Git: Uptime Kuma is hosted on GitHub, so you’ll need Git:
sudo apt install git -y
PM2: PM2 is a process manager for Node.js applications that allows you to run them in the background:
sudo npm install pm2 -g
Step 1: Clone Uptime Kuma Repository
git clone https://github.com/louislam/uptime-kuma.git
This will create a local copy of the Uptime Kuma code on your server.
Step 2: Uptime Kuma Directory
Change your current directory to the Uptime Kuma directory:
Step 3: Run Uptime Kuma Setup
Uptime Kuma provides script that automates the installation process:
npm run setup
This will install Uptime Kuma with the necessary dependencies.
Step 4: Start Uptime Kuma
pm2 install pm2-logrotate
pm2 start server/server.js --name uptime-kuma
This will start Uptime Kuma as a background process, and it will automatically restart in case of any crashes or failures.
Step 5: Access Uptime Kuma Dashboard
The default port for Uptime Kuma is 3001, so you can access the dashboard by navigating to http://your_server_ip:3001 or http://your_domain_name:3001 in your web browser.
You will be prompted to create an admin account. Once you have completed the setup, you can start adding websites and servers to monitor their uptime.
That’s it! You have successfully installed Uptime Kuma on your Linux server. You can now use it to monitor the uptime of websites and servers.