Gatus is a web-based service health dashboard that allows you to monitor the status of various web services in real-time. In this tutorial, we will be discussing how to install Gatus on Ubuntu Server.
Before proceeding with the installation, ensure that you have the following:
To begin, log in to your Ubuntu Server using SSH and run the following command to update the package repositories and installed packages:
sudo apt update && sudo apt upgrade -y
Next, we need to install a few dependencies required by Gatus. Run the following command to install them:
sudo apt install -y curl git apt-transport-https ca-certificates gnupg2 software-properties-common build-essential
Gatus is written in the Go programming language, so we need to install Golang before we can proceed with the installation.
Follow these steps to install Golang on your Ubuntu Server:
Download the Golang binary package from its official website:
curl -O https://dl.google.com/go/go1.17.2.linux-amd64.tar.gz
Note: You can replace go1.17.2 with the latest version of Golang.
Verify the checksum of the downloaded package:
sha256sum go1.17.2.linux-amd64.tar.gz
Extract the downloaded archive to the /usr/local directory using the following commands:
sudo tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz
Update your system’s PATH environment variable to include the Go binary directory:
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
source ~/.bashrc
Verify that Go has been installed correctly by running the following command:
go version
You should see the version number of the installed Golang binary.
Now that we have installed all the required dependencies, we can install Gatus by cloning its Git repository and building it using Golang.
Follow these steps to install Gatus:
Clone the Gatus Git repository:
git clone https://github.com/TwiN/gatus.git
Change the directory to the cloned repository:
cd gatus
Build Gatus using the following command:
go build
Once the build is complete, you can run Gatus using the following command:
./gatus server
Congratulations! You have successfully installed Gatus on your Ubuntu Server.
By default, Gatus listens on port 8080. To access the Gatus dashboard, open a web browser and visit http://your-server-ip:8080.
To configure Gatus, you can create a configuration file and pass it to Gatus using the --config
flag.
For example, to create a YAML configuration file, run the following command:
cat <<EOF > gatus.yml
checks:
- name: Google
type: http
url: https://www.google.com
EOF
You can then start Gatus with this configuration file using the following command:
./gatus server --config gatus.yml
In this tutorial, we have covered how to install Gatus on an Ubuntu Server. You can now monitor the status of your web services using the Gatus dashboard.
Happy monitoring!
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!