Proxmox LXC Templates and Containers
In order to create a Proxmox LXC Container, we first need to download the templates. If you want to check out a full list of images go to https://linuxcontainers.org/ Take note that Proxmox doesn’t show all of these images.
These containers are also very small. Check out the size of this Ubuntu container:
![Ubuntu container size](https://techstuff.leighonline.net/wp-content/uploads/2024/01/image-5.png)
You can read more here: https://pve.proxmox.com/wiki/Linux_Container
Download an LXC template
Click on your Proxmox cluster name, e.g. PVE01 and type:
![proxmox shell](https://techstuff.leighonline.net/wp-content/uploads/2024/01/image-2.png)
pveam update
Next, type the below command to check out all of the available images. TurnkeyLinux images are preconfigured images with e.g. Drupal, Joomla, etc. System images are your “base” images:
![proxmox available images](https://techstuff.leighonline.net/wp-content/uploads/2024/01/image-3.png)
pveam available
Next, download your desired image, such as:
![proxmox downloading image](https://techstuff.leighonline.net/wp-content/uploads/2024/01/image-4-1024x236.png)
pveam download local ubuntu-23.10-standard_23.10-1_amd64.tar.zst
And now we can create an LXC container using the LXC image we just downloaded.
Creating a user
After we created an LXC container, we can log onto it using the Proxmox Shell. But what if you want to SSH into it using the root user? By default, sshd_config will not allow you for security reasons. You will keep getting the “Access Denied” error.
So let’s add a new user and add it to the sudo group:
adduser myuser
--check if the user was created
cat /etc/passwd | grep myuser
--get the UID and GID of the user
id myuser
--add this user to the sudo group
usermod -aG sudo myuser
--you should see the sudo and myuser groups now
groups myuser
Next, SSH using this new user.