← All articles
SECURITY Frigate NVR: Self-Hosted Security Cameras with AI Ob... 2026-02-09 · frigate · nvr · security-cameras

Frigate NVR: Self-Hosted Security Cameras with AI Object Detection

Security 2026-02-09 frigate nvr security-cameras ai home-assistant

Your Ring doorbell uploads every clip to Amazon's cloud. Your Nest cameras feed Google's servers 24/7. You pay a monthly subscription for the privilege of watching footage that lives on someone else's infrastructure, processed by someone else's algorithms, accessible to someone else's employees. And if the company decides to change pricing, discontinue your hardware, or hand footage over to law enforcement without a warrant — you have no recourse.

Frigate is a self-hosted NVR (Network Video Recorder) with real-time AI object detection. It records your cameras, detects people, cars, animals, and other objects, and keeps everything on your own hardware. No subscriptions, no cloud dependency, no one else watching your footage.

What Makes Frigate Different

Plenty of self-hosted NVR options exist, but Frigate's real-time AI detection is what sets it apart. Most NVRs just record video. Frigate analyzes every frame and identifies what's actually happening:

The AI doesn't just detect motion — it tells you what moved. That means no more phone alerts because a cloud drifted across the sky or a tree branch swayed. You get notified when a person walks up to your door, not when a leaf blows past.

Hardware Requirements

Frigate is designed to run on modest hardware, but the detection performance depends heavily on one component: the Google Coral TPU.

Minimum Setup

Component Minimum Recommended
OS Any Linux with Docker Debian/Ubuntu
CPU 4 cores 4+ cores (Intel with QuickSync)
RAM 4 GB 8 GB
Storage Depends on cameras/retention SSD for database, HDD for recordings
AI accelerator CPU (slow) Google Coral TPU (fast)

The Google Coral TPU

This is the single most important hardware recommendation: get a Google Coral TPU. Without it, each detection inference takes roughly 2000ms on a CPU. With a Coral, the same inference takes about 60ms. That's the difference between missing events and catching them reliably.

Your options:

Type Price Performance Notes
USB Accelerator ~$35 60ms inference Easiest to add, plugs into any USB port
M.2 Accelerator (A+E key) ~$25 60ms inference Fits M.2 slot on Mini PCs and NUCs
M.2 Dual TPU ~$35 30ms inference Two TPUs on one M.2 card, for many cameras
PCIe Accelerator ~$28 60ms inference Full PCIe card, most reliable for always-on use

For most setups with 1-6 cameras, a single USB Coral is plenty. If you're running 8+ cameras, consider a dual M.2 or two USB Corals.

Storage Planning

Continuous recording generates a lot of data. Rough estimates per camera at common resolutions:

Resolution Bitrate Per Day Per Month
1080p (2 MP) 3 Mbps ~32 GB ~960 GB
2K (4 MP) 6 Mbps ~65 GB ~1.9 TB
4K (8 MP) 10 Mbps ~108 GB ~3.2 TB

These numbers assume H.264. H.265 roughly halves the storage requirements at similar quality. Most people use 7-14 day retention for continuous recording and 30+ days for event clips only.

Camera Selection

Frigate works with any camera that supports RTSP, but some cameras work better than others. What to look for:

Popular Compatible Brands

Reolink — Excellent price-to-performance ratio. Their PoE cameras are popular in the Frigate community. The RLC-810A (4K) and RLC-520A (5 MP) are solid choices. Dual-stream support works well.

Amcrest — Good RTSP implementation, wide range of models. The IP8M-T2599E (4K turret) and IP5M-T1179E (5 MP) are frequently recommended.

Hikvision/Dahua — Professional-grade cameras with excellent image quality and full RTSP/ONVIF support. Wider feature set but pricier. Some models have firmware region restrictions to be aware of.

Avoid: cameras that only work through a proprietary app with no RTSP access (most consumer WiFi cameras like Blink, Wyze older models, or Arlo).

Docker Compose Setup

Here's a working Docker Compose configuration with Frigate, an MQTT broker, and a camera:

services:
  mqtt:
    image: eclipse-mosquitto:2
    restart: unless-stopped
    volumes:
      - mosquitto_data:/mosquitto/data
      - mosquitto_config:/mosquitto/config
    ports:
      - "1883:1883"

  frigate:
    image: ghcr.io/blakeblackshear/frigate:stable
    restart: unless-stopped
    privileged: true
    shm_size: "256mb"
    volumes:
      - ./frigate/config:/config
      - /mnt/security/frigate:/media/frigate
      - type: tmpfs
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5000:5000"   # Web UI
      - "8554:8554"   # RTSP restream
      - "8555:8555"   # WebRTC
    devices:
      - /dev/bus/usb:/dev/bus/usb   # USB Coral TPU
    environment:
      FRIGATE_RTSP_PASSWORD: "your_camera_password"

volumes:
  mosquitto_data:
  mosquitto_config:

You'll also need a Mosquitto config file. Create mosquitto/config/mosquitto.conf:

listener 1883
allow_anonymous true
persistence true
persistence_location /mosquitto/data/

Then create your Frigate configuration at frigate/config/config.yml:

mqtt:
  host: mqtt
  port: 1883

detectors:
  coral:
    type: edgetpu
    device: usb

cameras:
  front_door:
    ffmpeg:
      inputs:
        - path: rtsp://admin:{FRIGATE_RTSP_PASSWORD}@192.168.1.100:554/h264Preview_01_main
          roles:
            - record
        - path: rtsp://admin:{FRIGATE_RTSP_PASSWORD}@192.168.1.100:554/h264Preview_01_sub
          roles:
            - detect
    detect:
      width: 640
      height: 480
      fps: 5
    objects:
      track:
        - person
        - car
        - dog
        - cat
    record:
      enabled: true
      retain:
        days: 14
      events:
        retain:
          default: 30
    snapshots:
      enabled: true
      retain:
        default: 30

  backyard:
    ffmpeg:
      inputs:
        - path: rtsp://admin:{FRIGATE_RTSP_PASSWORD}@192.168.1.101:554/h264Preview_01_main
          roles:
            - record
        - path: rtsp://admin:{FRIGATE_RTSP_PASSWORD}@192.168.1.101:554/h264Preview_01_sub
          roles:
            - detect
    detect:
      width: 640
      height: 480
      fps: 5
    objects:
      track:
        - person
        - dog
        - cat
    record:
      enabled: true
      retain:
        days: 7
      events:
        retain:
          default: 30
    snapshots:
      enabled: true

Start everything with:

docker compose up -d

Visit http://your-server:5000 for the Frigate web interface. You'll see live camera feeds, a timeline of events, and a bird's-eye view.

AI Detection Configuration

Zones

Zones let you define specific areas within a camera's view to trigger events. For example, alert on people in your driveway but not on the public sidewalk:

cameras:
  front_door:
    zones:
      driveway:
        coordinates: 0.25,0.6,0.7,0.6,0.7,1.0,0.25,1.0
        objects:
          - person
          - car
      porch:
        coordinates: 0.0,0.3,0.25,0.3,0.25,0.8,0.0,0.8
        objects:
          - person

Coordinates are relative (0.0 to 1.0) to the camera frame. Use the Frigate web UI's built-in mask editor to visually draw zones rather than guessing coordinates.

Motion Masks

Mask areas where constant movement would trigger false detections:

cameras:
  backyard:
    motion:
      mask:
        - 0.0,0.0,0.15,0.0,0.15,0.2,0.0,0.2    # tree in corner

Detection Tuning

Adjust minimum confidence scores to filter out false positives:

objects:
  filters:
    person:
      min_score: 0.5
      threshold: 0.7
    car:
      min_score: 0.5
      threshold: 0.7
    dog:
      min_score: 0.4
      threshold: 0.6

The min_score is the minimum confidence to begin tracking an object. The threshold is the confidence needed before the object is confirmed and an event is created. Start with the defaults and adjust based on your false positive rate.

Home Assistant Integration

Frigate's Home Assistant integration is one of the most mature and well-supported integrations available. It publishes detections over MQTT, and the official Frigate integration turns them into entities you can automate.

Setup

Install the Frigate integration through HACS (Home Assistant Community Store). Once connected, you'll get:

Example Automations

Send a notification with a snapshot when a person is detected at the front door:

automation:
  - alias: "Front door person alert"
    trigger:
      platform: state
      entity_id: binary_sensor.front_door_person_occupancy
      to: "on"
    action:
      service: notify.mobile_app
      data:
        message: "Person detected at front door"
        data:
          image: /api/frigate/notifications/{{trigger.event.data.new_state.attributes.event_id}}/thumbnail.jpg

Turn on porch lights when a person is detected at night:

automation:
  - alias: "Porch lights on person detection"
    trigger:
      platform: state
      entity_id: binary_sensor.front_door_person_occupancy
      to: "on"
    condition:
      condition: sun
      after: sunset
      before: sunrise
    action:
      service: light.turn_on
      target:
        entity_id: light.porch
      data:
        brightness_pct: 100

Log when a car enters the driveway:

automation:
  - alias: "Car in driveway"
    trigger:
      platform: mqtt
      topic: frigate/events
    condition:
      condition: template
      value_template: "{{ trigger.payload_json['after']['label'] == 'car' and 'driveway' in trigger.payload_json['after']['entered_zones'] }}"
    action:
      service: notify.mobile_app
      data:
        message: "Car detected in driveway"

Storage Management

Continuous vs. Event-Only Recording

You have two strategies:

A good middle ground: continuous recording with short retention (7-14 days) and event-based clips with longer retention (30-90 days). This way you have full footage for recent incidents and key event clips for older ones.

Retention Configuration

record:
  enabled: true
  retain:
    days: 14          # keep all continuous recordings for 14 days
    mode: all         # 'all' for continuous, 'motion' for motion-only
  events:
    retain:
      default: 30     # keep event clips for 30 days
      objects:
        person: 60    # keep person events for 60 days
        car: 30

Hardware Acceleration for Recording

Frigate can use hardware-accelerated video decoding to reduce CPU load. Intel QuickSync (available on most Intel CPUs with integrated graphics) is the most commonly used:

ffmpeg:
  hwaccel_args: preset-vaapi

This offloads H.264/H.265 decoding from the CPU to the GPU, freeing up CPU cycles for other tasks. AMD and NVIDIA GPUs are also supported with different presets.

Comparison: Frigate vs. Alternatives

Feature Frigate Blue Iris Ring/Nest UniFi Protect
Price Free $65 one-time $10-20/mo Free (with hardware)
Open source Yes No No No
AI object detection Built-in Plugin required Cloud-based Built-in (limited)
Camera compatibility Any RTSP Any RTSP Ring/Nest only UniFi cameras only
Platform Linux (Docker) Windows only Cloud UniFi hardware
Local processing Yes Yes No Yes
Home Assistant integration Excellent Good Limited Good
Mobile app Via HA or web Yes Yes Yes
Cloud dependency None None Required Optional
Privacy Full control Full control Poor Good
Setup difficulty Moderate Moderate Easy Easy
Recording options Continuous + events Continuous + events Event-only (free) Continuous + events
Hardware requirement Linux box + Coral Windows PC Camera purchase UniFi console + cameras

Frigate is the best option if you want full control, AI detection, and open-source flexibility. The setup requires some technical comfort, but once configured, it runs reliably with minimal maintenance.

Blue Iris is a mature alternative if you're on Windows. It has been around for years and has a dedicated user base. AI detection requires third-party plugins (like CodeProject.AI), adding setup complexity. The $65 one-time cost is fair.

Ring/Nest are the easy choice if you just want to plug something in and have it work. You trade privacy, pay monthly, and accept vendor lock-in. When they change their plans or discontinue hardware, you're at their mercy. Ring has also faced scrutiny over sharing footage with law enforcement without user consent.

UniFi Protect is polished and locally processed, but you're locked into the UniFi ecosystem. You need a UniFi console (Dream Machine, NVR, or Cloud Key), and only UniFi cameras are supported. The cameras are good quality but pricier than alternatives.

The Bottom Line

Frigate is the best self-hosted NVR available today. The combination of real-time AI object detection, broad camera compatibility, excellent Home Assistant integration, and fully local processing makes it the clear choice for anyone willing to invest a weekend in setup.

The practical minimum to get started: a Linux machine (an old PC, a Mini PC, or an existing server), a Google Coral USB TPU, and one or two PoE cameras with RTSP support. Total cost for a two-camera setup is roughly $200-350 in hardware — less than two years of Ring subscriptions.

The trade-off is the initial setup and ongoing self-hosting responsibility. You need to manage your own storage, backups, and updates. But you get something no cloud service offers: complete ownership of your security footage, with AI detection that runs entirely under your control.