In this tutorial, we'll learn how to Install Gatus on Ubuntu 24.04 using Docker with step-by-step guide.
Service uptime isn’t optional anymore. Whether you’re running APIs, microservices, websites, or internal infrastructure, you need a fast and reliable monitoring tool that tells you what’s down before your users do.
Gatus delivers exactly that: a lightweight, flexible monitoring solution that tracks uptime, latency, certificates, ports, DNS, and more. It’s simple, efficient, and runs beautifully using Docker.
This tutorial gives you a complete, production-ready setup of Gatus on Ubuntu 24.04 using Docker, with real configurations, alerts, reverse proxy, SSL, troubleshooting, and best practices.
Ideal for DevOps engineers, system administrators, data center operators, and cloud hosting providers.
Introduction to Gatus
Gatus is an open-source, single-binary monitoring tool designed for speed and simplicity. It pulls no magic tricks behind the curtain. You define endpoints in a YAML file, run the service, and get instant uptime checks and alerts.
Key features
- HTTP, TCP, DNS, ICMP checks
- Beautiful web dashboard
- Slack, Discord, Email & Webhook alerts
- SSL certificate expiry monitoring
- Very lightweight
- Zero dependency beyond Docker
- Production-ready with reverse proxy and HTTPS
Prerequisites
Before we begin, ensure we have the following:
- An Ubuntu 24.04 dedicate server or KVM VPS.
- Basic Linux Command Line Knowledge.
- A domain name, pointing A record to server IP.
How to Install Gatus on Ubuntu 24.04 using Docker
1. Install Docker
Add Docker's official GPG key:
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
Add the repository to Apt sources:
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
To install the latest version, run:
sudo apt install docker-ce
Verify:
docker --version
docker compose --version
2. Configure Gatus for Health Monitoring
- You will run Gatus using Docker.
- Create your directory structure:
sudo mkdir -p /opt/gatus
sudo mkdir -p /opt/gatus/config
sudo nano /opt/gatus/config/config.yaml
Add following basic config.yaml Example:
port: 8080
endpoints:
- name: Google
url: "https://google.com"
interval: 60s
conditions:
- "[STATUS] == 200"
- "[LATENCY] < 1000"
Adding API and Service Endpoints:
port: 8080
metrics: true
endpoints:
- name: Production Website
group: public-sites
url: "https://example.com"
interval: 60s
conditions:
- "[STATUS] == 200"
- "[CERTIFICATE_EXPIRATION] > 72h"
- "[LATENCY] < 800"
- name: Backend API
group: internal-api
url: "https://api.example.com/health"
interval: 30s
conditions:
- "[STATUS] == 200"
- "[BODY].status == 'ok'"
- name: PostgreSQL TCP Check
group: database
url: "tcp://127.0.0.1:5432"
interval: 30s
conditions:
- "[CONNECTED] == true"
- name: DNS Check
url: "dns://example.com?type=A"
interval: 60s
conditions:
- "[DNS_ANSWER] != ''"
- name: Ping Check
url: "icmp://8.8.8.8"
interval: 60s
conditions:
- "[SUCCESS] == true"
3. Run Gatus Using Docker Compose
Create the compose file:
sudo nano /opt/gatus/docker-compose.yml
Paste:
services:
gatus:
image: ghcr.io/twin/gatus:latest
container_name: gatus
volumes:
- /opt/gatus/config:/config
ports:
- "8080:8080"
restart: unless-stopped
Start the service:
cd /opt/gatus
sudo docker compose up -d
Check logs:
sudo docker compose logs -f
Configure Alerting (Slack, Discord, Email, Webhooks)
Slack Example
alerting:
slack:
webhook-url: "https://hooks.slack.com/services/AAA/BBB/CCC"
Discord Example
alerting:
discord:
webhook-url: "https://discord.com/api/webhooks/XYZ"
Email Example (SMTP)
alerting:
email:
from: "alerts@example.com"
to: "ops@example.com"
smtp:
host: smtp.example.com
port: 587
username: user
password: pass
Webhook Example
alerting:
custom:
url: "https://webhook.site/1234"
5. Secure Gatus with Nginx Reverse Proxy
If you want HTTPS and domain access such as:
https://monitor.example.com
Follow these steps.
Install Nginx
sudo apt install nginx -y
Create Reverse Proxy Config
sudo nano /etc/nginx/sites-available/gatus.conf
Insert:
server {
listen 80;
server_name monitor.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Enable site:
sudo ln -s /etc/nginx/sites-available/gatus.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
6. Enable HTTPS Using Let’s Encrypt
Firewall Rules
sudo ufw allow 'Nginx Full'
Install Certbot and obtain certificate:
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d monitor.example.com
Firewall Rules
sudo ufw allow 'Nginx Full'
7. Accessing the Gatus Dashboard
With domain:
https://monitor.example.com
Dashboard shows:
- Service uptime
- Latency graphs
- Certificate expiry time
- Endpoint health
- Alert statuses
Troubleshooting
Gatus container not starting?
Check config file:
docker compose logs gatus
Nginx shows 502 Bad Gateway
Wrong proxy_pass
Gatus container not running
Alerts not triggering
- Wrong webhook URL
- SMTP authentication failure
- Conditions not met (double-check syntax)
High latency
- Network routing
- Slow upstream service
- DNS resolution delays
Conclusion
Using Docker, Gatus becomes one of the easiest, cleanest ways to deploy service uptime monitoring on Ubuntu 24.04. With simple YAML configurations, powerful alerting features, and a fast UI, it’s ideal for any environment—from small VPS setups to large-scale cloud infrastructure.
With Docker Compose, reverse proxying, SSL, alerting, and multi-protocol checks, your monitoring stack is now production-ready.
FAQs
1. Is Docker the best way to run Gatus?
Yes. It avoids compilation issues, bundles UI assets, and guarantees consistent behavior across versions.
2. Where does Gatus store its configuration in this setup?
Inside /opt/gatus/config/config.yaml, mounted into the container as /config.
3. Can Gatus monitor internal services?
Yes. TCP, ICMP, private APIs, databases, and internal DNS are all supported.
4. Does Gatus support SSL certificate monitoring?
Yes. You can check certificate expiry with [CERTIFICATE_EXPIRATION] > 72h.
5. Can I use Gatus for public status pages?
Absolutely. Many companies use Gatus as a simple uptime dashboard.

