Statping is an open-source uptime monitor that keeps track of your websites and applications hosted on multiple servers. It works by fetching your application's real-time data and displaying its status on a simple web dashboard. This guide explains how you can install Statping and keep track of multiple web applications on Ubuntu 20.04.
Before your start, make sure you:
The easiest way to install Statping is through the Snapcraft manager. Install the application by running the following command.
$ sudo snap install statping-ng
Start Statping.
$ sudo snap start statping-ng
Enable Statping to start at boot time.
$ sudo systemctl enable snap.statping-ng.statping.service
Check the service status to verify that Statping is running.
$ sudo systemctl status snap.statping-ng.statping.service
Pull the Statping-ng image from Docker hub.
$ sudo docker pull adamboutcher/statping-ng
Create the Statping container running on port 8080
.
$ sudo docker run -it -d --name statping -p 8080:8080 adamboutcher/statping-ng
Verify that the container is running.
$ sudo docker ps
Output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bee9c7ee2c3e adamboutcher/statping-ng "/bin/sh -c 'statpinâ¦" 11 minutes ago Up 11 minutes (healthy) 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp statping
Create a new Nginx configuration file.
$ sudo touch /etc/nginx/conf.d/statping.conf
Using a text editor of your choice, edit the configuration file.
$ sudo vim /etc/nginx/conf.d/statping.conf
Add the following contents to the file. Replace statping.example.com
with your domain name.
server {
listen 80;
listen [::]:80;
server_name statping.example.com;
access_log /var/log/nginx/statping.access;
error_log /var/log/nginx/statping.error;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Save the file.
Test the Nginx configuration for errors.
$ sudo nginx -t
Restart Nginx to save changes.
$ sudo systemctl restart nginx
By default, Uncomplicated Firewall (UFW) is active on Ubuntu 20.04. Configure it to allow web access to the server.
Allow Nginx to send traffic on HTTP port 80
.
$ sudo ufw allow 80/tcp
Allow HTTPS traffic on port 443
.
$ sudo ufw allow 443/tcp
Restart the firewall.
$ sudo ufw reload
For more information on configuring UFW, please visit the following article:
Install the Certbot Let's Encrypt Client.
$ sudo snap install --classic certbot
Request a new Let's Encrypt SSL certificate. Replace statping.example.com
with your domain name.
$ sudo certbot -d statping.example.com -m user@example.com --agree-tos
Restart Nginx to save changes.
$ sudo systemctl restart nginx
Visit your configured server domain name.
https://statping.example.com
In the open Statping configuration screen, complete the following steps.
Enter your preferred Statping web page title in the Status Page Name field.
Navigate to Services to create new websites and applications to track.
You have successfully installed Statping on a Ubuntu 20.04 server. Please visit the following articles to create Statping email notifiers and set up web applications to track on other servers.