Bachelor Tech
  • Home
  • Tutorials
  • Tips
  • Portfolio
  • About Jan
  • Contact Jan

2. Create your first container as a template on Proxmox

by Jan Bachelor October 21, 2025

This guide assumes that you already have a vanilla LXC prepared – for our purposes, it is called ‘galera-template’ with an ID 120 (it runs Debian 13 – Trixie). Have you not created a container before? Here is a guide on how you can create your own without relying on outdated ready-made templates!

What is the plan?

  • To save us work, we will update the LXC to the newest version, install services such as Maria DB that we will need on it without necessarily configuring them in detail.
  • We will then turn the container into a template and create additional nodes from it.
  • We will leave the network settings on DHCP and use our firewall (OPNsense in my case) to set up a static lease for each container later on. If you want to have a static assignment set on the VM, then keep in mind to use your firewall as the gateway (ideally the gateway is deployed with HA as well and the gateway IP is the virtual CARP IP).

Prepare a container that will be used as a template for other Galera nodes
# Start the LXC if not already running
pct start 120

# Log into its shell
pct enter 120

# Perform a system update & upgrade, followed by clean up of older packages.
apt update && apt upgrade
apt upgrade apt -y
apt autoremove

# Install prerequisite packages
sudo apt install -y dirmngr ca-certificates apt-transport-https curl

# Donwload and install a combo of MariaDB server + client + galera with a backup client + firewall + ssh + cron
apt install mariadb-server mariadb-client mariadb-backup galera-4 rsync nano ssh ufw cron fail2ban ncdu -y
  • In case you are still using a root account, let’s create another user that we can use instead:
# Create a user
adduser <username>

# Add the user into the list of admins
usermod -aG sudo jan

# Switch into that user
su jan

1. Galera Cluster - what is it and why is it good for your home set up
3. Create an SST user on your template container
Go back to course overview: Deploy MariaDB Galera Cluster on Proxmox

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 FacebookWhatsappEmail

Course Steps

  1. 1. Galera Cluster - what is it and why is it good for your home set up
  2. 2. Create your first container as a template on Proxmox
  3. 3. Create an SST user on your template container
  4. 4. Security Hardening & Logging on Galera template LXC
  5. 5. Turn the MariaDB container to a template - full vs linked clones?
  6. 6. Deploy 4x LXC containers on 2x Proxmox nodes
  7. 7. Configure Galera on each CT
  8. 8. Configure HAPRoxy for your Galera cluster
  9. 9. Understanding Quorum - When the Raspberry Pi comes in
  10. 10. Set up Monitoring - UpTime Kuma
  11. 11. Entrust your Galera Cluster with data
  12. 12. Beyond the set up - recovery & self-healing options

Other courses

Create an automated Gravity workflow that will allow...

January 19, 2024

Dynamically Populate Gravity Forms from Google Sheets (GSheets...

March 16, 2021

Concur Alternative: Import Employees’ Credit Card Expenses to...

January 19, 2024

Turn your Raspberry Pi into a Proxmox Backup...

July 13, 2025

Install iRedMail Mail Server As Proxmox VM With...

October 31, 2024

Recent Posts

  • How to get LXC containers for Proxmox outside of ready-made templates

  • How to join two Proxmox nodes into a cluster (PVE 8.x)

  • How to Rename a Proxmox Node

Facebook Twitter Instagram Pinterest Linkedin Youtube

All Rights Reserved. The theme was customized from Soledad, see PenciDesign

Bachelor Tech
  • Home
  • Tutorials
  • Tips
  • Portfolio
  • About Jan
  • Contact Jan