Your self-hosted server is humming along — but is it actually healthy? Disk filling up? Docker containers silently unhealthy? SSH config wide open? SSL certs about to expire?

selfhost-doctor answers all of that with one command.

Quick Start

curl -fsSL https://raw.githubusercontent.com/bird/selfhost-doctor/main/selfhost-doctor.sh | bash

That’s it. No installation, no dependencies, no API keys. Just a clean diagnostic report in your terminal.

What It Checks

selfhost-doctor runs through 7 categories of health checks:

1. System Info

Basic OS and uptime information. A freshly rebooted server might indicate an unexpected crash worth investigating.

2. Disk Usage

Checks every mounted filesystem. Warns at 75% usage, fails at 90%. Running out of disk space is the #1 cause of self-hosted service outages — Docker logs and databases love to eat disk silently.

3. Memory

Reports RAM usage and checks for swap. If you’re running multiple containers on a small VPS, memory pressure can cause OOM kills that are hard to debug. The script flags high usage and warns if you have no swap configured.

4. Docker

If Docker is installed, selfhost-doctor checks:

  • Running containers — how many are up
  • Stopped containers — cleanup candidates
  • Unhealthy containers — anything failing its health check
  • Reclaimable space — old images eating disk

5. Network

  • Public IP detection
  • DNS resolution test
  • Port 80/443 listener check — are your web services actually listening?

6. Security

This is where it gets valuable:

  • SSH root login — is it disabled or key-only?
  • SSH password auth — should be disabled in favor of keys
  • Firewall — checks UFW, firewalld, and iptables
  • Automatic updates — unattended-upgrades or dnf-automatic
  • Pending updates — how far behind are you?

7. SSL Certificates

If certbot is installed, checks every certificate’s expiry date. Warns at 30 days, fails at 7 days. No more surprise certificate expirations.

Sample Output

🩺sL📚eQSDMDSSoluyLUUiDDeMSoD83AeSSUUSCS1oMfisibpsiimewcolcSSFnLeu2kohctnutkssomakccsluHHWarmirokeunikkropekotrtCtmpnesmxtmyr:renocirpfteaagthue//yrtpotoaier'rst-e6::d:2apnyosrnteysgida.2a0iiettsedixeopol1443t64nndawwefadosct..24a18seiloadimd:th00%:%Mtrcnorlcp!o4dBasoegdlualhrcxau7ulnripte🎉th8Lys8sclrtsnaage.2tve6Tse%eoeuaucrscp1c_Sddndnihdttaows.k6uf:nneihidma:04s(iieasve'r/.fe1gDnrladesn/0od5uogstbivisr2rchlsiane3ek(yeanlglsMdecdbsisfeBroltdhlneaofavsdlfs-veilotharder0soisedeslir6fttao2auebncipdlldl.e2eaucs)5ayroe.nsemr0usv.pe3)rs

Running It Regularly

You can add selfhost-doctor to a cron job for regular checks:

# Run weekly, log output
0 9 * * 1 curl -fsSL https://raw.githubusercontent.com/bird/selfhost-doctor/main/selfhost-doctor.sh | bash > /var/log/selfhost-doctor.log 2>&1

Or clone it for offline use:

git clone https://github.com/bird/selfhost-doctor.git
cd selfhost-doctor
chmod +x selfhost-doctor.sh
./selfhost-doctor.sh

Why Not Just Use Monitoring Tools?

Tools like Prometheus, Grafana, Uptime Kuma, and Netdata are fantastic for ongoing monitoring. But they require setup, configuration, and maintenance — which is exactly the kind of thing that goes wrong on a neglected server.

selfhost-doctor is for:

  • Quick audits — SSH into a server and get a health snapshot in seconds
  • New server setup — verify your security baseline before deploying services
  • Troubleshooting — when something’s wrong, start with the basics
  • No-dependency checks — works on any Linux box with bash

Use it alongside your monitoring stack, not instead of it.

Requirements

  • Linux (Debian/Ubuntu, RHEL/Fedora, Arch, Alpine, etc.)
  • Bash 4+
  • No external dependencies — uses standard system tools (df, free, ss, curl, dig)

Get It

GitHub: github.com/bird/selfhost-doctor

curl -fsSL https://raw.githubusercontent.com/bird/selfhost-doctor/main/selfhost-doctor.sh | bash

Found it useful? Star the repo and share it with your homelab friends.


More self-hosting guides and tools at selfhostsetup.com