Using LXC Containers with Proxmox
I have been looking for a more stable way to run several core applications in my homelab. Previously I have used TrueNAS + Truecharts. However this setup has become very time consuming to manage with the constant changes to TrueCharts. My wiki, homebridge server, and homepage generator deserved better.
I chose LXC Containers over running straight docker containers because I could integrate backups of the LXC Containers with my Proxmox Backup Server. WHile most of these apps were also backed up in other places, having a quick way to restore or move these services to another pve host was a huge benefit.
Then I found these set of awesome Proxmox Helper Scripts that had the potential to simplify management even further. Huge shoutout to tteck and the contributors of this amazing project.
Install LXC Container via script
My proof of concept was migrating my wikijs wiki to an LXC Container. This was a very simple deployment.
- Logon to Proxmox node via the GUI. This is preferred over SSH according to the scripts.
-
Paste and run the install script:
1
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/wikijs.sh)"
-
I used some advanced settings:
-
Once the install completed, I can view the wikijs app as directed. Wikijs Install Complete
Updating LXC Container
Updating LXC Containers is very easy. You can either run the same install command as above. Alternatively, you can connect to the LXC Container and run an update command.
1
2
3
4
5
```bash
root@pve2:~# pct enter 3000 #Proxmox ID of LXC Container
root@wikijs-test:~# update
```
This setup has already saved me a lot of time and headache. A future improvement will be automating the updating of LXC containers with Ansible playbooks. Coming up, I’ll talk about how I added an easy nginx proxy in front of some of my LXC services to handle TLS certificate management.