Uptime Kuma is an open-source self-hosted monitoring tool that provides a dashboard to track the status of web sites and applications. In this tutorial, we will guide you through the steps necessary to install Uptime Kuma on OpenBSD.
Before starting, ensure that you have the following prerequisites:
Uptime Kuma requires Node.js to run. To install Node.js, follow these steps:
Update the package manager first by running the following command:
$ doas pkg_add -u
Install the node
and yarn
packages by running the following command:
$ doas pkg_add yarn node
Clone Uptime Kuma's repository from GitHub using the git
command:
$ git clone https://github.com/louislam/uptime-kuma.git
Change into the newly cloned directory:
$ cd uptime-kuma
Install the necessary packages using yarn
:
$ yarn
Copy the config.sample.json
file to config.json
using the following command:
$ cp config.sample.json config.json
Edit the config.json
file using your favorite editor, and set the following properties:
"baseUrl": "http://<your_domain_name_or_IP_address>",
"dbPath": "<full_path_to_uptime_kuma_folder>/uptime-kuma/var/data.db",
Note: This guide assumes that you are using Nginx as your web server.
Create the Nginx server block:
server {
listen 80;
server_name <your_domain_name_or_IP_address>;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
proxy_send_timeout 300s;
}
}
Save this block in /etc/nginx/sites-available/uptime-kuma
file.
Create a symlink to enable this server block:
$ cd /etc/nginx/sites-enabled/
$ ln -s ../sites-available/uptime-kuma .
Restart Nginx to enable these changes:
$ doas /etc/rc.d/nginx restart
Start Uptime Kuma using the following command:
$ yarn start
This will launch the Uptime Kuma dashboard and keep it running in the foreground. To run it in the background, run the following command instead:
$ yarn start --silent &
You should now be able to access Uptime Kuma by visiting http://<your_domain_name_or_IP_address>
in your web browser.
Congratulations! You have successfully installed Uptime Kuma on OpenBSD.
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!
Alternatively, for the best virtual desktop, try Shells!