Installing Gatus on Ubuntu Server

Introduction

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.

Prerequisites

Before proceeding with the installation, ensure that you have the following:

Step 1: Updating Ubuntu

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

Step 2: Installing Dependencies

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

Step 3: Installing Golang

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:

  1. 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.

  2. Verify the checksum of the downloaded package:

    sha256sum go1.17.2.linux-amd64.tar.gz
    
  3. 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
    
  4. Update your system’s PATH environment variable to include the Go binary directory:

    echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
    source ~/.bashrc
    
  5. 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.

Step 4: Installing Gatus

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:

  1. Clone the Gatus Git repository:

    git clone https://github.com/TwiN/gatus.git
    
  2. Change the directory to the cloned repository:

    cd gatus
    
  3. Build Gatus using the following command:

    go build
    
  4. 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.

Step 5: Configuring Gatus

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

Conclusion

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!