This is an old revision of the document!


Stratum

A functional layer for Debian.

In geology, a stratum is a distinct layer within a larger structure: part of the whole, yet defined by its own properties. Stratum applies the same principle to Debian.

Overview

Stratum is an extension layer on top of a standard Debian installation: it adds system administration tools, standardized configurations, security policies, monitoring and automation, and management agents – without replacing or forking the system. Debian's packages, stability and established workflows stay exactly as they are; the components are modular and transparent, so each system installs only what its role requires. Debian provides the foundation, Stratum provides the additional capabilities – and the system remains Debian.

Stratum is not a distribution. It is a layer.

Stratum Handbook

Stratum Handbook – cover

The complete guide to installing, using and supporting Stratum – for end users, administrators and the support team. Every chapter is marked with the readers it is meant for.

  • Getting started – what Stratum is, installation, the stratum command and the menu
  • Modules – repositories, upgrades, banner, zram, firewall, security, Docker, Ansible, watchdog, telemetry, file server, database and the WireGuard mesh: every command and switch, with examples
  • License and support – getting a license, asking for remote support, and how the support team gives it
  • Reference – the project and its repository, all commands, files, troubleshooting, glossary and a quick reference card

Download
Stratum Handbook (PDF, A4, 116 pages, 7 MB)
Second edition · October 2026 · Stratum 0.40 · Stratum Project
On a Stratum computer: apt install stratum-handbook – the book is then at /root/stratum-handbook.pdf.

Stratum Handbook – cover, contents and a chapter

Installation

Stratum packages for Debian 13 (trixie) and Debian 14 (forky, currently testing) are published in a signed APT repository – one suite per Debian release, with the same packages.

trixie · forky
Suites · Debian 13 · Debian 14
main · contrib
Components
amd64 · arm64
Architectures
ed25519
Signing key · valid until 2031-10-20

Repository
Address: https://www.skraba.net/stratum-apt/
Signing key: Stratum Archive Signing Key stratum@skraba.net
Fingerprint: 4F39 6C32 8AB5 D14E F653 55CF 130D EB73 9D1E 1A2C

Quick setup

Run as root on Debian 13 or Debian 14. The script downloads the signing key, verifies its checksum, installs it, adds the repository for the system's release (the codename from /etc/os-release: trixie or forky) and installs stratum-init (the core, with stratum-banner):

Terminal — root@debian

apt-get update && apt-get install -y curl ca-certificates
curl -fsSL https://www.skraba.net/stratum-apt/stratum-archive-keyring.gpg -o /tmp/stratum-archive-keyring.gpg
echo "4e9b1cb45f58d955340ac93b6c8d997d900d9780d005f002ce978bab39d53647  /tmp/stratum-archive-keyring.gpg" | sha256sum -c - \
  && install -m 0644 /tmp/stratum-archive-keyring.gpg /usr/share/keyrings/stratum-archive-keyring.gpg \
  && . /etc/os-release \
  && cat > /etc/apt/sources.list.d/stratum.sources <<EOF && apt-get update && apt-get install -y stratum-init
Types: deb
URIs: https://www.skraba.net/stratum-apt/
Suites: $VERSION_CODENAME
Components: main contrib
Signed-By: /usr/share/keyrings/stratum-archive-keyring.gpg
EOF

If sha256sum reports FAILED, nothing is installed: stop and check the signing key.

Manual setup

1. Download the signing key:

Terminal — root@debian

curl -fsSL https://www.skraba.net/stratum-apt/stratum-archive-keyring.gpg -o /usr/share/keyrings/stratum-archive-keyring.gpg

2. Create the repository source – Suites is the codename of the Debian release: trixie (Debian 13) or forky (Debian 14), see VERSION_CODENAME in /etc/os-release:

File — /etc/apt/sources.list.d/stratum.sources · Debian 13 (trixie)

stratum.sources
Types: deb
URIs: https://www.skraba.net/stratum-apt/
Suites: trixie
Components: main contrib
Signed-By: /usr/share/keyrings/stratum-archive-keyring.gpg

File — /etc/apt/sources.list.d/stratum.sources · Debian 14 (forky)

stratum.sources
Types: deb
URIs: https://www.skraba.net/stratum-apt/
Suites: forky
Components: main contrib
Signed-By: /usr/share/keyrings/stratum-archive-keyring.gpg

3. Update the package lists and install stratum-init (the core, with stratum-banner):

Terminal — root@debian

apt-get update && apt-get install stratum-init

Install Stratum

stratum-init is installed by the setup above. Start the menu and add the modules you need – in the menu under modules (check to install, uncheck to remove), or with APT:

Terminal — root@debian

stratum                             # interactive menu
apt-get install stratum-repos stratum-upgrade stratum-zram stratum-firewall stratum-security
apt-get install stratum-docker && stratum docker setup   # Docker from Docker's repository
apt-get install stratum-license stratum-support stratum-ansible
apt-get install stratum-fileserver stratum-database stratum-wireguard
stratum help <module>               # all actions and options of a module

What each package does is described under Packages.

Signing key

To check a downloaded key (requires gnupg), compare its fingerprint with 4F39 6C32 8AB5 D14E F653 55CF 130D EB73 9D1E 1A2C:

Terminal — root@debian

gpg --show-keys --with-fingerprint /usr/share/keyrings/stratum-archive-keyring.gpg

The same key in ASCII-armored form, for import with gpg –dearmor:

File — stratum-archive-keyring.asc

stratum-archive-keyring.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----

mDMEath3eRYJKwYBBAHaRw8BAQdA/Q19broWumbPBohWxqpA0JHjcElCxZd/qcVB
SkhbwOO0MFN0cmF0dW0gQXJjaGl2ZSBTaWduaW5nIEtleSA8c3RyYXR1bUBza3Jh
YmEubmV0PoiWBBMWCgA+FiEETzlsMoq10U72U1XPEw3rc50eGiwFAmrYd3kCGwMF
CQlmAYAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQEw3rc50eGizXLwD/eDij
buXgBpj7Sfi1L6zzE7EFTdUAkbw2oYfwOz/26e8BALfgBJdnVlpizJZjhFIkvrvm
FlhB2i47OEHJuhfmsREL
=RrPo
-----END PGP PUBLIC KEY BLOCK-----

Using the repository

Terminal — root@debian

# list all packages available from Stratum
grep -h '^Package:' /var/lib/apt/lists/*stratum-apt*_Packages | sort -u
 
# show where a package comes from
apt-cache policy <package>
 
# install a package
apt-get install <package>

Optional: install stratum-archive-keyring so that future key updates and source changes arrive through APT.

Removal

Terminal — root@debian

apt-get purge -y stratum-archive-keyring 2>/dev/null
rm -f /etc/apt/sources.list.d/stratum.sources /usr/share/keyrings/stratum-archive-keyring.gpg
apt-get update

Packages already installed from Stratum stay on the system until removed with apt-get purge.

Packages

Stratum is split into small packages. stratum-init is the core; every other package adds one module, managed in the stratum menu or with stratum <module> <action>. All packages are for Debian 13 (trixie) and Debian 14 (forky), amd64 and arm64; on any other system Stratum reports an unsupported configuration.

Package Module Type Description
stratum-ansible ansible setting Ansible the Stratum way, with three roles switched on separately: managed node (user ansible with the controllers' SSH keys, optionally only from their addresses, sudo, firewall rule), pull (ansible-pull of a playbook from a git repository by a timer – apply, or only check what would change) and controller (inventory, playbooks with check before run, ad-hoc commands such as ping, updates or reboot, controller SSH key, vault password, Galaxy roles). Every run is logged with ok / changed / failed; example playbooks include a Stratum baseline for many hosts.
stratum-archive-keyring — — The repository signing key, kept up to date through APT; when there is no APT source yet, it writes /etc/apt/sources.list.d/stratum.sources for the system's release (trixie or forky).
stratum-banner banner profile Stratum line on the login screen and in the MOTD. Profiles: standard – also the Stratum logo above the first login screen after boot; minimal – only the Stratum line; discrete – nothing shows that Stratum is installed (needs a valid license from stratum-license; without one, minimal is used). Always installed with stratum-init.
stratum-database database service MariaDB server from Debian: databases (create; delete always with a backup first), users with passwords and the hosts they may connect from, permissions per database (read, write, all, admin), backups – daily timer, kept per database, manual backup and restore (also into another database) – and the main settings: where MariaDB listens (this computer only by default), firewall access, maximum connections, InnoDB buffer, slow query log; secure removes anonymous users, remote root and the test database; running queries.
stratum-docker docker service Docker from Docker's official repository, installed by the module itself on its first start (the menu asks; or stratum docker setup): Docker's signing key and APT source, then docker-ce, docker-ce-cli, containerd.io and the compose and buildx plugins; an existing Docker from Debian (docker.io …) is shown and removed only after confirmation. Applications are compose projects in /srv/stratum/docker/<name>, created by pasting a compose file, pasting a docker run command (converted to compose), a wizard (image, ports, volumes, variables) or templates (nginx, Uptime Kuma, Portainer, Vaultwarden, Nginx Proxy Manager, PostgreSQL, Redis, Nextcloud …). Per application: start / stop / restart, autostart, logs, CPU / memory statistics, shell, editing compose and .env, CPU and memory limits, automatic updates (auto / notify / off, daily or weekly timer) with rollback, backup and restore (folder and volumes) and removal (with or without data). Also: all containers, images, volumes, networks, disk usage and cleanup, events (starts, crashes, out of memory, unhealthy, updates), registries, Docker users and daemon settings – log rotation, address pool, live restore, IPv6, no-new-privileges, data location. Debian 14 (forky) uses Docker's trixie packages until Docker publishes forky.
stratum-fileserver fileserver service Shared folders with Samba and NFS: shares (folder, protocol smb / nfs / both, comment, visibility, recycle bin), users only for file sharing (no login) or existing users with a Samba password, groups for teams, access per share – write and read for users and @groups, guest read access, NFS clients per network with rw / ro and root squash. Folder permissions are set with POSIX ACLs; Samba (SMB2 / SMB3) and NFS (v4, optionally v3 with fixed ports) are configured from one place; the firewall follows the shares (local networks, any or chosen networks); current connections.
stratum-firewall firewall service Host firewall with ufw. Settings in the menu: type of computer (workstation, server, hypervisor, vm-guest – each with sensible defaults), allowed services – service presets (SSH, web, DNS, Samba, NFS, mail, databases, WireGuard, Proxmox, Cockpit …) or tcp/udp ports and ranges, on all or one network interface, from anywhere or one address / network, optionally rate limited – default policies for incoming, outgoing and routed traffic, IPv4 + IPv6, ping and logging. SSH guard: the SSH port stays open unless an own rule covers it; a change that would block an open SSH connection is refused unless confirmed (“Apply anyway”), and every change must be confirmed (“Keep”) within 60 seconds – otherwise the previous state returns automatically. Overviews: listening services (allowed / blocked) and events – blocked connections of the last 24 hours (top sources, top ports, the last 10). Docker: published container ports follow the same rules (chain DOCKER-USER, by the host port) instead of bypassing the firewall – setting protect (default) or open; the listening overview shows the containers. Rules of other modules: the file server, the database and the WireGuard mesh add the ports and forwarding they need (/etc/stratum/firewall.d); only these rules are re-applied when they change. Rules added by hand with ufw stay untouched.
stratum-handbook — — The Stratum Handbook as PDF (A4, about 120 pages; for end users, administrators and the support team): installation, the menu, every module with all commands and switches, the license, remote support and a reference. Installed as /usr/share/stratum/handbook/stratum-handbook.pdf, with a link /root/stratum-handbook.pdf. Install it with apt install stratum-handbook.
stratum-init stratum setting The stratum command and the interactive menu: the Stratum repository and all modules in one table, installing and removing modules (modules, with a freshly updated package list), and stratum status (checks that the repository is active and working). Requires stratum-banner.
stratum-license license setting The Stratum license of the computer. A hardware ID (from the DMI product UUID, the machine ID and the MAC address – the license stays valid while two of the three match) and a license request code (also as QR code) to send to Stratum. The license is a text file signed by Stratum (Ed25519, checked offline) with level, features (e.g. support) and validity including a grace period; entered in the menu by pasting the license code or importing the file. Other modules ask it with stratum license check <feature>. Setting the clock back does not make an expired license valid again: the license uses the latest of the system clock, the date of the signed APT repository metadata and the latest time seen before (/var/lib/stratum/license/clock, kept up to date daily by stratum-license-clock.timer); stratum license clock shows them, status warns when the system clock is behind.
stratum-repos repos setting APT repositories in deb822 format, chosen in two checklists: repositories – binary packages first, source packages (deb-src) at the bottom – and components – main, contrib, non-free, non-free-firmware. Ships the official Debian repositories of the system's release (e.g. trixie, trixie-updates, trixie-security, trixie-backports; on Debian 14 the forky ones) and the Stratum repository (always on; only its source packages can be switched off); own repositories as definition files in /etc/stratum/repos.d. Official Debian 13 and 14 only.
stratum-security security service fail2ban bans addresses that fail to log in too often (with nftables). Settings in the menu: type of computer (workstation, server, hypervisor, vm-guest), ban time, failures before a ban, window, longer repeated bans, protected services (only installed ones: SSH, recidive, nginx, Apache, Dovecot, Postfix), whitelist (never banned; suggests the local networks), banned addresses (ban / unban) and events – SSH logins and failed logins, bans, sudo and Docker containers that crashed, ran out of memory or became unhealthy – the last 24 hours in a few lines. A separate list SSH and system hardening (off by default): SSH keys only, root only with a key, SSH login limits, network and kernel sysctl. Lock-out protection: open SSH connections go on the whitelist, risky changes (e.g. keys only without any key) are refused unless confirmed, SSH changes are undone automatically unless confirmed within 120 seconds. Own fail2ban configuration stays.
stratum-support support service Remote support from Stratum – only with a license that has the feature support. A session opens an encrypted SSH reverse tunnel to the Stratum relay (relay and its host key come from the signed license; nothing is opened in the firewall) and shows a session code to give to support. Support gets a temporary user with the support keys of the license and sudo; every terminal session is recorded and can be followed live; after the chosen time (1–24 h) or at once with end session, all access is removed. Diagnostic report of Stratum and the system, optionally anonymized. Requires stratum-license.
stratum-telemetry telemetry setting Preview – only the user interface; nothing is collected, stored or sent. Planned: a short daily report of the installation to the Stratum project in three levels, freely chosen – no license needed: disabled (default: telemetry off, nothing is sent), basic (versions, modules, Debian release, architecture) and extended (also numbers about use and health). stratum telemetry show prints the report as it would look, on the screen only. Never sent: host names, addresses, users, keys, file or log contents, names of containers or sites, license data. Replaces the reserved package stratum-telemetric.
stratum-upgrade upgrade profile Automatic daily package upgrades with unattended-upgrades. Profiles: complete – all packages (security updates and package updates); security – security updates only (default); turn-off – no automatic upgrades. Never reboots automatically. Official Debian 13 and 14 only.
stratum-watchdog watchdog service Checks the key parts of the system and restarts what has failed – in two layers: key services (ssh, cron, rsyslog, chrony/timesyncd, fail2ban, Docker, containerd) are restarted by systemd itself (their own policy or a Stratum drop-in with Restart=on-failure), and a timer runs checks every minute: failed services, SSH (runs and answers), cron, journal, time synchronisation, network and DNS, disk space and read-only file systems, out-of-memory kills, APT/dpkg, required reboots, kernel I/O errors, Stratum modules, Docker and unhealthy containers, SMART/RAID – plus own checks in /etc/stratum/watchdog.d/. A problem is repaired when it persists (restart, then checked again), at most 3 times per hour; then it needs attention: events (stratum watchdog events, also in stratum security events and the support report), journal, a line in the MOTD, optional e-mail or webhook. Settings: type of computer, interval, restart limit, disk limits, cleanup of a full disk, notification, hardware watchdog (off). Never reboots, never touches the network, never starts services you stopped yourself, no repairs while apt/dpkg works; pause / resume for maintenance.
stratum-wireguard wireguard service WireGuard mesh network: one computer coordinates the mesh – it creates it and invites computers with a one-time code (stratum wireguard join SWG1:… on the new one; no keys copied by hand). The member list is served through the tunnel and fetched every minute; members connect to each other directly (also behind NAT, with hole punching) and, when that is not possible, through the coordinator (relay). Members, last handshake and path (direct / relay), ping, removal, member names in /etc/hosts (<name>.<mesh>), settings: endpoint, port, trust of the mesh, relay, keepalive, MTU. With stratum-firewall: UDP port, traffic from the mesh, relay. Networks behind a member (files in /etc/stratum/wireguard/routes.d) are routed through the mesh; overlapping networks are refused.
stratum-zram zram service Compressed swap in RAM (zram), created by Debian's systemd-zram-generator – no conflict with Debian packages. Settings in the menu: type of computer (workstation, server, small, hypervisor, vm-guest – each with sensible defaults), memory for zram (GB or auto), swappiness (low, medium, high, maximum), compression (normal lz4 / higher zstd) and disk swap as reserve – the existing one, or /var/swapfile of at most 4 GB. zram always has the highest swap priority: it is used first, disk swap only when zram is full.

In the stratum menu every row shows NAME, TITLE, TYPE, STATE (green ● running / active, yellow ○ stopped / inactive, red ● e.g. mismatch or unsupported), BOOT and PROFILE. The types:

  • service – runs and can start at boot: STATE running or stopped, BOOT enabled or disabled; in the menu: start / stop, enable / disable and the settings (e.g. zram, firewall, security, docker); some settings open their own dialog (e.g. the firewall rules or the Docker applications). A change that could cut the SSH connection asks Keep or Roll back – without an answer it is undone automatically – and a risky change shows a warning first (Apply anyway).
  • setting – a configuration that is applied or not: STATE active or inactive; in the menu: enable / disable and profile, or – for repos – directly its checklists repositories and components. The first row, stratum, is the Stratum repository itself: active when it is configured for the system's release, Enter shows its full status.
  • profile – always applied, only the profile is chosen; selecting the row opens the profile choice directly (e.g. banner, upgrade).
© skraba.net · stratum/start.1793117408.txt.gz · Last modified: 27.10.2026 16:10