Frigate NVR

Security cameras part 1

I decided to set up some security cameras to watch the yard.

The video recorder

Being the homelaber that I am, I want to run my own network video recorder rather than paying for the service. After some websearching, I decided to give Frigate a try. The officially recommended way of running Frigate is via Docker on Debian. So Debian it is...

I created a new VM on my home server and gave it 4 gigs of ram, 4 vcpus and 1.5T of disk space. I hope this will be enough.

HOSTNAME                          TYPE  VCPUS  RAM      DISKS.0.SIZE
video                             BHYV  4      4092     1500000

I installed the latest Debian, then installed docker-compose and added my user to the docker group.

Following the Frigate docs, I grabbed the docker-compose.yml file and tweaked it to my liking:

version: "3.9"
services:
  frigate:
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: always
    image: ghcr.io/blakeblackshear/frigate:stable
    shm_size: "128mb" # update for your cameras based on calculation above
    devices:
      - /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions
      - /dev/apex_0:/dev/apex_0 # Passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
      - /dev/video11:/dev/video11 # For Raspberry Pi 4B
      - /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/frigate/config:/config
      - /home/frigate/storage:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "443:8971"
      - "8971:8971"
      # - "5000:5000" # Internal unauthenticated access. Expose carefully.
      - "8554:8554" # RTSP feeds
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp
    environment:
      FRIGATE_RTSP_PASSWORD: "keytothecastle"

... before running

% docker-compose up

The admin user with a random password for the web interface was generated and written to the log. This may or may not have scrolled past me during initialization, but in any event, I found it by running:

% docker logs frigate

The web interface can be accessed via https://video/

The config where I'll add the incoming video streams is in

~/config/config.yaml

Next I need to be able to reach this when I'm away from home...read part 2: Tailscale on OPNsense.