Saturday, 21 November 2026 Press Releases Newsletter RSS
Breaking
WhatsApp Business Account Hacked in Pakistan: Full Recovery Guide Special Technology Zones Authority (STZA) & IT Park Expansion in Pakistan: Islamabad, Karachi, and Lahore Ground Report Pakistan Software Export Board & Industry Consortium Launch 'TechBridge Pakistan 2026' to Connect 500 Startups With Global Markets Global Tech Safety Summit 2026: International Standards for Frontier AI and Data Security Announced WhatsApp Business Account Hacked in Pakistan: Full Recovery Guide Special Technology Zones Authority (STZA) & IT Park Expansion in Pakistan: Islamabad, Karachi, and Lahore Ground Report Pakistan Software Export Board & Industry Consortium Launch 'TechBridge Pakistan 2026' to Connect 500 Startups With Global Markets Global Tech Safety Summit 2026: International Standards for Frontier AI and Data Security Announced
WritePures

The worst way to learn your server is down is a customer telling you. Basic monitoring takes an hour and most of it is free.

Check from outside

Monitoring that runs on the server cannot tell you the server is unreachable. Use an external service — several offer free tiers adequate for this — to request your URL every few minutes and alert you when it fails.

Point it at a real endpoint that touches your database, not a static file. A health route that confirms the app can query its database catches far more than one that proves nginx is alive:

GET /health  →  200 {"status":"ok","database":"ok"}

Disk space, the most common outage

Logs and Docker images fill disks, and a full disk breaks everything at once in confusing ways.

nano ~/check-disk.sh
#!/usr/bin/env bash
THRESHOLD=85
USED=$(df / --output=pcent | tail -1 | tr -dc '0-9')

if [ "$USED" -ge "$THRESHOLD" ]; then
    echo "Disk at ${USED}% on $(hostname)" | \
      mail -s "Disk warning: $(hostname)" you@example.com
fi
chmod +x ~/check-disk.sh
crontab -e
0 * * * * /home/deploy/check-disk.sh

If mail is not set up, post to a webhook instead — a chat notification is more likely to be seen than an email anyway.

Cap Docker's logs before they cap you

By default container logs grow without limit. A chatty application can produce tens of gigabytes.

sudo nano /etc/docker/daemon.json
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}
sudo systemctl restart docker

This applies to containers created afterwards, so recreate existing ones.

Reading logs without drowning

# service logs, following
sudo journalctl -u caddy -f

# everything since boot, errors only
sudo journalctl -p err -b

# one container
docker compose logs -f --tail=100 app

# disk use by directory, biggest first
sudo du -h --max-depth=1 / 2>/dev/null | sort -rh | head

That last one is the command you will want at 2am when the disk is full, and it is worth remembering now.

A weekly five minutes

df -h                              # disk
free -h                            # memory
docker compose ps                  # everything still up
sudo journalctl -p err --since "7 days ago" | tail -40
ls /var/run/reboot-required 2>/dev/null && echo "reboot needed"
restic snapshots | tail -5         # backups still running

Five minutes a week catches nearly everything that would otherwise become an outage. Put it in the calendar; it will not happen otherwise.