Project: Frigate NVR in Docker with go2rtc, Intel OpenVINO detection and sensible recording retention

Discuss Network Video Recording Hardware and Software Solutions
Post Reply
User avatar
ZerOne
Site Admin
Posts: 216
Joined: Sun Dec 13, 2020 8:21 am

A practical first install of Frigate on a Linux box with Docker. It follows the official Getting started, Recording and camera-specific pages as at October 2026 (Frigate 0.18.2). I have not tested every step on every hardware combination, so please check the linked docs for details and post corrections.

What you need
  • A Linux host (the docs walk through a minimal Debian 12 server) with Docker Engine installed from the official apt repository, not Docker Desktop.
  • An Intel CPU/GPU if you want the OpenVINO detector in this example. Other hardware (Coral, Hailo, Nvidia and so on) uses a different detector block; see the Frigate hardware page.
  • IP cameras with an RTSP stream, ideally with a low-resolution substream for detection and a high-resolution stream for recording.
  • Fast storage for recordings (surveillance-rated disk) and a second network or VLAN for the cameras.
1. Folders and docker-compose.yml

Code: Select all

mkdir -p frigate/config frigate/storage
cd frigate
touch docker-compose.yml
The starter compose file from the docs (amd64) looks like this. I have added the Intel GPU device line from the hardware acceleration step:

Code: Select all

services:
  frigate:
    container_name: frigate
    restart: unless-stopped
    stop_grace_period: 30s
    image: ghcr.io/blakeblackshear/frigate:stable
    volumes:
      - ./config:/config
      - ./storage:/media/frigate
      - type: tmpfs
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
    ports:
      - "8971:8971"
      - "8554:8554"
Start it with docker compose up -d. On first start Frigate creates an admin user and prints the password in the container logs (docker logs frigate). Log in at https://your-server:8971 and change the password. Check the installation page for shared memory (shm) sizing, which depends on the number and resolution of your cameras.

2. Add a camera

The easiest route in current versions is the UI: Settings > Global configuration > Camera management > Add Camera. If you prefer YAML, a minimal config for one camera with separate detect and record streams, hardware decoding and the OpenVINO detector looks like this:

Code: Select all

mqtt:
  enabled: False

detectors:
  ov:
    type: openvino
    device: GPU

model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  path: /openvino-model/ssdlite_mobilenet_v2.xml
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt

cameras:
  front_yard:
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://USER:PASS@CAMERA_IP:554/SUBSTREAM_PATH
          roles:
            - detect
        - path: rtsp://USER:PASS@CAMERA_IP:554/MAINSTREAM_PATH
          roles:
            - record
    detect:
      enabled: True
    record:
      enabled: True
Stream paths are brand-specific, and some cameras (Reolink in particular) work better with http-flv. See the camera-specific page. Use a dedicated low-privilege camera user and keep the credentials out of anything you paste online.

2b. Optional: restream through the bundled go2rtc

Frigate bundles go2rtc, which can restream each camera once so that Frigate (and its live view) share one connection to the camera. The pattern used in the Frigate camera docs is to define the stream in the go2rtc section and then point the camera input at the local restream:

Code: Select all

go2rtc:
  streams:
    front_yard:
      - rtsp://USER:PASS@CAMERA_IP:554/MAINSTREAM_PATH
    front_yard_sub:
      - rtsp://USER:PASS@CAMERA_IP:554/SUBSTREAM_PATH

cameras:
  front_yard:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/front_yard
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/front_yard_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
The Live view docs say the best live quality and fluency needs the bundled go2rtc configured. It is also the route to two-way talk on supported cameras and doorbells.

3. Retention that will not fill the disk

The Recording docs include ready-made profiles. "Reduced storage" (only keep video with motion) looks like this:

Code: Select all

record:
  enabled: True
  motion:
    days: 3
  alerts:
    retain:
      days: 30
      mode: motion
  detections:
    retain:
      days: 30
      mode: motion
The "most conservative" profile instead keeps all footage for 3 days with continuous retention. Recordings are written straight from the camera stream without re-encoding, so the disk use is roughly camera bitrate times retention time. To keep one special clip, export it instead of lengthening retention for the whole camera.

4. Motion masks

Use the Debug view with motion boxes to find areas that constantly trigger (timestamps, trees). Draw a motion mask over them. The docs warn that motion masks only stop motion from starting detection. They do not hide objects from the detector, so they are not a way to ignore a zone completely.

5. Home Assistant

Frigate has its own Home Assistant integration and uses MQTT for events, so enable mqtt in the Frigate config and point it at your broker once the basics work. Follow the integration docs, since the install steps have changed over the years.

Security checklist
  • Cameras on an isolated VLAN or the second NIC, no internet access, no default passwords.
  • Only publish the authenticated port (8971). Do not forward ports to the internet. Use a VPN.
  • Enable automatic OS security updates (the Frigate getting-started page shows how for Debian).
  • Back up the config folder.
Links
Question for the group: what detector and hardware are you running Frigate on, how many cameras does it handle, and what recording retention have you settled on?
Post Reply

Return to “IP Network Video Recorder Discussion”