How to Install Uptime Kuma on Linux Mint Latest

Uptime Kuma is an open-source self-hosted monitoring tool that can help you keep track of the uptime and performance of your websites or servers. In this tutorial, we will show you how to install Uptime Kuma on Linux Mint.

Prerequisites

Step 1: Install Required Packages

To install Uptime Kuma on Linux Mint, we need to install some required packages. Open a terminal window and run the following command to update the package list:

sudo apt update

After updating the package list, we will install the required dependencies with the following command:

sudo apt install git curl nginx mariadb-server mariadb-client php7.4-fpm php7.4-mysql

Step 2: Clone the Uptime Kuma repository

Now, we will clone the Uptime Kuma repository from Github to our system.

git clone https://github.com/louislam/uptime-kuma.git

Once you have cloned the repository, go to the Uptime Kuma directory by running the following command:

cd uptime-kuma

Step 3: Install Composer and Install Dependencies

We will need to install Composer to manage Uptime Kuma's PHP dependencies. You can install Composer by running the following command in your terminal:

curl -sS https://getcomposer.org/installer | php

After installing Composer, run the following command to install Uptime Kuma dependencies:

php composer.phar install

This command may take a while to complete. Wait until the installation is finished.

Step 4: Prepare the Database

Now, we will create a new database for Uptime Kuma and a new user for it. Run the following command to login to the MariaDB shell:

sudo mariadb -u root

Once you're logged in, run the following commands to create a new database and a new user:

CREATE DATABASE uptime_kuma;
GRANT ALL PRIVILEGES ON uptime_kuma.* TO 'uptime_kuma_user'@'localhost' IDENTIFIED BY '<password>';
FLUSH PRIVILEGES;

Note: Replace <password> with a strong password.

Exit the MariaDB shell by typing exit.

Step 5: Configure Nginx

Now, we need to configure Nginx to serve Uptime Kuma. Create a new Nginx configuration file for Uptime Kuma with the following command:

sudo nano /etc/nginx/sites-available/uptime-kuma

Add the following content to the file:

server {
    listen 80;
    server_name your-domain.com;

    root /path/to/uptime-kuma;
    index index.html index.htm index.php;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }
}

Note: Replace your-domain.com with your actual domain name and /path/to/uptime-kuma with the actual path to the Uptime Kuma directory.

Save and close the file by pressing CTRL + X followed by Y and Enter.

Now, create a symbolic link of this file to the Nginx sites-enabled directory with the following command:

sudo ln -s /etc/nginx/sites-available/uptime-kuma /etc/nginx/sites-enabled/

Test the Nginx configuration with the following command:

sudo nginx -t

If the test is successful, reload the Nginx service to apply the new configuration:

sudo systemctl reload nginx

Step 6: Start the Uptime Kuma Service

Finally, we will start the Uptime Kuma service. Go to the Uptime Kuma directory by running the following command:

cd /path/to/uptime-kuma/

Copy the .env.example file to .env with the following command:

cp .env.example .env

Now, edit the .env file by running the following command:

nano .env

Update the database connection settings with the following:

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=uptime_kuma
DB_USERNAME=uptime_kuma_user
DB_PASSWORD=<password>

Note: Replace <password> with the password you set earlier.

Save and close the file by pressing CTRL + X followed by Y and Enter.

Generate the application key with the following command:

php artisan key:generate

Migrate the database with the following command:

php artisan migrate

Finally, start the Uptime Kuma service using the following command:

php artisan serve

The service should now be running, and you can access the Uptime Kuma dashboard by visiting your server's IP address or domain name in your web browser.

Conclusion

In this tutorial, we have shown you how to install and configure Uptime Kuma on Linux Mint. You can now monitor the uptimes and performance of your websites and servers in real-time.

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!