Self Host Wizard Docs

Shared MariaDB (mariadb)

Shared MariaDB on a Self Host Wizard box: the mariadb piece, internal only, none sign-in, memory limit 331 MB.

At a glance

FieldValue
Addressnot on the web (reached only by the pieces that need it)
Sign-innone: no office sign-in in front of it
Memory limit331 MB (ram_mb: measured peak × 1.3)
Databasenone shared: it keeps its own data in THX_DATA
Needsnothing
Needed bybookstack, easyappointments, espocrm, freescout
Containersmariadb
Image: mariadbmariadb:11.8.9-noble@sha256:e1d5495f445654134f226f55a41ce0da227116f6f27f283101f405c794d841fc
Licence (from the README)GPL-2.0-only
Upstream (from the README)https://mariadb.org

Turn it on

thx enable adds mariadb and everything it needs to the box's state; thx apply then installs it. Apps are applied only once site_domain is set.

sudo thx enable mariadb
sudo thx apply

Engineering notes (pieces/mariadb/README.md)

MariaDB 11.8.9 (LTS), GPL-2.0-only. Image mariadb:11.8.9-noble (Docker Library), pinned by index digest sha256:e1d5495f…41fc; the index has linux/arm64 (docker buildx imagetools inspect, 2026-11-24). Upstream image, unmodified.

How it is wired

  • Internal only: mariadb:3306 on the thx network; no host port, no web host.
  • For each enabled piece with db = "mariadb", thx apply creates database and user <name> (- → _) with the piece's generated password (SQL on stdin, passwords never in argv); the check logs in as that user. The root password stays in /etc/thx/secrets/mariadb/.
  • Small: innodb_buffer_pool_size=128M, performance schema off, max_connections=60, MARIADB_AUTO_UPGRADE=1 (minor upgrades run mariadb-upgrade on start).

Measured

RAM: measured peak 254 MiB (anon + shmem + kernel from memory.stat, sampled through the whole check.sh docker stage including a 10-client database load; 338 MiB with page cache) × 1.3 = ram_mb 331, mem_limit 331m. Measured 2026-11-25, e2e run 6.

Known gaps

  • No backups here (the backup lane's job).

Facts on this page come from these files in the selfhostwizard repository:

  • pieces/mariadb/piece.toml
  • pieces/mariadb/compose.yaml
  • pieces/mariadb/README.md
  • internal/piece/piece.go

This page is generated from the code at build time, so it changes when the code does.