In this tutorial, we’re going to look at how to install Plex on Proxmox with Hardware Acceleration. This process will utilize an LXC container for Plex on Proxmox which keeps the resource usage extremely low.
If you want hardware acceleration working, you must have a CPU with an iGPU and must have the Plex Pass (you cannot use hardware transcoding without it).
NOTE: A lot of the screenshots below are using an lxc-jellyfin container instead of lxc-plex, but the process is the exact same for Plex and that is just the container’s hostname.
How to Install Plex on Proxmox
Follow the steps below to install Plex on Proxmox. We’ll configure an LXC container, modify the host, and then configure Plex.
Configuring the Plex LXC Container
These steps will configure the LXC container we’ll use to install Plex on Proxmox.
1. Select the local storage, then CT Templates, then Templates, and search for and download the ubuntu-22.04-standard LXC container template.
2. Select Create CT in the top right of Proxmox to create a new container. Give the container a hostname, enter a password, and uncheck Unprivileged Container. We’ll use a privileged container for NFS.
3. In the Template section, select the Ubuntu template.
4. Set a total disk size, CPU, and Memory. For reference, I am using 20GB, 2 CPU Cores, and 2GB of Memory.
5. In the Network tab, set IPv4 and IPv6 to DHCP (unless you want to use a static IP address – generally, I set static IP addresses on my DHCP server).
6. Select Finish and make sure the Container doesn’t start after creation.
Proxmox Host iGPU Drivers & Modifications
The container for Plex on Proxmox is configured, but we need to make a few host changes. This is going to be difficult as the drivers you need to install will depend on the type of CPU and iGPU you’re using. These drivers are for an Intel N100 processor.
1. Access the Shell on Proxmox and run the commands below to install the packages we’ll need:
vainfo: This will test to ensure the GPU drivers are installed and functioning.
apt install vainfo -y
Intel Drivers: We’ll add the non-free repo to add the Intel drivers needed, and then install the Intel iGPU drivers. Keep in mind that if you aren’t using an Intel CPU (or even possibly if you’re using an older/newer Intel CPU than I am), this might be different.
apt install software-properties-common -y
add-apt-repository -y non-free
apt install intel-media-va-driver-non-free -y
2. With both installed, run the command below to confirm the iGPU drivers are installed properly. If they are, you should see supported profiles and entrypoints.
vainfo
3. Next, we have to modify the LXC container to pass through the iGPU from the host to the container. Run the command below substituting your Container ID (you can see it in the Proxmox host – mine is 100).
nano /etc/pve/lxc/[ID].conf
4. At the bottom of the LXC Container’s config file, add the three lines below. These will pass the iGPU to the Container.
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.hook.pre-start: sh -c "chown 0:108 /dev/dri/renderD128"
Installing Plex & Passing Through Media
Before we can install Plex on Proxmox, there’s one final step we have to do to pass our media. Edit the features (Container > Options > Features > Edit) and enable NFS (or SMB/CIFS if you’d rather use that). This option is only required if you’re passing through media from an external server. I’ll be using NFS for this tutorial.
1. After those changes have been made, start the container and login with the root user and the password you specified. Then, run the command below to update the operating system.
apt update && apt upgrade -y
2. After the system is updated, we are going to run a few commands to ensure that the iGPU is passed through to the container. Running this command should return the same results as it did on the host.
apt install vainfo -y
vainfo
3. Next, we’re going to install Plex but before we do, we have to add the Plex repositories. To do this, we’ll utilize curl so curl must be installed, then the repositories must be added and finally, we can install Plex.
apt install curl gnupg -y
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
Finally, update the packages and install Plex.
apt update
apt install plexmediaserver
Now that Plex on Proxmox is installed, we must mount our media. This can be done by using an NFS or SMB share, but I’ll be utilizing a Synology NAS and an NFS share in this step.
1. Configure the proper NFS permissions for the folder that you’d like to share with your Plex server. If you have to find the IP address of the LXC container, you can run the ip addr
command below to access it.
ip addr
2. Run the commands below to create a directory where your media will exist and install the NFS tools.
mkdir /Media
apt install nfs-common -y
3. Next, mount the media to the /Media folder we created and ensure that it works as expected.
NOTE: This step will be different for you depending on where the data will exist, but it lives in the /volume1/Media folder on my Synology NAS.
mount [IP_ADDRESS]:[FOLDER_LOCATION] /Media
4. If this works as expected, you should be able to list the files in the /Media folder and return your media.
NOTE: You must have a static IP address for your container to ensure the NFS permissions persist.
ls /Media
5. Finally, we’ll edit the fstab file to ensure the NFS share mounts on boot.
nano /etc/fstab
6. In this file, you’ll have to enter your NFS path, as well as the folder location it should mount to.
NFS_MOUNT /Media nfs defaults 0 0
7. As long as this is done properly, you can reboot the container and you should see the media mounted on boot!
Configuring the Plex Application
Now that Plex is configured and our media has been mounted, we can configure the application. Access Plex by navigating to the IP address of the LXC Container and port 32400.
http://[LXC_IP]:32400/manage
1. Select a Name for your Plex server, then select Next.
NOTE: If you’d like to access media outside of your local network, I’d suggest port forwarding directly rather than using UPnP as this setup suggests.
2. Add your media files by selecting the content type, and then the location where that data exists. After you add them all (you might have to add multiple for Movies, TV Shows, etc), select Next.
3. Select Done to finish setting up the server!
9. Unlike applications like Jellyfin on Proxmox, Plex will automatically attempt to use hardware acceleration if it’s available. Just keep in mind that you’ll need the Plex Pass in order for it to work!
Troubleshooting Hardware Transcoding
If you run into an issue with hardware transcoding, you might have a permission issue with passing through the GPU (or you don’t have the Plex Pass). This solution to this problem was found in this Reddit thread.
In the Plex LXC Container, run this command to get the group ID of the render group. In mine, the ID is 108.
getent group render
If yours is different, you must update this line in the LXC configuration file. Run the command below to open the file.
nano /etc/pve/lxc/[ID].conf
Update this line and replace 108 with the ID of your render group. Save the file, reboot, and the hardware acceleration should work.
lxc.hook.pre-start: sh -c "chown 0:108 /dev/dri/renderD128"
Conclusion & Final Thoughts
This tutorial looked at how to configure Plex on Proxmox with Hardware Acceleration. If you’re using a Proxmox host that has an iGPU and you’re interested in running a media server, this is a great way to accomplish that. The performance is great and hardware transcoding in an LXC container simply works and works well.
Thanks for checking out the tutorial on how to configure Plex on Proxmox. If you have any questions, feel free to leave them in the comments!
Hi Frank,
I am stuck at these lines/errors:
The command: /etc/apt/sources.list.d/plexmediaserver.list yields this error: No such file or directory.
The command: apt install plexmediaserver yields this error: Unable to locate package plexmediaserver.
What am I doing wrong? (I have Proxmox on a mini-PC with N100 processor).
Greetings Pieter
Are you running this command as one big command? If you’re running it as two commands, it should be one complete command:
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
After doing that, you should be able to install it.