Articles · Topic

Servers and DevOps

Linux, Docker, nginx, networking and keeping systems running.

11 articles

#ServerIntermediate

PostgreSQL 18: uuidv7() instead of UUID v4, and async I/O set up right

PostgreSQL 18 adds time-ordered uuidv7(), which keeps B-tree indexes smaller and cooler than v4, plus async I/O via io_method (worker or io_uring), with the index math.

7 min read
#ServerBeginner

3-2-1 backups for a small VPS, and why you test the restore every month

A backup you never restored is a hope, not a plan. 3-2-1 and 3-2-1-1-0, what to back up on a VPS, restic encryption, retention and storage math, a monthly restore drill.

7 min read
#ServerBeginner

Disk full, server down: find the culprit, cap journald, logrotate and Docker

Your server stopped because the disk filled. Find what ate it with df, du and ncdu, know the usual culprits, cap journald, logrotate and Docker logs, alert at 80%.

7 min read
#ServerIntermediate

Run your app with systemd, not screen or nohup: units, restarts, timers

Stop leaving apps running in screen or nohup. A systemd unit with its own user, restart on failure, env from a file, basic hardening, and timers instead of cron.

7 min read
#ServerAdvanced

Zero-downtime PostgreSQL migrations: expand, migrate, contract

Rename a column in three deploys with no errors. The locks to watch, CREATE INDEX CONCURRENTLY, NOT VALID then VALIDATE, lock_timeout, and batched backfills.

8 min read
#ServerBeginner

A small server that reports on Telegram: status, alerts and a graceful shutdown

Sixty lines of Python on a small box: CPU, memory and disk status into Telegram, alerts that do not repeat, and a scheduled shutdown that stops containers in order.

10 min read
#ServerBeginner

A stable domain name for a home server whose IP keeps changing: DIY dynamic DNS

Why your home IP changes, and a 60-line Python script that checks it every 5 minutes and updates an A record through your DNS provider's API, DigitalOcean as the example.

8 min read
#ServerBeginner

Why does my new site still show the old one? DNS caching and TTL, a real case

We pointed a domain at a new server, yet Google's resolver answered the old IP for two more hours. Why, how to see what each layer sees, and how to move without the wait.

7 min read
#ServerIntermediate

Time-series data with TimescaleDB: compress, roll up, and when never to delete

Data arriving every few seconds grows until the database crawls. Hypertables that compress and roll up on their own, and when not to let them delete, with real SQL.

6 min read
#ServerIntermediate

Deploy in one swap: no half-uploaded site, and rollback in one command

Copying over a live web folder serves half-uploaded pages. The folder swap this site uses, its small gap, and the symlink way that swaps instantly, with rollback.

5 min read
#ServerIntermediate

Database, cache, app and HTTPS on a 2 GB box: cap everything that can grow

Small servers fail when something grows without a limit, not for being small. Real PostgreSQL, Redis, Docker log and swap settings for a 2 GB box, with reasons.

5 min read