How to Use Frigate: The Beginner's Guide to Self-Hosted AI Camera Security

CodexFuse Team · 2026-10-31T15:09:54.399Z · 12 min read min read

Learn how to use Frigate, the free self-hosted NVR with local AI object detection. Docker Compose install, first camera, Coral vs CPU detectors, zones, and remote HTTPS viewing — no monthly fees.

How to Use Frigate: The Beginner's Guide to Self-Hosted AI Camera Security

Learning how to use Frigate is the fastest way to escape the monthly fees of cloud cameras without giving up smart detection. Frigate is a free, open-source network video recorder (NVR) that runs as a Frigate Docker install in a container on your own server and uses local AI to spot people, cars, animals, and packages in your camera feeds — no footage ever leaves your home. If you can run Docker and edit a YAML file, you can run Frigate. This Frigate NVR guide is also a complete Frigate tutorial: the first Docker Compose install, your first camera, the Coral-vs-CPU detection rule, and viewing everything securely from anywhere.

What Is Frigate?

Frigate is a self-hosted NVR (network video recorder) with real-time, on-device AI object detection. Frigate detection happens entirely on your own hardware: unlike cloud cameras that stream your video to someone else's servers for a monthly fee, Frigate processes everything locally. Your IP cameras feed RTSP streams into a Docker container, Frigate decodes the video, runs object detection on each frame, and saves snapshots, video clips, and 24/7 recordings to your own disks. It can send alerts through MQTT — most famously into Home Assistant — and its web UI gives you a live camera wall, a review timeline, and an export tool. Because all processing is local, there is no subscription, no upload bill, and no privacy trade-off: your camera streams never leave your network.

The one rule before you start: only monitor cameras you own or have explicit permission to watch. Surveillance laws vary by country and state — pointing a camera at a neighbor's window or a public sidewalk can be illegal where you live. Check your local rules first.

How to Use Frigate: The 7-Step First Setup

This is the complete beginner arc: Docker Compose install, first RTSP camera, first detection, zones, and remote viewing. Every step is covered in detail below — here is the map.

  1. Prepare a server. Any always-on machine on your network works — an old desktop, a mini PC, a NAS, or a VPS. Frigate runs best with Docker on bare-metal Debian-based Linux.
  2. Write your docker-compose.yml with the shared-memory size set correctly — the step almost everyone skips.
  3. Write config.yml with your first camera and its RTSP stream.
  4. Start Frigate and grab the admin password from the container logs.
  5. Open the web UI and verify detection on the live feed.
  6. Draw zones and masks so passing cars stop triggering alerts.
  7. Enable recordings and put HTTPS in front so you can review footage and watch from anywhere safely.

What You Need Before You Start

You need three things: a server that stays on, Docker, and at least one IP camera that supports RTSP. The server can be a home mini-PC or a VPS — just make sure it has enough disk for recordings (a single 1080p camera at modest settings can fill tens of gigabytes a week). If you are new to containers, read our Docker beginner guide first; Frigate is a Docker container and the whole setup assumes you can run docker compose. Your camera must expose an RTSP stream — check the manual or the camera brand's support pages for the RTSP URL format, because the path part differs by brand (for example, Reolink, Tapo, and Hikvision all use different paths).

Step 1: Write the Docker Compose File

Create a folder for Frigate and put this docker-compose.yml inside it — the Frigate install is a single Docker Compose service. The image is published on GitHub Container Registry as ghcr.io/blakeblackshear/frigate:stable, and the current release at the time of writing is v0.18.2 (released October 15, 2026 — check the Frigate GitHub releases page for anything newer).

services:
  frigate:
    container_name: frigate
    privileged: true
    restart: unless-stopped
    stop_grace_period: 30s
    image: ghcr.io/blakeblackshear/frigate:stable
    shm_size: "512mb" # update for your cameras
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./config:/config
      - ./storage:/media/frigate
      - type: tmpfs
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "8971:8971"   # authenticated UI and API
      - "8554:8554"   # RTSP restream
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp
    environment:
      FRIGATE_RTSP_USER: "admin"
      FRIGATE_RTSP_PASSWORD: "your-camera-password"

Two things to notice. First, port 8971 is the authenticated UI and API — this is the port reverse proxies should use. Port 5000 is the internal unauthenticated UI, and the official docs warn you to keep it off the network; that is why the example above does not expose it. Second, the FRIGATE_RTSP_PASSWORD environment variable is how you keep your camera password out of the config file — Frigate substitutes {FRIGATE_RTSP_PASSWORD} placeholders at runtime.

Step 2: The shm_size Rule — Frigate's Most Common Beginner Crash

If Frigate dies with a "Bus error" seconds after starting, you almost certainly skipped shm_size. Frigate stores decoded frames in shared memory (/dev/shm), and Docker's default shared memory is only 64MB. The official documentation states Frigate needs about 210MB for 2 cameras detecting at 720p — so the default 64MB is not even enough for one real setup. The example compose file above sets shm_size: "512mb", which comfortably covers a small 2–4 camera home. Scale it up as you add cameras; the exact formula keys off your detect resolution, not the camera's full resolution, which is why running a lower-resolution sub-stream for detection saves a lot of memory.

Step 3: Configure Your First Camera

Create config/config.yml next to the compose file. A minimal working config needs just one camera:

mqtt:
  enabled: false

detectors:
  cpu1:
    type: cpu

cameras:
  front_door:
    ffmpeg:
      inputs:
        - path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.50:554/stream1
          roles:
            - detect
            - record
    detect:
      width: 1280
      height: 720
    objects:
      track:
        - person
        - car
        - dog

The {FRIGATE_RTSP_USER} and {FRIGATE_RTSP_PASSWORD} placeholders pull from the environment variables you set in the compose file — never write the real password in this YAML. Note the two roles: detect tells Frigate to run AI detection on this stream, and record tells it to save recordings. The official docs note that environment-variable substitution only works for variables starting with FRIGATE_ and only where the config reference marks it as supported — RTSP paths are one of those places.

Step 4: Start Frigate and Get the Admin Password

From the Frigate folder, run:

docker compose up -d
docker compose logs -f frigate

On first startup Frigate generates a random admin password and prints it in the logs — that is your login for the web UI. Change it after logging in under Settings > Users. If the container exits with "Bus error", go back to the shm_size step. If a camera shows as offline in the UI, the RTSP URL is wrong nine times out of ten — test the stream in VLC first; if VLC cannot play it, Frigate cannot either.

Coral TPU vs CPU: Picking Your Detection Engine

Frigate runs object detection through a detector — the hardware-and-model backend that runs inference. By default it uses a single CPU detector, and the official docs are blunt about it: the CPU detector is not recommended for actual use. It works for 1–2 cameras as a starting point, but inference is slow and CPU usage climbs fast. Here is how the real options compare:

DetectorHardware neededBest forNotes
CPUNoneTesting with 1–2 camerasNot recommended for real use; OpenVINO in CPU mode performs better
Coral EdgeTPUGoogle Coral USB, M.2, or PCIe stick3–10 cameras at low powerThe classic choice; needs ~10ms inference to keep up since it runs one model instance
OpenVINOIntel iGPU/CPU/ArcIntel mini-PCs, no extra hardwareEfficient on integrated Intel graphics
ONNX (Nvidia)Nvidia GPU + stable-tensorrt imageMany cameras, fastest inferenceGPUs run concurrent model instances, so ~30ms still keeps up with several cameras

The practical rule: start on CPU to prove your cameras work, then add a Coral TPU if you grow past two cameras. A Coral USB stick is the homelab classic because it sips power while handling many cameras — you pass it into the container with a device mapping like /dev/bus/usb:/dev/bus/usb and set the detector type: edgetpu. A Frigate Coral TPU setup needs inference around 10ms to keep up, since the chip runs a single model instance. If you already have an Nvidia GPU in the box, use the :stable-tensorrt image tag with an ONNX detector instead. Note the official docs' warning: multiple detector types cannot be mixed for object detection — pick one engine.

Inference time is not the whole story. The docs explain that a GPU can run several model instances at once, so ~30ms per inference can still serve many cameras, while a Coral runs a single instance and therefore needs inference around 10ms to keep up. That is why a Coral feeding 5 cameras at 10ms can outperform a CPU crawling at 100ms+ on one.

go2rtc: The One-Connection Trick

Frigate ships with go2rtc built in. It restreams your camera once and lets Frigate consume that single local stream for detection, recording, and the web UI — instead of opening three or four separate connections to a camera that may only allow one or two. If your camera feed is flaky or drops under load, routing it through go2rtc usually stabilizes it. The official docs have a dedicated go2rtc configuration chapter; for beginners the takeaway is simple: if streams are unreliable, enable go2rtc restreaming before blaming Frigate. One syntax gotcha to remember: inside go2rtc stream definitions, use {FRIGATE_VAR} placeholder syntax for credentials — never ${FRIGATE_VAR}.

Zones and Masks: Stop the False Alerts

A Frigate camera setup is not finished until you have drawn zones. A zone is a polygon on the camera image — "the driveway", "the porch" — and Frigate can alert only when objects enter or loiter in it. Without zones, every car passing on the street becomes an event. Masks are the inverse: areas Frigate should ignore entirely, like a tree that sways in the wind or a neighbor's doorway. The official docs have full chapters on both, and the getting-started guide treats them as part of the standard first configuration, not an advanced extra. Spend fifteen minutes on zones after your first camera works — it is the single biggest quality-of-life upgrade in Frigate.

Review vs Recordings: How Frigate Organizes Footage

Frigate splits what it saves into two ideas. Recordings are the continuous 24/7 timeline of video segments, stored under /media/frigate/recordings. Review items are the interesting time periods — since Frigate 0.14, overlapping activity gets bundled into a single review item, so two people and a car passing at the same time appear as one item instead of four separate events. The Review page shows them on a vertical timeline as bandwidth-friendly preview videos; hover to play, click for the full-resolution clip. Note the dependency: recordings must be enabled before you can review activity in the UI. The official docs recommend a 1GB tmpfs mount at /tmp/cache because recording segments are written there before being converted to MP4 and moved to permanent storage — it keeps disk I/O sane.

View Your Cameras Securely from Anywhere

Never expose port 8971 directly to the internet. The safe pattern is a reverse proxy with HTTPS in front of Frigate — point the proxy at the 8971 port (the authenticated one), and add a real TLS certificate. Our Caddy beginner guide shows the fastest way to get automatic HTTPS on a domain, and the Frigate docs have a dedicated TLS chapter for the certificate side. If you would rather avoid opening any port at all, a private mesh VPN is the alternative — our WireGuard beginner guide shows how to reach your home server over an encrypted tunnel with nothing exposed publicly.

Frigate and Home Assistant: Notifications on Person Detection

The Frigate-plus-Home-Assistant combo is the reason many people install it. The Frigate Home Assistant integration is first-party: Frigate publishes every detection as an MQTT message, and Home Assistant consumes those messages for automations. The pattern: enable MQTT in config.yml (it is disabled in the minimal example above), point both Frigate and Home Assistant at the same broker, and install the Frigate integration in Home Assistant. Then you can automate anything — "when a person is detected at the front door after midnight, turn on the porch light and send a phone notification." The official Frigate docs distinguish the two Home Assistant pieces clearly: the integration connects Home Assistant to Frigate, while the Home Assistant App is a way to run Frigate itself inside Home Assistant — you need the integration either way.

Frigate vs Shinobi: Which Self-Hosted NVR Should You Pick?

Shinobi is the other big open-source NVR beginners compare against. Here is the honest breakdown:

FrigateShinobi
AI object detectionBuilt in, real-time, local (person/car/animal/package)Not built in — needs plugins or external processing
Install modelSingle Docker containerDocker container or bare-metal Node.js
Config styleOne YAML file, heavily documentedWeb UI driven, many menus
Hardware accelerationCoral TPU, Nvidia GPU, Intel OpenVINO, go2rtc restreamingGPU passthrough for decode; detection via add-ons
Home AssistantFirst-party integration + MQTTCommunity integrations
Best forSmart detection-first setupsSimple multi-camera recording dashboards

If your goal is "tell me when a person is at my door" with zero cloud, Frigate is the pick. If you just want a grid of recording cameras with minimal configuration, Shinobi is simpler. This guide covers the Frigate path because detection is where the value is.

7 Beginner Mistakes to Avoid

MistakeWhat happensFix
Skipping shm_sizeContainer exits with "Bus error"Set shm_size: "512mb" (more for many cameras)
Camera password in config.ymlSecret sits in a world-readable fileUse {FRIGATE_RTSP_PASSWORD} + compose environment
Detecting on the full 4K streamCPU melts, frames dropDetect on a 720p sub-stream; record on the main stream
Exposing port 5000Unauthenticated UI on your networkOnly expose 8971 (authenticated), behind HTTPS
No zones drawnAlerts for every passing carDraw zones; mask trees and neighbors
Recordings disabledReview page is emptyEnable recordings — review depends on them
Running in a VM without passthroughCoral/GPU invisible, CPU detection onlyBare metal preferred; pass devices through if virtualized

Sources

  • Frigate official installation docs (v0.18.x) — Docker Compose template, shm_size guidance, ports 8971/5000/8554/8555, /tmp/cache tmpfs recommendation
  • Frigate official object-detector docs — CPU/Coral/OpenVINO/ONNX detector types, "not recommended for actual use" CPU note, no-mixing-detectors rule, 10ms Coral vs 30ms GPU inference guidance
  • Frigate official config reference — {FRIGATE_RTSP_PASSWORD} environment-variable substitution, FRIGATE_-prefix rule
  • Frigate official authentication docs — random admin password printed in logs on first startup, change under Settings > Users
  • Frigate official review docs — review items vs events (0.14+), timeline previews, recordings-required-for-review rule
  • Frigate GitHub releases — v0.18.2 released 2026-10-15 (checked 2026-10-31)
  • corelab.tech Frigate 0.17 setup guide (updated 2 days before this article) — :stable-tensorrt image tag, ONNX detector on Nvidia, {FRIGATE_VAR} go2rtc syntax, SHM formula keyed on detect resolution
  • ASUS AI Router Frigate guide — first-login random password flow, port 5000 internal-unauthenticated warning

Frequently Asked Questions

Is Frigate really free? What is the catch?

Frigate is fully free and open source — there is no paid tier, no per-camera license, and no subscription. The "cost" is your own hardware: a server that stays on, disk space for recordings, and optionally a Coral TPU if you run many cameras. That is the whole point of the no-subscription model — you pay once for hardware instead of monthly for cloud.

Can Frigate run on a Raspberry Pi?

Yes, with limits. A Pi can run Frigate in Docker for 1–2 cameras, ideally with a Coral USB TPU handling detection so the Pi's CPU is not doing inference. For more cameras, an x86 mini-PC with an Intel iGPU (OpenVINO) or an Nvidia GPU is a better fit. Bare-metal Linux is strongly preferred over virtualization.

Do I need a Coral TPU to use Frigate?

No — Frigate works out of the box with CPU detection for testing or 1–2 cameras. The official docs do not recommend the CPU detector for real use, though. The practical upgrade path is: prove your cameras on CPU, then add a Coral USB stick (type: edgetpu) when you grow past two cameras, or use OpenVINO on Intel hardware or ONNX on an Nvidia GPU if you already have that hardware.

How do I watch Frigate cameras when I am away from home?

Put a reverse proxy with HTTPS in front of Frigate's authenticated port 8971 (never expose the unauthenticated port 5000), or reach your home network over a private VPN like WireGuard so nothing is exposed publicly. Both patterns are covered above.

Does Frigate work with Home Assistant?

Yes — Home Assistant has a first-party Frigate integration. Enable MQTT in Frigate's config, connect both to the same broker, and you get cameras, binary sensors, and events inside Home Assistant for automations like lights and phone notifications on person detection.

Featured on Twelve Tools Launch Llama Tools Launch your MCP