Install Kodi in an LXC and Connect it to a Monitor / TV with GPU Acceleration

Guides~10 min

Run Kodi inside a privileged LXC container on Proxmox VE, expose the host iGPU and USB input devices, and turn the Proxmox server into an all-in-one media center connected directly to a TV.

Heads up

This guide uses an external community script to bootstrap the Kodi LXC. The GPU side of the setup (passing the host iGPU into the container) is also covered by the ProxMenux automated flow: GPUs and Coral-TPU → Add GPU to LXC in the ProxMenux menu — handles the /dev/dri wiring + driver install inside the CT. The script below additionally bootstraps Kodi itself and the autostart on tty7. Use it if you want a turnkey media-centre LXC; use the ProxMenux flow if you only need GPU access for a CT you set up by hand.

Original Kodi LXC script created by mrrudy.

What you'll do

  1. Create a privileged LXC running Kodi (script-driven).
  2. Wire your USB keyboard, mouse or controller into the CT.
  3. (Optional) Update Kodi from the container’s configured repositories.

1. Create the Kodi LXC

For this recipe, select Privileged in the script’s advanced settings. The script defaults to unprivileged containers, which require appropriate device permissions and ID mapping. It configures GPU access, Kodi and autostart on tty7:

bash -c "$(wget -qLO - https://raw.githubusercontent.com/mrrudy/proxmoxHelper/main/ct/kodi-v1.sh)"

Be patient — it takes a while to install. When it finishes and Kodi starts on tty7, you can plug your monitor or TV directly into the host's HDMI / DisplayPort output and you should see the Kodi UI.

2. Add a keyboard, mouse or USB controller

Input devices live under /dev/input/ on the host. Identify the major number:

ls -l /dev/input
Input devices list

For character devices, use the major number before the comma (in the example: 13). On the host, edit the Kodi LXC's configuration, replacing <CTID> with its ID, for example 102:

nano /etc/pve/lxc/CTID.conf

Add (adjust 13 to what you saw on your host):

lxc.cgroup2.devices.allow: c 13:* rwm
lxc.mount.entry: /dev/input dev/input none bind,optional,create=dir
LXC configuration

Save (Ctrl+X) and restart only the container — no need to reboot the whole Proxmox host:

pct reboot CTID

Plug in the keyboard / mouse / controller and Kodi should respond to it.

3. (Optional) Update Kodi from the configured repositories

Important

The team-xbmc PPA is Ubuntu-only, and Kodi currently states that it is unmaintained. A missing add-apt-repository command does not identify the distribution. Check cat /etc/os-release and look for NAME="Ubuntu"; do not add Ubuntu PPAs to Debian. The commands below update packages from the container’s configured repositories.

Inside the container (pct enter <CTID>):

apt update
apt install --only-upgrade kodi kodi-bin

Restart the container after the update. Kodi will use the version available from its configured repositories, which may differ from the latest upstream release.

Screenshots

Kodi interface 1Kodi interface 2

Troubleshooting

  • Kodi LXC starts but nothing on the TV: the CT may not have inherited the iGPU. Confirm with ls /dev/dri inside the container (you should see card0, renderD128). If empty, the GPU passthrough wasn't applied — re-run the script or use the ProxMenux Add GPU to LXC menu.
  • Keyboard / mouse not detected after restart: check that /dev/input is mounted and device permissions let Kodi read it. Run ls -l /dev/input on the host and in the container, and check the lxc.cgroup2.devices.allow rule.
  • Hardware-accelerated playback uses CPU instead of GPU: install or update VA-API drivers inside the container (intel-media-va-driver for newer Intel iGPUs, i965-va-driver for older ones, mesa-va-drivers on AMD).
  • add-apt-repository: command not found: the command is not installed; this does not prove the container is Debian. Check its distribution and available packages. Use Debian’s Kodi packages on Debian, without adding the Ubuntu PPA.

Further reading

Sponsor

If you would like to support the project.

Support me on Ko-fi

Connect

Join the community discussions on GitHub to get help, share ideas, and contribute to the project. Every idea is welcome!

Join the Discussion

ProxMenux, an open-source and collaborative project by MacRimi.