Manual installation and configuration of NVIDIA drivers on a Proxmox VE 9 host, plus the LXC wiring needed to expose the GPU to one or more containers. Covers driver install, persistence service, optional NVENC patch and the per-container setup.
Note
Targeted at Proxmox VE 9 (Debian Trixie). PVE 7 (Bullseye) and PVE 8 (Bookworm) are no longer covered.
Check whether the open-source nouveau driver is already blacklisted:
cat /etc/modprobe.d/blacklist.confIf blacklist nouveau does not appear, add it and reboot:
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
update-initramfs -u -k all
reboot
Post-install tools may already have configured the repositories. Inspect the existing sources first and skip changes that are already in place; do not create duplicate entries.
Otherwise, on a vanilla PVE 9 install with no enterprise subscription:
nano /etc/apt/sources.list.d/proxmox.sourcesMake sure it contains the no-subscription source for Trixie:
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpgAnd the Debian sources at /etc/apt/sources.list.d/debian.sources:
Types: deb
URIs: http://deb.debian.org/debian/
Suites: trixie trixie-updates
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Types: deb
URIs: http://security.debian.org/debian-security/
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpgapt update && apt dist-upgrade -yInstall the build tools and kernel headers needed to compile the NVIDIA kernel module:
apt-get install -y git
apt-get install -qqy pve-headers-$(uname -r) gcc makeChoose a driver branch that supports your GPU and running kernel. The newest branch may not support older GPU models; check NVIDIA’s supported-products list for the chosen release:
https://download.nvidia.com/XFree86/Linux-x86_64/latest.txtHeads up
Replace latest.txt in the URL with the version number to find the installer file ending in .run. The full driver list is at:
https://download.nvidia.com/XFree86/Linux-x86_64/
Throughout the rest of this guide, replace <VERSION> with the actual version (for example 580.95.05).
mkdir -p /opt/nvidia
cd /opt/nvidia
wget https://download.nvidia.com/XFree86/Linux-x86_64/VERSION/NVIDIA-Linux-x86_64-VERSION.run
chmod +x NVIDIA-Linux-x86_64-VERSION.runRun the installer. The option below can disable nouveau if necessary; installation may need a reboot before it can finish:
./NVIDIA-Linux-x86_64-VERSION.run --no-questions --ui=none --disable-nouveau
rebootAfter the host comes back, run the installer again to compile and install the kernel module:
/opt/nvidia/NVIDIA-Linux-x86_64-VERSION.run --no-questions --ui=noneEdit the modules-load configuration:
nano /etc/modules-load.d/modules.confAdd the NVIDIA modules needed for host/LXC use. VFIO modules are for VM passthrough and are not required for this LXC setup:
nvidia
nvidia_uvmSave (Ctrl+X) and rebuild initramfs:
update-initramfs -u -k allSo that /dev/nvidia* device nodes are created when the modules load:
nano /etc/udev/rules.d/70-nvidia.rules# /etc/udev/rules.d/70-nvidia.rules
KERNEL=="nvidia", RUN+="/bin/bash -c '/usr/bin/nvidia-smi -L'"
KERNEL=="nvidia_uvm", RUN+="/bin/bash -c '/usr/bin/nvidia-modprobe -c0 -u'"Save (Ctrl+X).
The persistence daemon keeps the GPU initialized when no other application is using it. This reduces repeated initialization latency and preserves GPU-initialization state between clients:
cd /opt/nvidia
git clone https://github.com/NVIDIA/nvidia-persistenced.git
cd nvidia-persistenced/init
./install.sh
rebootVerify the driver is loaded and the service is running after reboot:
nvidia-smi
systemctl status nvidia-persistenced
NVENC session limits depend on the GPU model and driver version; consult NVIDIA’s support matrix rather than assuming a fixed limit by GPU generation. The keylase patch removes the software limit for supported driver versions. It can help encoding workloads such as Plex or Jellyfin transcoding.
cd /opt/nvidia
git clone https://github.com/keylase/nvidia-patch.git
cd nvidia-patch
./patch.sh
The patch must be re-applied after every driver update. The keylase repo also includes patch-fbc.sh for the FBC (frame buffer capture) limit if you need it.
On the host:
ls -l /dev/nv*
Note the major numbers — they vary between systems. Typical values:
| Device | Typical major |
|---|---|
/dev/nvidia0, /dev/nvidiactl | 195 |
/dev/nvidia-uvm, /dev/nvidia-uvm-tools | 509 (varies) |
/dev/dri/* | 226 |
/dev/nvidia-modeset | 195 (shares with nvidia) |
Stop the container first if it's running. Open its config file (replace <CTID> with the container ID):
nano /etc/pve/lxc/CTID.confComment out any pre-existing lxc.cgroup2.devices.allow or /dev/dri lines that conflict, then append the NVIDIA wiring (adjust the major numbers to match what ls -l /dev/nv* showed on your host):
lxc.cgroup2.devices.allow: c 195:* rwm
lxc.cgroup2.devices.allow: c 509:* rwm
lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file
Save (Ctrl+X) and start the container.
Important
The kernel module is already loaded by the host — the container only needs the userland libraries that match the same driver version:
mkdir -p /opt/nvidia
cd /opt/nvidia
wget https://download.nvidia.com/XFree86/Linux-x86_64/VERSION/NVIDIA-Linux-x86_64-VERSION.run
chmod +x NVIDIA-Linux-x86_64-VERSION.run
./NVIDIA-Linux-x86_64-VERSION.run --no-kernel-moduleReview the prompts and keep this installation limited to user-space libraries. Do not build or install a kernel module inside the LXC.

nvidia-smi
ls -l /dev/nv*
You should see the GPU listed and the device nodes mounted into the container's filesystem.
Enable NVIDIA hardware acceleration in Plex or Jellyfin, start a video transcode and check its dashboard or logs for actual GPU use. Installing the driver alone does not enable acceleration in the application.


Repeat section 5 for each additional container that needs GPU access. Keep the user-space driver libraries in every container aligned when the host driver is updated.
If Docker already runs inside the LXC, install nvidia-container-toolkit there to expose the GPU to its Docker containers. GPU access from the LXC must work first. The following commands are for a rootful Docker installation:
apt-get update
apt-get install -y ca-certificates curl gnupg
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor --yes -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -fsSL https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' > /etc/apt/sources.list.d/nvidia-container-toolkit.list
apt-get update
apt-get install -y nvidia-container-toolkit
nvidia-ctk runtime configure --runtime=docker
systemctl restart dockerThese commands configure NVIDIA’s repository, install the toolkit, configure the Docker runtime and restart Docker. LXC device permissions and cgroup restrictions still apply; verify GPU use with a test workload.
nvidia-smi works on the host but reports "No devices found" in the container: check device mounts, permissions and matching driver libraries. If versions differ, install the host’s <VERSION> in the container with --no-kernel-module.uname -r using apt-get install pve-headers-$(uname -r), or the equivalent proxmox-headers package for that kernel../patch.sh from /opt/nvidia/nvidia-patch and review its output.systemctl status nvidia-persistenced and enable the service if intended. Also inspect kernel and driver logs; a stopped persistence daemon is not the only possible cause.ls /dev/nv* shows no NVIDIA devices: check the bind-mount entries and host device paths. Use ls -l /dev/nv* on the host to verify NVIDIA major numbers, then check the lxc.cgroup2.devices.allow rules and permissions.