We have installed quite a few LXC container services as part of our Build your own Homelab series, but as time goes on, we need to start thinking of keeping those containers and their services up to date. This article will focus on the two different ways we can update LXC containers that was installed via helper-scripts.com. This will not include any services that was installed on a VM, but with a VM, one would probably need to update services via their official update processes. As for an LXC container, we have two ways of updating the service. But before we look at those, we have the most important step to follow
Step 1: Backup your LXC container
We will go into a lot more detail about backing up your LXC containers and VM’s in Proxmox in the future, but for now we do need to backup our LXC container. The beauty of a backup is that if something goes wrong, we can just restore and we are back where we started. This makes the backup step crucial. Please also remember to take a backup, and not a snapshot. We will go into more detail about these two later, but for now we need to get our backup sorted.
If you are not in your Proxmox window yet, please open Proxmox and log in. Once logged in, expand Datacenter in the left navigation pane, then expand the Proxmox node we have updatable LXC containers in. Select the container we want to update and in the middle navigation pane, select Backup. From the window that opens, select Backup Now to create a new backup. Give it a description that would make sense for you and create the backup. Depending on the size of the container, this might take a few minutes. Once completed we are ready to update the container in one of two ways.
Option 1: Full Install Script
For this option, we first need to get the full install script command again. We are going to update our Crafty Controller Minecraft Server LXC container, so we need to visit helper-scripts.com and search for Crafty Controller. Here we can get the full install command again: bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/crafty-controller.sh)"

helper-scripts.com page for Crafty Controller
Back in Proxmox, open the Console for the LXC container we want to update. Normally, when installing a new LXC, you would open the Shell of the Promox node, but for updating we need the console of the installed LXC Container. Paste the command and press enter.

Full install command being run from the updatable LXC Container
A confirmation will be shown with three options. Either select Yes (Silent Mode) or Yes (Verbose Mode) to update the service. Verbose mode will show you more information as the update continues and is the preferred and recommended way. This way, should one part fail, you will be aware of it and call roll back to your backup.

Confirm update of LXC container
The update will complete in a timely manner, depending on the size and complexity of the service.

Update completed – in our case no update was necessary
Option 2: The short, easy command
The other option might be a bit easier. Again log in to the console of the updateable LXC container. But this time, in stead of getting the full install command, just type update and press enter. Yes, that’s it.

To update, type update and press enter
The same update confirmation will appear:

Confirm update of LXC container
We are again going with the Verbose Mode as this gives us a bit more information. Once completed you will be shown all the relevant information about the update:

Updating Technitium DNS LXC in our Proxmox Environment
Conclusion
And as easy as that we can update our services running in LXC containers in our Proxmox environment, provided they were installed via helper-scripts.com. Although updating services running in VM’s is not as quick and easy, a VM can run multiple services in one instance. Yes, an LXC container can also run multiple services in one container, but normally we run one service that contains many underlying services. Whichever way you pick to update your LXC (or VM), please remember to create a backup before updating!






