What is Frigate?
Frigate is an Open-Source NVR (Network Video Recorder), specially optimized for object detection and Machine Learning. It runs as a Docker container and provides real-time motion detection with very low false positives through AI-based object recognition.
- Open Source and free
- Optimized for Home Assistant
- AI-powered detection (persons, vehicles, animals)
- Low resource consumption
- Web-based interface
Installation
Docker (Standalone)
docker run -d \
--name frigate \
--restart unless-stopped \
-v /path/to/frigate/config:/config \
-v /path/to/frigate/media:/media \
-p 5000:5000 \
-p 8554:8554 \
-p 8555:8555/tcp \
ghcr.io/blakeblackshear/frigate:latest
Docker Compose (recommended)
version: '3.8'
services:
frigate:
container_name: frigate
image: ghcr.io/blakeblackshear/frigate:latest
restart: unless-stopped
volumes:
- ./config:/config
- ./media:/media
ports:
- "5000:5000"
- "8554:8554"
- "8555:8555/tcp"
environment:
FRIGATE_RTSP_PASSWORD: "password"
TZ: Europe/Berlin
Home Assistant Add-on
Frigate can also be installed directly as an add-on in Home Assistant. Search in the HA Add-on Store for "Frigate".
Configuration
Configuration is done via the file config/config.yml. Here is a complete example:
mqtt:
host: 192.168.1.100
port: 1883
client_id: frigate
user: mqtt_user
password: mqtt_password
cameras:
camera_name:
ffmpeg:
inputs:
- path: rtsp://admin:password@192.168.1.50:554/cam/realmonitor?channel=1&subtype=0
roles:
- detect
- record
- path: rtsp://admin:password@192.168.1.50:554/cam/realmonitor?channel=1&subtype=1
roles:
- detect
detect:
width: 1280
height: 720
fps: 5
record:
enabled: true
retain:
days: 7
snapshots:
enabled: true
retain:
default: 7
detectors:
cpu:
type: cpu
objects:
track:
- person
- car
- dog
- cat
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
Important Settings
MQTT (Optional but recommended)
For integration with Home Assistant or other Smart Home systems:
mqtt:
host: 192.168.1.100
port: 1883
client_id: frigate
topic_prefix: frigate
user: your_user
password: your_password
RTSP Port Forwarding
By default Frigate uses port 8554 for RTSP. With Docker this must be forwarded:
ports:
- "8554:8554" # RTSP
- "8555:8555/tcp" # RTSP (TCP)
- "5000:5000" # Web UI
Recording Settings
record:
enabled: true
retain:
days: 7
mode: motion # motion / all / manual
detect:
width: 1280
height: 720
fps: 5
max_disappeared: 25
Adding Cameras
In config.yml under cameras: define a new camera:
cameras:
my_camera_name:
ffmpeg:
inputs:
- path: rtsp://admin:password@192.168.1.50:554/cam/realmonitor?channel=1&subtype=0
roles:
- detect
- record
- path: rtsp://admin:password@192.168.1.50:554/cam/realmonitor?channel=1&subtype=1
roles:
- detect
Find the RTSP URLs in the RTSP Linklist.
TLS/SSL Setup (Optional)
For HTTPS access:
server:
ssl_key_file: /config/ssl.key
ssl_cert_file: /config/ssl.crt
Create Let's Encrypt certificate:
docker run -v /path/to/config:/config \
certbot/certbot certonly --webroot \
-w /config/www \
-d your.domain.com \
--email your@email.com \
--agree-tos --non-interactive