The Homelab Handbook

Practical guides for Linux servers, networking, and self-hosting.

Troubleshooting

When something breaks, resist the urge to change things at random. Read the logs first; they are usually telling you exactly what is wrong.

Services

systemctl status nginx
systemctl status caddy
journalctl -u nginx -n 100 --no-pager

systemctl status shows whether a service is running and its recent log lines. journalctl -u <service> shows the full log. Start there, every time.

Ports and listening sockets

ss -tlnp
ss -ulnp

If a service claims to be running but nothing is listening on its port, the service is not actually serving. If something else is already bound to the port, you have found your conflict.

Disk and memory

df -h
free -h
du -sh /var/log/* | sort -h | tail -5

Full disks cause strange, varied failures. Logs are the usual suspect; rotate them and check for runaway growth before adding disk.

DNS from the outside

When a site is unreachable, confirm the name resolves to the right address from an independent resolver before touching the server. A wrong DNS answer looks exactly like a dead server from the client side, and the fix is in the DNS panel, not on the machine.

Change one thing, then verify

After each fix, test the specific thing that was broken before moving on. If you change three things and it starts working, you have not learned which one mattered — and the next outage will teach you again.