Master Frigate in 2025: The Ultimate 7-Step Setup Guide
Ready to build a powerful, local AI security camera system? Our ultimate 7-step guide shows you how to master Frigate NVR setup in 2025, from hardware to Home Assistant.
David Chen
A smart home enthusiast and DIY tinkerer with a passion for open-source software.
Tired of subscription fees and privacy concerns with your cloud-based security cameras? It’s time to take back control. Meet Frigate, the open-source Network Video Recorder (NVR) that uses local AI object detection to create a truly smart, private, and powerful security system. This isn't just another recording tool; it's the brain of your home surveillance.
This guide is your definitive roadmap to getting Frigate up and running in 2025. We'll cut through the complexity and walk you through a complete setup, step-by-step.
Step 1: Choosing Your Frigate Hardware
Before you can do anything, you need a machine to run Frigate. The magic of Frigate is its AI object detection, which requires a specific piece of hardware called a detector. Your choice here significantly impacts performance, power consumption, and cost.
The CPU vs. GPU vs. Coral TPU Debate
Frigate offloads the heavy lifting of AI analysis to a detector. You have three main options, each with its own pros and cons.
Feature | CPU Detection | GPU Detection (NVIDIA) | Google Coral TPU |
---|---|---|---|
Inference Speed | Slow (100-1000ms+) | Fast (15-50ms) | Very Fast (5-15ms) |
Power Consumption | Low (uses existing CPU) | High | Very Low (2-4W) |
Cost | Free (if CPU is sufficient) | High ($150+) | Moderate (~$60) |
Setup Complexity | Easy | Moderate (NVIDIA drivers) | Easy to Moderate |
Best For | 1-2 low-FPS cameras, testing | High-end multi-purpose servers | Dedicated, efficient Frigate setups |
The 2025 Verdict: For 95% of users, a Google Coral TPU (either USB or M.2) is the undisputed champion. It provides incredible performance for a tiny power and cost footprint. It allows you to run Frigate on a low-power mini PC (like a Beelink N100 or a used Dell Optiplex) and still handle multiple high-res cameras with ease.
Step 2: Laying the Foundation with Docker
Frigate is distributed as a Docker container. This simplifies installation and dependency management immensely. If you don't have it already, you'll need to install Docker and Docker Compose.
On a Debian-based system like Ubuntu or Home Assistant OS, the process is straightforward. Open your terminal and run:
# Install Docker
sudo apt-get update
sudo apt-get install docker.io -y
# Install Docker Compose
sudo apt-get install docker-compose -y
# Add your user to the docker group to avoid using sudo
sudo usermod -aG docker $USER
# You will need to log out and back in for this to take effect!
Step 3: Organizing Your Folders for Success
Proper organization from the start will save you headaches later. Frigate needs a place to store its configuration, database, and media files. Let's create a standard directory structure.
# Create a main directory for all your docker configs
mkdir ~/docker
# Create the frigate-specific directory
cd ~/docker
mkdir frigate
cd frigate
# Create the folders Frigate needs
mkdir config
mkdir media
Your structure should now look like this:
~/docker/frigate/
├── config/
└── media/
Frigate will automatically create its SQLite database inside the `config` folder. The `media` folder is where recordings and snapshots will be stored, so ensure it's on a drive with plenty of space!
Step 4: Crafting Your Initial config.yml
This is where the magic happens. Frigate is controlled by a single configuration file named `config.yml`. Create this file inside your `~/docker/frigate/config` directory.
First, let's also create the `docker-compose.yml` file in `~/docker/frigate`. This file tells Docker how to run Frigate.
# In ~/docker/frigate/docker-compose.yml
version: "3.9"
services:
frigate:
container_name: frigate
privileged: true # Required for Coral TPUs
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "256mb" # Optional: increase if you have many high-res cameras
devices:
- /dev/bus/usb:/dev/bus/usb # Required for USB Coral TPU
# - /dev/apex_0:/dev/apex_0 # For PCIe Coral TPU
# - /dev/dri/renderD128 # For Intel Quick Sync
volumes:
- /etc/localtime:/etc/localtime:ro
- ./config/config.yml:/config/config.yml:ro
- ./media:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "8554:8554" # RTMP
- "8555:8555/tcp" # WebRTC
- "8555:8555/udp" # WebRTC
Now, for the main event. Here is a barebones `config.yml` to get you started. Place this in `~/docker/frigate/config/config.yml`.
# In ~/docker/frigate/config/config.yml
mqtt:
enabled: False # We'll enable this later for Home Assistant
database:
path: /config/frigate.db
detectors:
coral:
type: edgetpu
device: usb
cameras:
# We will add a camera here in the next step
back_garden:
enabled: False # Placeholder
Key Takeaways So Far
- Hardware is Key: A Coral TPU is the most efficient choice for AI detection.
- Docker is Your Friend: It standardizes the setup and makes updates a breeze.
- Structure Matters: A clean folder structure (`config`, `media`) is essential.
- Compose First: The `docker-compose.yml` file defines *how* Frigate runs, while `config.yml` defines *what* it does.
Step 5: Adding and Configuring Your Cameras
Now it's time to connect Frigate to your cameras. You'll need the RTSP stream URL for each camera. You can usually find this in your camera's admin panel or through a quick online search for your camera model.
The Magic of Substreams
A critical concept for an efficient Frigate setup is using substreams. Nearly all IP cameras provide multiple video streams:
- Main Stream: High resolution (e.g., 1080p, 4K) for clear recordings.
- Sub Stream: Low resolution (e.g., 640x480) for everything else.
We will configure Frigate to use the low-resolution substream for detection. This dramatically reduces the CPU/detector load, as analyzing a smaller image is much faster. The high-resolution main stream will be used for recording, ensuring you have crystal-clear footage of any events.
Let's update our `config.yml` with a real camera, using separate stream roles:
# ... (mqtt, database, detectors sections remain the same)
cameras:
back_garden:
enabled: True
ffmpeg:
inputs:
- path: rtsp://user:password@192.168.1.100:554/stream1 # Main stream (high-res)
roles:
- record
- path: rtsp://user:password@192.168.1.100:554/stream2 # Sub stream (low-res)
roles:
- detect
detect:
width: 640
height: 480
fps: 5
record:
enabled: True
retain:
days: 7
mode: motion
snapshots:
enabled: True
Replace the `rtsp://...` paths with your camera's actual URLs. Now, from your `~/docker/frigate` directory, you can start Frigate for the first time!
sudo docker-compose up -d
Navigate to `http://YOUR_SERVER_IP:5000` and you should see the Frigate UI with your camera feed!
Step 6: Eliminating False Positives with Zones & Masks
Out of the box, Frigate will detect objects anywhere in the frame. This can lead to false positives from a neighbor's yard or a public sidewalk. We fix this with zones and masks.
- Masks: Completely ignore motion in a specific area. Perfect for blocking out rustling trees or a busy road.
- Zones: Define specific areas of interest. You can then trigger recordings or notifications only when an object enters a particular zone (e.g., your driveway, but not the sidewalk).
You can easily define these in the Frigate UI under the "View" tab for your camera. Click "Show Options" and then "Mask & Zone creator." Draw your shapes, and Frigate will generate the coordinates for you to copy into your `config.yml`.
Here's how it looks in the config:
# ... inside your 'back_garden' camera config
motion:
mask:
- 0,0,1280,0,1280,100,0,100 # Example: Blocks the top 100 pixels
zones:
driveway:
coordinates: 500,500,800,500,800,700,500,700 # Example: A box
objects:
- person
- car
Step 7: Bringing It All Together with Home Assistant
Frigate is powerful on its own, but it becomes a smart home superstar when integrated with Home Assistant. This allows for rich notifications, automations, and a unified dashboard.
- Enable MQTT: In your `config.yml`, enable MQTT and point it to your Home Assistant's MQTT broker (like the Mosquitto add-on).
- Install the Frigate Integration: In HACS, add the Frigate integration. During setup, it will ask for your Frigate host URL.
- Enjoy the Entities: The integration automatically creates a camera entity, motion sensors, object detection sensors, and more for each camera.
Now you can create automations like:
- "When a person is detected in the driveway zone after 10 PM, turn on the porch lights."
- "When a package is detected, send a notification to my phone with a snapshot."
This is where Frigate truly transforms from a simple NVR into an event-driven security powerhouse.
You've Mastered the Basics! What's Next?
Congratulations! You've successfully deployed a state-of-the-art, local-first AI security system. You've tackled hardware, Docker, configuration, and integration. You now have a solid foundation to build upon.
From here, you can explore advanced features like the high-accuracy Frigate+ models, setting up 24/7 recording, or creating complex Blueprints in Home Assistant. The world of smart, private security is now yours to command. Happy tinkering!