LXC containers are an awesome tool to use when you’ve virtualized your hardware with Proxmox. They are lightweight, use a lot less RAM compared to full virtual machines and are fast to install.
Templates are available to install many common operating systems, even different versions of those operating systems! If you need a quick way to deploy a Linux based operating system, templates will be your friend!
In addition, there are many “turnkey” templates available that allow you to quickly install and deploy not just an operating system, but also an entire application!
This guide will teach you how to add LXC templates to your Proxmox installation.
What Operating System Templates Are Available For Proxmox LXC Containers?
Proxmox is able to automatically download templates for various Linux operating systems. All your expected “flavors” are available, such as Debian, Ubuntu, Fedora, Alpine and others.
To get the current list of available Proxmox LXC templates, you’ll need to SSH into your Proxmox server. You can get a list of all the currently available templates with the following command:
pveam available
You will get an output that looks something like this. This is a list of all the current templates that are available for Proxmox to download.
When it says “system,” that’s an entire operating system. Where it says “turnkeylinux” that’s an operating system plus an application, as stated. Turnkey is the fastest way to deploy these particular applications!
How To Download New LXC Templates For Proxmox?
You can very easily download new templates to your system. This will make that template generally available to deploy in newly installed containers.
pveam download local [imagename]
You would substitute “[imagename]” for the actual name of the template, found in the template list above. For example, if you wanted to download the current Debian operating system, you would run this command:
pveam download local debian-11-standard_11.6-1_amd64.tar.zst
Or, if you wanted to download the latest turnkey WordPress container installation, you would run this command:
pveam download local debian-11-turnkey-wordpress_17.1-1_amd64.tar.gz
The images will take a little bit to download, but once they are downloaded, they will generally be available when you create a new container:
How To Find Out What LXC Templates You Have Installed?
You can get a current list of all the LXC templates that you all ready have on your system.
To locate all your existing LXC templates, run this command:
pveam list local
The output will look something like this:
This shows you which templates you have installed on your system as well as the size of each particular template.
How To Update LXC Templates Installed On Proxmox?
The templates for Proxmox are updated from time to time. Proxmox will essentially cache the list of existing templates.
To update your Proxmox installation’s list of available LXC templates, run this command:
pveam update
Please note, this will not actually update any existing templates you have downloaded onto your system. This only updates the list of available templates.
If you want to update your actual template versions, you will need to download them as shown in the above steps.
How To Remove An Existing Proxmox LXC Template?
If you would like to remove any of the existing templates you have installed on your system, you can also do this through SSH.
To remove an existing template, first, list the currently installed templates:
pveam list local
From here, identify the template(s) you want to remove. As an example, I want to remove the Debian 11.0-1 template. I will run this command:
pveam remove local:vztmpl/debian-11-standard_11.0-1_amd64.tar.gz
You can confirm the template is now removed by running the list command again:
pveam list local
Where To Find The Full Documentation On Proxmox LXC Templates?
This guide pretty much covers everything there is to know about LXC templates and the pveam command.
If you want more, you can find the official Proxmox documentation on the pveam command here.
Wrapping Up LXC Templates For Proxmox
Hopefully you found what you wanted to find in this guide.
Should you have any further thoughts, questions or comments, feel free to slap a comment down below!