I've tried many different apps to monitor my security camera, but i keep on comming back to Frigate and it's free.
- I found the UI of Shinobi counter-intuitive. Also the live-stream was very much delayed. I chose to switch to Frigate again when the Testflight-period expired of the Shinobi-iOS app.
- I used the TTeck Docker script to create the container with:
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker.sh)"
- During the script i chose "Debian 12", hostname "frigate", disable ipv6
- I also chose to make the container "Privileged". This as i intend to give the container access to my GPU.
- I also had to choose the option "enabled fuse OverlayFS". This as my Proxmox host is using ZFS.
- I choose NOT to install "Portainer" or the "Portainer agent"
- I chose to install "Docker Compose"
- Stop the created container
- Make a directory for storage on the proxmox host via the Proxmox shell:
mkdir /root/frigate
- Also in the Proxmox shell configure the mount for storage on the container:
pct set 211 -mp0 /root/frigate,mp=/cctv_clips
- Add an mount to passthrough the GPU:
nano /etc/pve/lxc/211.conf
- Add the following line:
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file 0, 0
. I also had to add the environment variable "LIBVA_DRIVER_NAME" in the docker-compose.yaml file. This to allow my AMD Ryzen 4800H CPU to hardware accelerate video processing. - I chose to remove mounting of USB-devices from the LXC configuration file. This as i will not use that.
- Choose to start the container with:
pct start 211
- Via the Proxmox Web-UI open the console of the created container
- In the console, run:
cd /opt
- Create a docker compose file:
nano docker-compose.yaml
and put this in this file
version: '3.9'
services:
frigate:
container_name: frigate
privileged: true
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "128mb"
devices:
- /dev/dri/renderD128
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/frigate/config:/config:ro
- /cctv_clips:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "1935:1935" # RTMP feeds
environment:
FRIGATE_RTSP_PASSWORD: "myPassword"
LIBVA_DRIVER_NAME: "radeonsi"
- Run:
mkdir -p /opt/frigate/config
- Run:
cd /opt
- Run:
docker compose pull
- Run:
nano /opt/frigate/config/config.yml
- Put this in the file:
mqtt:
enabled: false
ffmpeg:
hwaccel_args: preset-vaapi
detectors:
coral:
type: edgetpu
device: usb
#Global Object Settings
objects:
track:
- person
filters:
person:
min_area: 5000
max_area: 100000
cameras:
FrontCam:
ffmpeg:
inputs:
# High Resolution Stream
- path: rtsp://192.168.22.1:7447/P6C9GcVoZ8mRmYor
roles:
- record
# Low Resolution Stream
- path: rtsp://192.168.22.1:7447/s0Wju46GtlXua3J4
roles:
- detect
detect:
width: 480
height: 360
fps: 24
- Run:
docker compose pull -d
Based on:
Todo: I suspect this also needs to be added to the 211.conf file:
lxc.cgroup2.devices.allow: c 226:128 rwm