Forgejo

Appearance

Make haypack comfortable for you.

Theme
Font
Contrast
Text size
Layout

Saved in this browser. No cookies.

MariaDB

MariaDB server from Debian, reachable on localhost only

mariadb LXCVM

Add to a guest

In the guest as root – container and VM alike:

update --add-modules mariadb

Runs a normal update and installs the module on the way.

From the Proxmox node, without logging in:

pct exec <ID> -- update --add-modules mariadb   # container
ssh root@<IP> update --add-modules mariadb

Choose when creating a guest

Without a dialog, on the Proxmox node:

IAC_NONINTERACTIVE=1 var_modules=auto-update,mariadb \
  bash -c "$(curl -fsSL https://haypack.dev/<app>/ct.sh)"

var_modules replaces the app's preselection – keep auto-update in the list if you want it. Interactive: choose “advanced” in the dialog, or tick the module in the generator on the app page.

Remove

update --remove-modules mariadb

Removes the module's packages, services, firewall rules and configuration again. Data stays. Apps that require the module keep it – it cannot be removed there.

Details

MariaDB from Debian (trixie: version 11.8), reachable on localhost only – meant for the app in the same guest. Apps that need a database list the module in their iac.json and create their database and user themselves; the password is a secret of the instance in /etc/iac/settings.env. root logs in through the socket, without a password.

mariadb                                      # SQL console as root
mariadb -e 'SHOW DATABASES'

Data: /var/lib/mysql. iac does not touch the configuration – own settings go into /etc/mysql/mariadb.conf.d/90-local.cnf, then systemctl restart mariadb.

With the module backup, every database is dumped every night before the backup (/var/backups/iac/db/mariadb.sql).

When the module is removed, the service stops – the data stays.