How to install DockServer on a Proxmox LXC container¶
This guide will take you through how to prepare Proxmox to install DockServer on an LXC.
- This guide assumes you already have Proxmox installed and working. These instructions arw working on 6.4-6
- Do not use Debian as the Linux image. Networking is shocking and dies after a day or so due to NIC namespace. This guide was written for Ubuntu 20.04
- Apparmour must be disabled and deleted. If not, Authelia will fail at the password hashing stage.
- Your LXC must be a privileged container. Unpriviliged containers do not allow GPU passthrough which is needed for Plex transcoding.
- If you have local drives that you wish to mount, there are a couple of extra lines required in the xxx.conf file.
- These are the settings that I have set which I have found work well. Your own millage will vary depending on your setup.
- Download Ubuntu template. Recommended version is Ubunto 20.04 Standard.
- Create a new LXC container:
- General tab:
- Give the container a name in the 'Hostname' field.
- Remove the tick from 'Unprivileged container'.
- Set the password and confirm the password you wish to use for CLI access.
- Template tab:
- Choose the Ubuntu template.
- Root Disk tab:
- Set the disk size high enough to handle all DockServer apps. Allow room for expansion. I personally have this set to 500Gb.
- CPU tab:
- Add the number of cores that you want assigned to the LXC. Remember, you will probably have Plex installed in Docker, along with multiple other apps all demanding processing power. I personally have this set to 6 cores.
- Memory tab:
- Set the memory and swap size accordingly. Bear in mind the previous comment regarding number of CPU cores. I personally have this set to 8192MiB for both Memory and Swap.
- Network tab:
- Uncheck 'Firewall'.
- 'IPv4' and 'IPv6' - I set these both of these to DHCP and then reserve the MAC address in my routers DHCP server.
- DNS tab:
- Leave this tab alone.
- Confirm tab - check your settings and select 'Finish'.
IMPORTANT NOTE - DO NOT START THE CONTAINER YET!¶
Before starting the container, you need to set the following on the Options, Features tab:
Run the steps on the following guide to pass through the GPU (my own system is an Intel GPU so I followed each step exactly without any changes and everything worked): https://forums.plex.tv/t/pms-installation-guide-when-using-a-proxmox-5-1-lxc-container/219728
NOTE: the above steps worked for Proxmox 6 however with changes to cgroup to cgroup2, the lxc conf file stated:
lxc.cgroup.devices.allow = c 226:0 rwm lxc.cgroup.devices.allow = c 226:128 rwm lxc.cgroup.devices.allow = c 29:0 rwm lxc.autodev: 1 lxc.hook.autodev:/var/lib/lxc/100/mount_hook.sh
lxc.cgroup2.devices.allow: a 227 lxc.cap.drop: 228 lxc.cgroup2.devices.allow: c 226:0 rwm 229 lxc.cgroup2.devices.allow: c 226:128 rwm 230 lxc.cgroup2.devices.allow: c 29:0 rwm 231 lxc.autodev: 1 232 lxc.hook.autodev: /var/lib/lxc/112/mount_hook.sh
Mounting external NFS Drives¶
- In Datacenter, Storage add your NFS external drives.
- Open a shell from the node.
- Replace 120 with the container number:
- Add the following line('s) as appropriate to the drives you wish to gain access to:
You can now start the container
How to Disable and Delete Apparmour:¶
Once the container is up and running and you have logged in:
- Stop Apparmour service:
systemctl stop apparmor
- Disable Apparmor from starting on system boot:
systemctl disable apparmor
- Remove Apparmor package and dependencies:
apt remove --assume-yes --purge apparmor
Now your LXC is ready to continue the install of DockServer