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:
Advertisements
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:
cd uptime-kuma
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.
Advertisements
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.
Error on Ubunut 20.04
HEAD is now at 03aa685d Update to 1.21.2
npm ERR! Cannot read property ‘@grpc/grpc-js’ of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-04-10T12_06_44_507Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected].2 setup: `git checkout 1.21.2 && npm ci –production && npm run download-dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected].2 setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-04-12T12_06_44_541Z-debug.log
Remove Existing Node.js and npm Installations:
sudo apt remove nodejs
sudo apt remove npm
Install Node.js and npm:
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install -y nodejs
Update npm:
npm install -g npm
this will fix your issue.