notes on infra

2026-04-12 · linux

Hardening systemd services with sandboxing options

I keep forgetting which systemd sandboxing options are safe defaults for long-running daemons, so writing it down. PrivateTmp, ProtectSystem=strict, NoNewPrivileges, RestrictSUIDSGID, plus a sane CapabilityBoundingSet cover most footguns…

2026-03-28 · networking

Why TCP keepalive defaults still bite in 2026

Linux ships with tcp_keepalive_time=7200 by default — two hours before the first probe. On modern NAT'd networks (carrier-grade NAT especially), idle TCP connections die long before that. Notes on tuning…

2026-02-15 · databases

Debugging SQLite WAL contention on busy writers

SQLite's WAL mode is excellent for read-heavy workloads, but a single hot writer can still hit SQLITE_BUSY when checkpoint frequency doesn't match write throughput. Recently fought this on a small panel app…

2026-01-22 · ops

docker compose depends_on with healthchecks: what actually works

The depends_on condition syntax in compose v3 was dropped, then partially restored in compose v2. Half-day of confusion later, here's a working pattern for postgres + app dependency…

2025-12-05 · linux

Stopping journald from eating your root partition

A 1 GB VPS will happily let journalctl consume a third of the disk before noticing. SystemMaxUse and a vacuum cron solve it, but the syntax differs between drop-in and main config…