Uptime Kuma is an open source self-hosted monitoring tool that helps you track your website uptime, API responsiveness, server response time, etc. In this tutorial, we'll show you how to install Uptime Kuma on NixOS 21.05.
Before we begin, make sure you have the following:
Uptime Kuma requires Node.js (v12 or greater) and SQLite. To install these dependencies on NixOS, add the following lines to /etc/nixos/configuration.nix
:
environment.systemPackages = with pkgs; [
nodejs
sqlite
sqlite3
];
Save the file and run nixos-rebuild switch
to apply the changes.
Next, clone the Uptime Kuma repository to your server:
git clone https://github.com/louislam/uptime-kuma.git
This will create a directory called uptime-kuma
in your current directory.
Navigate to the uptime-kuma
directory and create a new file called .env
:
cd uptime-kuma
touch .env
Open the .env
file in your favorite text editor and add the following configuration:
DB_TYPE=sqlite
DB_HOST=127.0.0.1
DB_PORT=27017
DB_NAME=uptime
Save and close the file.
Run the following command to install the required Node.js modules:
npm install
Finally, start Uptime Kuma with the following command:
npm start
This will start the Uptime Kuma server on port 3000. You can access the web interface by visiting http://your_server_ip:3000
in your web browser. If you have a domain name or subdomain pointed to your server's IP address, you can access the web interface using that instead.
In this tutorial, we showed you how to install Uptime Kuma on NixOS 21.05. With Uptime Kuma up and running, you can monitor your website uptime and performance with ease.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!