Frigate NVR Raspberry Pi 5: Complete Coral USB and Home Assistant Setup Guide

Frigate nvr on raspberry pi 5 with coral usb & home assistant

Frigate NVR Raspberry Pi 5 gives you a self-hosted network video recorder with real-time object detection running entirely on your local network. Frigate runs in Docker, uses the Google Coral USB Accelerator for fast Edge TPU inference, and integrates with Home Assistant to trigger automations when a person, car, or other object is detected on any camera. No cloud subscription, no footage leaving your network, and detection fast enough to be useful in practice. This guide covers Docker Compose deployment, Coral USB setup, Frigate configuration for RTSP cameras, MQTT integration, Home Assistant automation, retention policies, and troubleshooting.

Last tested: Raspberry Pi OS Bookworm Lite 64-bit | May 3, 2026 | Raspberry Pi 5 (8GB) | Google Coral USB Accelerator | Frigate 0.14 | Home Assistant 2024.11

Key Takeaways

  • Frigate 0.14 exposes the web UI on port 8971 and the API on port 5000. The Home Assistant Frigate integration connects to port 5000. Exposing port 8971 to your LAN gives you access to the full dashboard. Do not expose either port to the internet. Use Tailscale or WireGuard for remote access.
  • The shm_size setting in the Docker Compose file allocates shared memory for Frigate’s frame buffers. The required size scales with the number of cameras and their resolution. Too small causes Frigate to crash silently during detection. The formula is roughly 256KB per camera per frame at 1080p. Start at 256MB for a two to four camera setup and increase if crashes occur.
  • The Coral USB Accelerator requires the libedgetpu1-std package installed on the host and the USB device passed through to the container. On first plug-in, the Coral enumerates as a boot device, downloads firmware, then re-enumerates as the Edge TPU. This two-stage initialisation takes 5–10 seconds on first use.

Frigate NVR Raspberry Pi 5: How It Works

Frigate receives RTSP video streams from IP cameras, runs object detection on each frame, and records clips and snapshots when a tracked object is detected. The detection model runs on the Google Coral USB Accelerator’s Edge TPU, which processes inference far faster than the Pi’s CPU and without the thermal cost of sustained CPU load. Detected events are published to an MQTT broker, from which Home Assistant receives notifications and triggers automations.

The architecture has three separate video roles per camera: detect (the stream Frigate runs inference on, typically lower resolution and frame rate), record (the stream stored to disk, typically full resolution), and rtmp (optional re-streaming). Separating these roles means Frigate runs detection at 5 fps on a 720p stream while recording 1080p continuously, keeping both CPU and storage usage reasonable.

Hardware Requirements

The Pi 5 with 8GB RAM is the recommended configuration for Frigate with Coral. The 4GB model works for one to two cameras without Coral or with Coral at lower resolution, but sustained ffmpeg decoding of multiple streams pushes memory usage toward 3GB with Frigate, MQTT, and Home Assistant all running. The 8GB model handles four to six cameras comfortably.

An NVMe SSD via a PCIe HAT or a USB 3.0 SSD is required for the Frigate media directory. Frigate writes continuous video clips and JPEG snapshots for every detected event. Recording even two cameras at 1080p generates sustained write I/O that will wear a microSD card in weeks and produces visible latency in the Frigate dashboard. See Booting Raspberry Pi from USB SSD for storage setup.

Use the official 27W USB-C power supply. The Pi 5 combined with the Coral USB, an SSD, and sustained ffmpeg activity draws 12–18W under load. See Raspberry Pi Power Monitoring via USB for supply verification. Install active cooling. ffmpeg decoding multiple streams is CPU-intensive even with Coral handling inference. See Raspberry Pi 5 Cooling Guide for tested configurations.

Installing Docker and Coral Dependencies

Flash Raspberry Pi OS Bookworm Lite 64-bit using Raspberry Pi Imager. After first boot:

sudo apt update && sudo apt full-upgrade -y

# Install Docker CE
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
sudo apt install docker-compose-plugin -y

Install the Coral Edge TPU runtime on the host. The firmware downloads on first device connection and requires this package to be present:

# Add the Coral repository with the current keyring method
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg \
  | sudo gpg --dearmor -o /etc/apt/keyrings/coral.gpg

echo "deb [signed-by=/etc/apt/keyrings/coral.gpg] https://packages.cloud.google.com/apt coral-edgetpu-stable main" \
  | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list

sudo apt update
sudo apt install libedgetpu1-std -y

Add the udev rules so Docker can access the Coral device without root permissions:

sudo tee /etc/udev/rules.d/99-coral.rules <<EOF
SUBSYSTEM=="usb", ATTR{idVendor}=="1a6e", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
EOF
sudo udevadm control --reload-rules

Plug in the Coral USB Accelerator and confirm it initialises correctly:

# Wait 10 seconds after plugging in, then check
lsusb | grep -i "google\|coral\|1a6e\|18d1"

Expected result: lsusb shows a Google Inc. or Global Unichip Corp. entry. If it shows a different entry on first plug-in, wait 10 seconds and check again. The Coral re-enumerates after firmware load. For the full Coral setup including Python TFLite testing, see Coral TPU Raspberry Pi 5 Setup.

Deploying Frigate with Docker Compose

Create the project directory and storage mount:

mkdir -p ~/frigate/config
sudo mkdir -p /mnt/frigate
# Add your SSD mount to /etc/fstab as /mnt/frigate

Create .env for credentials:

cat > ~/frigate/.env <<EOF
FRIGATE_RTSP_PASSWORD=change_this_camera_password
MQTT_USER=frigate
MQTT_PASSWORD=change_this_mqtt_password
EOF
chmod 600 ~/frigate/.env

Create ~/frigate/compose.yaml:

services:
  frigate:
    container_name: frigate
    image: ghcr.io/blakeblackshear/frigate:stable
    restart: unless-stopped
    privileged: true
    shm_size: "256mb"
    env_file: .env
    devices:
      - /dev/bus/usb:/dev/bus/usb
    volumes:
      - ./config:/config
      - /mnt/frigate:/media/frigate
      - type: tmpfs
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "127.0.0.1:5000:5000"
      - "127.0.0.1:8971:8971"
      - "127.0.0.1:8554:8554"

Binding ports to 127.0.0.1 keeps Frigate off the LAN. Access it locally or through a reverse proxy. The tmpfs cache mount reduces disk writes for the clip processing buffer.

Frigate NVR Raspberry Pi 5 architecture diagram showing cameras RTSP stream Coral TPU detection MQTT broker and Home Assistant

Frigate Configuration

Create ~/frigate/config/config.yml. This is the primary Frigate configuration file. Every camera, detector, and recording policy is defined here.

Minimal working configuration

mqtt:
  enabled: true
  host: 192.168.1.80
  port: 1883
  user: "{FRIGATE_MQTT_USER}"
  password: "{FRIGATE_MQTT_PASSWORD}"

detectors:
  coral:
    type: edgetpu
    device: usb

cameras:
  front_yard:
    ffmpeg:
      inputs:
        - path: rtsp://user:{FRIGATE_RTSP_PASSWORD}@192.168.1.201:554/stream1
          roles:
            - detect
        - path: rtsp://user:{FRIGATE_RTSP_PASSWORD}@192.168.1.201:554/stream2
          roles:
            - record
    detect:
      width: 1280
      height: 720
      fps: 5
      enabled: true
    objects:
      track:
        - person
        - car
    record:
      enabled: true
      retain:
        days: 3
      events:
        retain:
          default: 7
          objects:
            person: 14

snapshots:
  enabled: true
  retain:
    default: 7

Frigate substitutes {FRIGATE_RTSP_PASSWORD} from the environment at runtime. Set it in the .env file. Use two separate streams from the camera: a lower-resolution stream for detection (720p at 5 fps is sufficient for Coral), and the full-resolution stream for recording.

cd ~/frigate && docker compose up -d
docker compose logs -f frigate

Expected result: Frigate logs show the Coral Edge TPU initialising (Starting detection process: coral=1), each camera stream connecting, and the object detector ready. Navigate to http://<pi-ip>:8971 and the Frigate dashboard loads showing live camera feeds and the detection overlay.

Motion masks and zones

Motion masks exclude areas from detection to reduce false positives from trees, roads, or other constant movement. Define them in the Frigate UI under the camera’s settings, or in YAML as normalised coordinates (0.0 to 1.0 relative to frame size):

    motion:
      mask:
        - 0,0,0.4,0,0.4,0.3,0,0.3   # top-left corner (tree)

    zones:
      driveway:
        coordinates: 0.3,0.5,0.9,0.5,0.9,1.0,0.3,1.0
        objects:
          - person
          - car

Zones allow automations to trigger only when a specific object enters a defined area. A person detected in the driveway zone fires a different MQTT message than one detected at the edge of the frame.

MQTT for Frigate

Frigate publishes detection events to MQTT topics under frigate/<camera_name>. For the full Mosquitto broker setup with TLS and ACL, see Mosquitto MQTT Raspberry Pi. Create a dedicated frigate user in the Mosquitto password file with publish and subscribe access to frigate/#.

Home Assistant Integration

Install the Frigate integration from the Home Assistant Community Store (HACS) or add it manually. In Home Assistant, go to Settings > Devices and Services > Add Integration > Frigate. Enter the Frigate API URL:

http://192.168.1.<pi-ip>:5000

After adding the integration, Home Assistant creates entities for each camera including camera.front_yard, binary_sensor.front_yard_person_motion, and sensor.front_yard_person_count. These update in real time as Frigate processes detections.

Also ensure Home Assistant is connected to the same MQTT broker as Frigate. Go to Settings > Devices and Services > MQTT and configure it to connect to 192.168.1.80:1883 with the broker credentials.

Example automation: person on driveway triggers light

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

For notifications with a snapshot image:

action:
  - service: notify.mobile_app_your_phone
    data:
      title: "Person detected"
      message: "Front yard"
      data:
        image: "/api/frigate/notifications/{{ trigger.event.data.after.id }}/snapshot.jpg"

For the full Home Assistant setup on Pi 5, see Home Assistant Raspberry Pi 5.

Remote Access

The Frigate dashboard and camera streams should not be exposed directly to the internet. Two practical options:

  • Tailscale: Access http://<pi-tailnet-ip>:8971 from anywhere on your tailnet without any port forwarding. See Tailscale Raspberry Pi.
  • Caddy reverse proxy: Expose Frigate behind HTTPS with authentication on a DuckDNS domain. See Caddy Reverse Proxy Raspberry Pi. Add HTTP basic auth in the Caddyfile to restrict access.

Troubleshooting

Coral not detected by Frigate

# Check the device is visible on the host
lsusb | grep -i "google\|coral\|1a6e\|18d1"

# Check it is visible inside the container
docker exec frigate lsusb

# Check Frigate logs for detector errors
docker compose logs frigate | grep -i "edgetpu\|coral\|detector"

If the Coral is visible on the host but not in the container, the udev rule has not taken effect or the device path in the compose file is wrong. Run sudo udevadm control --reload-rules && sudo udevadm trigger and unplug and replug the Coral. If the Frigate log shows coral=0, detection is falling back to CPU.

Camera stream not connecting

# Test the RTSP stream directly from the Pi host
ffprobe -v quiet -print_format json -show_streams \
  rtsp://user:password@192.168.1.201:554/stream1

If ffprobe returns stream info, the camera is reachable. If Frigate still fails to connect, check that the RTSP URL in config.yml uses the correct stream path and that the {FRIGATE_RTSP_PASSWORD} substitution is working. Check the RTSP paths in the camera own web interface. They vary by manufacturer and are often not the same as the documented defaults.

Frigate crashes or restarts frequently

docker compose logs frigate | grep -i "error\|killed\|oom\|shm"

# Check for OOM events on the host
dmesg | grep -i "oom\|killed"

Crashes shortly after starting usually indicate insufficient shm_size. Increase it to 512MB and restart. OOM kills at the host level indicate the Pi does not have enough RAM for the number of cameras and detection processes. Reduce the number of streams or switch to the 8GB Pi 5.

Too many false positive detections

Reduce false positives in order of impact: add motion masks to exclude high-movement areas, increase the minimum object size threshold, raise the confidence threshold from the default 0.7 to 0.8, and define zones so automations only trigger in specific areas rather than the full frame. Run the Frigate debug view (camera page > Debug tab) to see the detection bounding boxes in real time and identify which areas generate the most noise.

FAQ

Does Frigate work without Coral?

Yes. Without Coral, Frigate runs detection on the Pi’s CPU. On a Pi 5 this works for one to two cameras at low frame rates (1–2 fps detection), but CPU usage is high and temperatures rise. For more than two cameras or detection at 5 fps, the Coral USB Accelerator is effectively required for practical use on Pi hardware.

What cameras work with Frigate?

Any camera that provides an RTSP stream. Reolink, Dahua, Hikvision, and Amcrest cameras are widely tested with Frigate. Avoid cameras that only provide a proprietary app stream (Wyze, Blink, Arlo in their default configuration). Most modern IP cameras support both a high-resolution main stream and a lower-resolution sub-stream. Use the sub-stream for detection and the main stream for recording.

How much storage does Frigate use?

With continuous recording at 1080p and a 3-day retain policy, each camera generates roughly 15–25GB of footage per day depending on compression settings and scene activity. Two cameras with 3-day retention needs approximately 90–150GB. Event-only recording (storing clips only when an object is detected) reduces storage to 5–15% of that. Set the retention policy conservatively at first and adjust based on actual usage.

Can I run Frigate and Home Assistant on the same Pi?

Yes, on a Pi 5 with 8GB RAM and NVMe storage. Running both on 4GB is marginal. Home Assistant Supervised with add-ons uses 1.5 to 2GB, and Frigate with two cameras and Coral uses another 1 to 1.5GB, leaving little headroom. On 8GB the combination runs well. Ensure the recording storage is on NVMe rather than the OS card.

How do I update Frigate?

Pull the latest image and restart the container. Frigate’s config file and media directory are in volumes and are not affected by the image update:

docker compose pull
docker compose up -d
docker image prune -f

Check the Frigate release notes before major version updates. Config file syntax can change between versions and may require updates to config.yml before the new image will start successfully.

References


About the Author

Chuck Wilson has been programming and building with computers since the Tandy 1000 era. His professional background includes CAD drafting, manufacturing line programming, and custom computer design. He runs PidiyLab in retirement, documenting Raspberry Pi and homelab projects that he actually deploys and maintains on real hardware. Every article on this site reflects hands-on testing on specific hardware and OS versions, not theoretical walkthroughs.

Last tested hardware: Raspberry Pi 5 (8GB), Google Coral USB Accelerator, USB 3.0 SSD. Last tested OS: Raspberry Pi OS Bookworm Lite 64-bit. Frigate 0.14, Home Assistant 2024.11.

Was this helpful?

Yes
No
Thanks for your feedback!