Skip to main content

AlmalinuxOS LXC Installation

On the Proxmox web interface, click on the image-20250531211759646 button to create a new LXC (Linux container).

proxmox view

Fill the form with the hostname, passwords and the tag, then click on Next

image-20250531212605350

Then choose the almalinux image and click on Next

image-20250531212219502

Set the disk configuration and click on Next

image-20250531212757016

Keep a single CPU and click on Next

image-20250531212859155

Set the RAM at 1024MB and the SWAP at 512MB and click on Next

image-20250531213026196

Set the network at vmbr4 corresponding to the DMZ interface and check DHCP on IPv4, then click on Next

image-20250531213219760

Set the Domain to infrasi.lan and keep the DNS to the default value, then click on Next

image-20250531213354761

Click on Finish to validate the configurations and create the LXC

image-20250531213509856

When it is finished, you can close the window

image-20250531213620589

Now we can see our newly created LXC appear, and going to Network, we can take note of its MAC address to add it to the static leases in the DMZ DHCP on pfSense

image-20250531213843177

To add it to the static leases, go to Services > DHCP Server > DMZ and click on Add at the bottom of the page, then fill the form like the following image

image-20250531214521723

Then you can click on console button and then on start button to start the LXC. When the system has booted, log in as root with the password provided in the creation form.

image-20250531214738003

Now that we are logged in, we can run the initial setup script:

#!/bin/bash

# update all packages and upgrade system
dnf update -y && dnf upgrade -y
# install basic and usefull packages
dnf install -y vim git wget bind-utils net-tools openssh-server

# add manager user with sudo privileges and modify the password
adduser manager
usermod -aG wheel manager
passwd manager

# start SSH server and enable it at boot
service sshd start && systemctl enable sshd

The only thing to do will be to type the manager's password when asked. All the rest is automatic.

After the upgrade from Almalinux 9.4 to Almalinux 9.6, reboot the LXC with the reboot command.

Now the LXC is setup and accessible via SSH using the IP address specified in pfSense.

image-20250531215935772