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.
Code: Select all
mkdir -p frigate/config frigate/storage
cd frigate
touch docker-compose.yml
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"
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
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
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
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.
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?