Accessing Gatus
- Open uw browser en ga naar:
https://<SERVER_IP> - Er wordt een SSL-waarschuwing in de browser verwacht (zelfondertekend certificaat)
- Verificatie is vereist (pop-upvenster voor Basic Auth)
- Verificatiemethode: HTTP Basic Auth
- Inloggegevens worden veilig opgeslagen in:
/root/.cloudzy-creds
Belangrijke bestanden en mappen
- Installatiemap:
/opt/gatus - Docker Compose:
/opt/gatus/docker-compose.yml - Milieu-bestand:
/opt/gatus/.env - Config directory:
/opt/gatus/config/ - Hoofdconfiguratiebestand:
/opt/gatus/config/config.yaml - Database directory:
/opt/gatus/data/db - Nginx config:
/etc/nginx/sites-available/gatus.conf - Enabled Nginx site:
/etc/nginx/sites-enabled/gatus.conf - SSL-certificaten:
/etc/nginx/ssl/ - HTTP Basic Auth file:
/etc/nginx/auth/.gatus-htpasswd - Credentials-bestand:
/root/.gatus-credentials
Configuration Behavior
- Configuration files are located in
/opt/gatus/config/ - YAML can be split into multiple files
- Changes are auto-reloaded
- No restart is required after edits
Manage the Stack
Go to the installation directory:
cd /opt/gatus
Common Docker Compose commands:
# Check status
docker compose ps
# View logs (follow live)
docker compose logs -f
# Restart all services
docker compose restart
# Stop services
docker compose down
# Start again
docker compose up -d
Disable HTTP Basic Auth in Nginx (Optional)
Edit the Nginx site file: /etc/nginx/sites-available/gatus.conf
Remove or comment out these lines:
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/auth/.gatus-htpasswd;
Nginx opnieuw laden:
systemctl restart nginx
SSL inschakelen met een domein
1. Wijs uw domein naar het IP-adres van de server.
2. Bewerk de Nginx-configuratie en vervang beide server_name <IP>; met uw domein (<your-domain>) voor zowel HTTP (poort 80) als HTTPS (poort 443) blokken:
vim /etc/nginx/sites-available/gatus.conf
3. Certbot installeren:
apt install -y certbot python3-certbot-nginx
4. Voer de volgende opdracht uit om een geldig Let’s Encrypt-certificaat te genereren:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Vervang SSL-paden in Nginx-configuratie:
vim /etc/nginx/sites-available/gatus.conf
# Before:
# ssl_certificate /etc/nginx/ssl/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
6. Start Nginx opnieuw op om de wijzigingen toe te passen:
systemctl restart nginx
7. Open uw browser en ga naar: https://yourdomain.com