Work in Progress
Homelab Guides
LXC Containers
Description
Download a container template
- In the Proxmox UI, navigate to your
local
storage, then selectCT Templates
from the list view. Press theTemplates
button on the ribbon, then browse through the list and choose a Linux distro, such asdebian-12-standard
Creating a container
- Click
Create CT
on the top right corner of the screen. - Give it a CT ID, a Hostname, and a password. Press the Load Public SSH key, and upload your
workstation's public SSH key (e.g.,
C:\Users\User\.ssh\id_ed25519.pub
) - Follow the rest of the wizard. Set a static IP under Networks, such as
192.168.100.102/24
. - Press Finish, wait for it to be created, then Start the container.
- In the list view select "Console". You should have a login prompt. Enter root as the user name and the password you used.
- You now have a working containerised Linux environment.
Mountpoints
- In the Proxmox UI, navigate to your container, then select
Resources
in the list view, then clickAdd
on the ribbon and chooseMount Point
. - Enter a path that this volume will appear as inside of the container, e.g.
/mnt/test
- Head back to your SSH session, navigate to the path, and you should see a new volume.
- You can use the mount command to verify, e.g.:
mount | grep test
/dev/mapper/pve-vm--201--disk--1 on /mnt/test type ext4 (rw,relatime,stripe=16)
Accessing a container
Proxmox web UI
As listed above, you can access any container via the Console menu option.
Proxmox CLI
If you're in the CLI of the Proxmox server, you can also use the pct enter <CT_ID>
command to access a container. e.g.:
root@proxmox:~ # pct list
VMID Status Lock Name
101 running foobar
root@proxmox:~ # pct enter 101
root@foobar:/#
SSH
If you uploaded your public SSH key during creation, you can also connect via SSH, e.g.:
ssh root@192.168.8.102 -i ~\.ssh\id_ed25519
As mentioned earlier, it is convenient to place the IP address in your SSH config file so that you can connect via just a SSH Host name.
When to use a Container vs VM
Nesting (Docker)
Network mounts (SMB and NFS)
- And using the above in the host and using Mount Points.