Skip to main content
Community Scripts logo
Skip to Content
Tools & Add-onsPVE Tools

frigate-support

Prepare an LXC container for Frigate by passing GPU, framebuffer and USB device nodes into it through an autodev hook.

frigate-support.sh adds an lxc.hook.autodev entry to a container's configuration. At every start of the container the hook copies a fixed set of host device nodes into the container's /dev, which Frigate needs for hardware decoding and USB accelerators. It is not listed on the website.

Source: tools/pve/frigate-support.sh.

Run

In the Proxmox VE host shell, as root:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/frigate-support.sh)"

Prompts

PromptInputEffect
This will Prepare a LXC Container for Frigate. Proceed (y/n)?y / nn exits.
"Select a container to add support:" (radio list of all containers)One containerThe container to change. The list is shown again until one is selected; leave with Ctrl+C.

Devices

Major:minorDevice (comment in the script)
1:1mem
29:0fb0
188:*ttyUSB*
189:*bus/usb/*
226:0card0
226:128renderD128

What it changes

In /etc/pve/lxc/<id>.conf the script removes every line that contains autodev and appends:

lxc.autodev: 1
lxc.hook.autodev: bash -c '<hook>'

The hook searches /sys/dev/char for the devices above and copies each device node and its /dev symlinks (from udevadm info) into the container's root filesystem.

Reboot the container to apply the change.

Undo

Remove the two lines from /etc/pve/lxc/<id>.conf and restart the container.

Environment variables

VariableDefaultPurpose
COMMUNITY_SCRIPTS_CORE_URLhttps://raw.githubusercontent.com/community-scripts/core/mainBase URL the script loads api/api.func from.

Limits

  • The script only passes devices in. It does not install Frigate or any driver.
  • It does not check whether the container is privileged.
  • 1:1 gives the container access to the host's /dev/mem.
  • Devices are copied when the container starts. A USB device plugged in later appears only after the next container start.
  • An existing lxc.autodev or lxc.hook.autodev line is replaced.
  • A scratch file named CTID.conf is left in the directory you started the script from.