How to Install StatPing.ng on Ubuntu Server

StatPing.ng is a simple, flexible, and easy-to-use monitoring tool that helps you keep track of your website, network, server, and services. In this tutorial, we will show you how to install StatPing.ng on your Ubuntu Server.

Prerequisites

Before starting this tutorial, you should have:

Step 1: Update the System

First, update your system to the latest version using the following command:

sudo apt update && sudo apt upgrade -y

Step 2: Install Required Packages

StatPing.ng requires the following packages to run:

Install these packages using the following command:

sudo apt install nginx php7.4-fpm php7.4-curl php7.4-dom php7.4-zip php7.4-gd php7.4-mbstring git -y

Step 3: Download StatPing.ng

Next, download StatPing.ng from the official repository using the following command:

git clone https://github.com/statping-ng/statping-ng.git /var/www/statping-ng

Step 4: Configure Nginx

Create a new Nginx server block for StatPing.ng by creating a new configuration file in the /etc/nginx/sites-available/ directory:

sudo nano /etc/nginx/sites-available/statping-ng

Add the following configurations:

server {
        listen 80;
        server_name example.com;

        root /var/www/statping-ng/public;
        index index.php index.html;

        location / {
                try_files $uri $uri/ /index.php?$query_string;
        }

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

        location ~ /\.(?!well-known).* {
                deny all;
        }

        # Uncomment this next section to add HTTPS support
        # listen 443 ssl;
        # ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
        # ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
}

Save and close the file.

Create a symbolic link to enable the new configuration:

sudo ln -s /etc/nginx/sites-available/statping-ng /etc/nginx/sites-enabled/

Remove the default Nginx configuration:

sudo rm /etc/nginx/sites-enabled/default

Finally, restart the Nginx service to apply the changes:

sudo systemctl restart nginx

Step 5: Configure StatPing.ng

Create a new configuration file by copying the example configuration file:

cp /var/www/statping-ng/.env.example /var/www/statping-ng/.env

Edit the .env file and set the values according to your requirements:

APP_NAME=Statping-NG
APP_ENV=production
APP_DEBUG=false
APP_URL=http://example.com

# ...

DB_DATABASE=statping-ng
DB_USERNAME=root
DB_PASSWORD=your_db_password

Finally, run the migration command to create the necessary database tables:

cd /var/www/statping-ng
php artisan migrate

Step 6: Access StatPing.ng

You can now access StatPing.ng using your web browser by entering your server's IP address or domain name:

http://example.com

You should see the StatPing.ng dashboard. Congratulations! You have successfully installed StatPing.ng on your Ubuntu Server.

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!