Practical notes

Knowledge Base

100 notes on Linux, servers, containers, networking, security and scripting. Articles marked From my setup describe what I actually did on my own server; Reference notes are short, practical cheat-sheet style explanations. Search, filter by category, copy code with one click.

DockerFrom my setup2 min read

Automatic HTTPS for a static site with Docker and Caddy

The small Docker Compose and Caddyfile setup behind this website: Caddy gets and renews Let's Encrypt certificates by itself and serves a static site, with security headers, redirects and log rotation.

caddydockerhttpsletsencryptnginx
Updated 2026-11-27
BashReference note1 min read

Bash conditions and loops

if, test operators, for, while and case, with the patterns that actually come up in scripts.

bashscriptingloops
Updated 2026-11-27
BashReference note1 min read

Schedule jobs with cron

The five time fields, crontab editing, the system cron directories, and why jobs silently fail.

cronscheduling
Updated 2026-11-27
BashReference note1 min read

Redirection and pipes

stdout, stderr, appending, discarding, tee and process substitution.

bashpipesredirection
Updated 2026-11-27
BashReference note1 min read

A safe header for Bash scripts

set -euo pipefail, a trap for cleanup, and argument checks that make scripts fail loudly instead of silently.

bashscriptingsafety
Updated 2026-11-27
BashReference note1 min read

Bash variables and quoting

Assign and expand variables, why you should quote them, and the difference between single and double quotes.

bashquotingvariables
Updated 2026-11-27
DebianReference note1 min read

Set the time zone, time sync and locale

timedatectl for the time zone and NTP, and locale settings for correct language and characters.

timezonentplocale
Updated 2026-11-27
DNSReference note1 min read

DNS lookups with dig

Query records, choose the resolver, trace delegation and read the answer.

digdnsrecords
Updated 2026-11-27
DNSReference note1 min read

Point a name at a small server

The minimum DNS setup for a website: an A record (and AAAA), a www alias and a quick check.

dnswebsitesetup
Updated 2026-11-27
DNSReference note1 min read

Why a DNS change is not visible yet

Caching, TTL, negative caching and how to check the authoritative server directly.

dnspropagationtroubleshooting
Updated 2026-11-27
DockerReference note1 min read

Docker volumes versus bind mounts

Where container data should live, how to back up a named volume, and the permission pitfalls.

dockervolumesbackup
Updated 2026-11-27
Server administrationFrom my setup3 min read

Encrypted nightly backups for a small server with restic

How I back up a small Ubuntu server with restic: nightly encrypted snapshots, retention, a weekly integrity check, a restore test and an off-server copy on my PC.

backupresticubuntucrondocker
Updated 2026-11-27⬇ 1 download
PythonFrom my setup3 min read

How this website is built: a static-site generator in Python

A tour of the setup behind this site: Python scripts that turn JSON, Markdown and cached GitHub data into static HTML, one hashed stylesheet, client-side search, tests, and a deployment script with a backup and rollback.

pythonstatic-sitegithub-apideploymenttesting
Updated 2026-11-27
LinuxReference note1 min read

Environment variables and PATH

View, set and persist environment variables, and fix "command not found" caused by PATH.

envpathshell
Updated 2026-11-27
LinuxReference note1 min read

rsync for copying and simple backups

Copy directories efficiently over SSH, mirror with --delete carefully, and do a dry run first.

rsyncbackupssh
Updated 2026-11-27
LinuxReference note1 min read

tmux: keep terminal sessions alive

Start, detach and re-attach sessions so long jobs survive a dropped SSH connection.

tmuxsshterminal
Updated 2026-11-27
LinuxReference note1 min read

Users, groups and sudo

Create users, manage group membership, grant sudo and lock accounts.

usersgroupssudo
Updated 2026-11-27
NetworkingReference note1 min read

curl for debugging HTTP and HTTPS

Headers, redirects, timing, forcing a host name or IP, and checking certificates.

curlhttptls
Updated 2026-11-27
NetworkingReference note1 min read

Scan your own network with nmap

Discover hosts and open ports on networks you own or are authorised to test, and read the output.

nmapscanningsecurity
Updated 2026-11-27
NetworkingReference note1 min read

Subnetting in a few lines

CIDR notation, how many addresses a prefix gives, and the private ranges.

subnettingcidripv4
Updated 2026-11-27
NetworkingReference note1 min read

Capture packets with tcpdump

Filter by host, port and protocol, write a capture file and open it in Wireshark.

tcpdumppacketstroubleshooting
Updated 2026-11-27
Server administrationFrom my setup2 min read

Oracle Cloud Always Free: notes from setting up a small VM

What I learned running a website on an Oracle Cloud Always Free micro VM: shapes, the ARM capacity problem, the two firewalls, a reserved IP, and why I stay on the free plan.

oracle-cloudalways-freevpsfirewallarm
Updated 2026-11-27
Parrot OSReference note1 min read

Run Parrot OS in a virtual machine

Why a VM is a good home for a security distribution, with the resource and network choices to make.

parrotvirtualizationlab
Updated 2026-11-27
Parrot OSReference note1 min read

Parrot OS: keep the system updated

Parrot is Debian-based: update with apt, and use the project's helper where it is provided.

parrotaptupdates
Updated 2026-11-27
PowerShellReference note1 min read

PowerShell pipeline: objects, not text

Select, filter, sort and format objects with Where-Object, Select-Object and friends.

powershellpipelineobjects
Updated 2026-11-27
PowerShellReference note1 min read

Useful PowerShell admin one-liners

Disk space, uptime, installed updates, top memory users and open ports.

powershelladminone-liners
Updated 2026-11-27
ProxmoxReference note1 min read

Proxmox backups with vzdump

Backup modes, a command-line example and how to restore, plus the rule that a backup must leave the host.

proxmoxbackupvzdump
Updated 2026-11-27
ProxmoxReference note1 min read

Proxmox: VM or LXC container

How to choose between a full virtual machine and a lightweight Linux container.

proxmoxlxckvm
Updated 2026-11-27
PythonReference note1 min read

Python: files, paths and JSON

Read and write text safely with pathlib, encodings and the json module.

pythonfilesjson
Updated 2026-11-27
PythonReference note1 min read

Run a Python script as a systemd service

A unit file for a long-running script, with a restart policy, its own user and logs in the journal.

pythonsystemdservice
Updated 2026-11-27
PythonReference note1 min read

Python virtual environments and pip

Create, activate and reproduce an isolated environment, and why you should not pip install globally.

pythonvenvpip
Updated 2026-11-27
CybersecurityReference note1 min read

A quick security audit with Lynis

Run a read-only audit of a Linux host, read the hardening index and work through the suggestions.

lynisaudithardening
Updated 2026-11-27
CybersecurityReference note1 min read

Audit what your server exposes

Compare the listening sockets, the firewall rules and an outside view, and remove what you do not need.

auditportsfirewall
Updated 2026-11-27
CybersecurityReference note1 min read

Inspect TLS certificates with openssl

See the certificate a server presents, its dates and names, and check the chain.

tlsopensslcertificates
Updated 2026-11-27
CybersecurityReference note1 min read

SSH hardening checklist

Keys only, no root login, limited users, fail2ban, updates and monitoring of logins.

sshhardeningsecurity
Updated 2026-11-27
Server administrationReference note1 min read

Keep logs under control with logrotate

A minimal logrotate rule for your own log files, testing it, and what the options mean.

logslogrotatedisk
Updated 2026-11-27
Server administrationReference note1 min read

Quick resource monitoring on a server

CPU, memory, disk and network checks with the standard tools, and what the numbers mean.

monitoringperformancetop
Updated 2026-11-27
Server administrationReference note1 min read

Add a swap file

Create a swap file on a small VM as a safety net against out-of-memory kills.

swapmemoryvm
Updated 2026-11-27
Server administrationReference note1 min read

systemd timers as an alternative to cron

A service plus a timer unit, with logging in the journal and catch-up after downtime.

systemdtimersscheduling
Updated 2026-11-27
TroubleshootingReference note1 min read

Troubleshooting: "I cannot reach my server"

A layered checklist from DNS to the application, so you find the failing layer quickly.

troubleshootingnetworkchecklist
Updated 2026-11-27
TroubleshootingReference note1 min read

Troubleshooting: "No space left on device"

Find out whether blocks or inodes are exhausted, what filled the disk and how to recover safely.

diskinodestroubleshooting
Updated 2026-11-27
TroubleshootingReference note1 min read

Troubleshooting: the server is slow

Is it CPU, memory, disk or network, and which process? A five-minute triage.

performancetroubleshootingtriage
Updated 2026-11-27
Ubuntu ServerReference note1 min read

Do I need to reboot after updates

Detect a pending reboot and see which services still use old libraries.

rebootupdateskernel
Updated 2026-11-27
Ubuntu ServerReference note1 min read

cloud-init basics on cloud VMs

What cloud-init does at first boot, how to read its status and logs, and how to re-run or disable it.

cloud-initcloudubuntu
Updated 2026-11-27
Ubuntu ServerReference note1 min read

Ubuntu network configuration with Netplan

Static IP, DHCP and DNS settings in /etc/netplan, and how to apply them without locking yourself out.

netplannetworkubuntu
Updated 2026-11-27
Ubuntu ServerReference note1 min read

snap versus apt on Ubuntu

What snaps are, the basic commands, and when to prefer the apt package.

snapaptpackages
Updated 2026-11-27
Ubuntu ServerReference note1 min read

Take a safe snapshot before risky changes

The habit and the options: provider snapshot, LVM snapshot, or a quick copy of the files you will change.

snapshotbackupchange-management
Updated 2026-11-27
Ubuntu ServerReference note1 min read

ufw: a simple firewall front end

Allow SSH first, then enable ufw; common rules, rate limiting and how to read the status.

ufwfirewallubuntu
Updated 2026-11-27
VPNReference note1 min read

Split tunnel or full tunnel

What AllowedIPs / routes decide, and when to send all traffic through the VPN.

vpnroutingprivacy
Updated 2026-11-27
WindowsReference note1 min read

Find what slows a Windows PC

Task Manager, Resource Monitor, Reliability Monitor and startup apps, in a sensible order.

performancetaskmgrresmon
Updated 2026-11-27

Categories without articles yet are hidden. New articles are added as Markdown files; see the content guide in the project documentation.