VPS operations · 10 min read
Find what filled your VPS disk and keep it from happening
Cap journald, rotate app logs, limit Docker logs, and find the culprit with du and ncdu when a small server reports no space left on device.
VPS operations · 10 min read
Cap journald, rotate app logs, limit Docker logs, and find the culprit with du and ncdu when a small server reports no space left on device.
VPS operations · 11 min read
A first-hour checklist for a new Debian VPS: updates, a non-root user, SSH keys, a firewall, unattended-upgrades, swap and time sync, with real commands.
Go in production · 10 min read
Handle SIGTERM with signal.NotifyContext, drain requests with Server.Shutdown, stop workers cleanly and set TimeoutStopSec so systemd waits long enough.
Packaging and releasing CLIs · 11 min read
Write a .goreleaser.yaml for a one-binary Go CLI covering builds, archives, checksums, version ldflags and changelog, and publish to GitHub or GitLab.
Go in production · 10 min read
A Go program with 40 MiB of live data was OOM-killed in an 80 MiB container. See what GOMEMLIMIT fixes, what it costs in CPU, and where the limit is soft.
Go in production · 9 min read
Under load, a Go service answered 404 for rows it had just written. How we found it, the regression test that catches it, and what to check in your pool.
Go in production · 10 min read
Configure log/slog with JSON or text output, a runtime log level, request ids on every line, secret redaction, and queries that work in journalctl.
Go in production · 10 min read
Set ReadHeaderTimeout, ReadTimeout, WriteTimeout and IdleTimeout correctly, add per-handler deadlines, and prove a slowloris client gets cut off.
Backups and recovery · 8 min read
Script a disaster-recovery drill for one VPS. Destroy the server, rebuild from restic, check the data, and see timings and five failures it found.
Deploys and releases · 10 min read
Design a health endpoint and a deploy gate that reject broken releases, with readiness versus liveness, consecutive passes, and the false greens to avoid.
Packaging and releasing CLIs · 10 min read
Write an install script for a Go release that stops on a bad checksum, odd version, plain http or unknown platform, and test each refusal.
VPS operations · 9 min read
An honest comparison of Caddy and nginx for one small server: automatic TLS, config size, what each does better, and when nginx is the right pick.