How to Install Uptime Kuma on FreeBSD Latest

Uptime Kuma is a modern replacement for the once-popular Uptime Robot service. It is an open-source solution that can be installed on your own server, offering more control over its functionality and data privacy. In this tutorial, we will show you how to install Uptime Kuma on FreeBSD Latest.

Prerequisites

To follow this guide, you will need:

Steps to Follow

  1. Update FreeBSD Latest using the following command:

    sudo pkg update && sudo pkg upgrade
    
  2. Install the necessary dependencies using the following command:

    sudo pkg install node yarn sqlite3
    
  3. Create a new directory where you want to host Uptime Kuma using the following command:

    sudo mkdir -p /var/www/uptime-kuma
    
  4. Clone Uptime Kuma's source code from Github in the /var/www/uptime-kuma directory using the following command:

    sudo git clone https://github.com/louislam/uptime-kuma.git /var/www/uptime-kuma
    
  5. Go to the cloned directory using the following command:

    cd /var/www/uptime-kuma
    
  6. Install the required packages using Yarn by running the following command:

    sudo yarn install --production --ignore-engines
    
  7. Create a new configuration file by copying the sample config file using the following command:

    sudo cp .env.sample .env
    
  8. Open the configuration file using your favorite text editor and modify the following variables:

    APP_URL=http://localhost:5000
    DB_CONNECTION=sqlite
    

    Save and close the file.

  9. Create a new database using the following command:

    sudo touch database/uptime-kuma.sqlite
    
  10. Set permissions for the database file using the following command:

sudo chown -R www:www database/uptime-kuma.sqlite
  1. Start the Uptime Kuma server using this command:
sudo yarn start
  1. Open your web browser and navigate to http://IP_ADDRESS:5000 to access Uptime Kuma.

Note: Replace "IP_ADDRESS" with the actual IP address of your server.

  1. Create an Nginx configuration file for Uptime Kuma using the following command:
sudo touch /usr/local/etc/nginx/sites-available/uptime-kuma
  1. Open the Nginx configuration file using your favorite text editor and add the following content:
server {
    listen 80;
    server_name domain.tld;
    root /var/www/uptime-kuma/public;

    location / {
        try_files $uri /index.html;
    }

    location /api {
        proxy_pass http://localhost:5000;
        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;
    }
}

Save and close the file.

  1. Create a symbolic link from the sites-available directory to the sites-enabled directory using the following command:
sudo ln -s /usr/local/etc/nginx/sites-available/uptime-kuma /usr/local/etc/nginx/sites-enabled/uptime-kuma
  1. Restart the Nginx service using the following command:
sudo service nginx restart
  1. You can now access Uptime Kuma on your web browser by navigating to http://domain.tld.

Congratulations! You have successfully installed Uptime Kuma on FreeBSD Latest.

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!