---
title: "Set up Frigate NVR on AI HAT+"
description: "Run Frigate on Raspberry Pi 5 with the Sixfab AI HAT+ (DEEPX DX-M1M): one docker run command, a DEEPX detector config, and checks that the NPU does the work."
url: "https://docs.sixfab.com/projects/ai-hat-plus/set-up-frigate-nvr-ai-hat-plus/"
last_updated: "2026-10-12"
---

# Set up Frigate NVR on AI HAT+

Run Frigate in Docker on a Raspberry Pi 5 with the AI HAT+, detect people on an RTSP camera with a YOLOv8n model on the DEEPX NPU, and check that the NPU does the work. The other Frigate projects build on this setup.

**Works with:** [AI HAT+](https://docs.sixfab.com/edge-ai/ai-hat-plus/) on Raspberry Pi 5

![Frigate Live view of one camera with two people walking on a path past parked cars; the bottom bar shows CPU 26% and System is healthy](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/01-frigate-live-view-two-people-on-path-cpu-26-system-healthy.png)

## How it works

Frigate pulls frames from an RTSP camera (RTSP is the protocol most IP cameras stream video with), hands them to a model on the DEEPX NPU and gets back labeled boxes: a person, a car, a bird. Frigate then tracks each object, records clips and publishes events over MQTT, a lightweight message protocol that other programs subscribe to. The NPU, a chip built for neural networks, runs the model instead of the CPU.

1. **Camera:** any RTSP camera, or a test feed (see [Camera feeds and MQTT for Frigate projects](https://docs.sixfab.com/projects/ai-hat-plus/connect-camera-feeds-mqtt-frigate/)).
2. **Frigate in Docker:** decodes the stream and asks the detector for results.
3. **DEEPX detector:** sends frames to the NPU through the `/dev/dxrt0` device node and the DX-RT socket. DX-RT is DEEPX’s runtime, the software layer that talks to the NPU.
4. **A `.dxnn` model:** DEEPX’s compiled model format. This page uses the ready-compiled `yolov8n-ppu-coco80.dxnn`; [Boss Detector](https://docs.sixfab.com/projects/ai-hat-plus/get-person-alert-camera-boss-detector/), the first project in this series, uses the same file, so detecting people needs no compiling.
5. **Web interface:** live view, events and recordings at `https://[PI_IP]:8971`.

## Requirements

**Required**

**Set up first**

[AI HAT+ quickstart](https://docs.sixfab.com/edge-ai/ai-hat-plus/quickstart/) (Ends with the DX-RT runtime working)

**Hardware**

- **Raspberry Pi 5 with the Sixfab AI HAT+ (DEEPX DX-M1M)**: Installed, with the DX-RT runtime working: `ls /dev/dxrt*` lists `/dev/dxrt0`. [Shop](https://shop.sixfab.com/products/ai-hat-plus-raspberry-pi-5?utm_source=docs.sixfab.com&utm_medium=referral&utm_campaign=ai-projects&utm_content=frigate-deepx-npu-raspberry-pi-5)
- **Camera**: Any RTSP camera, or the test feed from [Camera feeds and MQTT for Frigate projects](https://docs.sixfab.com/projects/ai-hat-plus/connect-camera-feeds-mqtt-frigate/).

**Software**

- **Docker Engine**: On the Raspberry Pi 5, with a user that has `sudo`.
- **Internet access on the first start**: Frigate downloads the DX-RT Python bindings into `/config/.local` the first time a DEEPX detector is configured, and again when a release pins a new version.
- **The project repository**: `https://github.com/sixfab/sixfab-dx-frigate`, cloned to `[REPO_DIR]` in the first step of Install script (Clone the repository) or the second of Manual install (Get the model).

Tested on October 5, 2026 on a Raspberry Pi 5 (8 GB) with the Sixfab AI HAT+ (DEEPX DX-M1M), running Raspberry Pi OS Trixie 64-bit: RT driver v2.6.0, PCIe driver v2.5.0, DX-RT v3.4.2 on the Raspberry Pi 5 and v3.4.0 in Frigate’s DEEPX detector, firmware v2.7.4, Frigate from the `ghcr.io/blakeblackshear/frigate:af0ba19-standard-arm64` image and the model from the DEEPX Model Zoo.

> [!NOTE]
> **DEEPX support is on Frigate’s dev branch**
>
> DEEPX support was merged into Frigate’s dev branch on September 21, 2026 (PR #24336). It is not in a stable release yet; the latest stable release is v0.18.0 (September 12, 2026). When DEEPX support reaches a stable Frigate release, this page moves to it.
>
> The image `ghcr.io/blakeblackshear/frigate:af0ba19-standard-arm64` on [GitHub Container Registry](https://github.com/blakeblackshear/frigate/pkgs/container/frigate) is Frigate’s own build from commit af0ba19 of the dev branch of the official [Frigate repository](https://github.com/blakeblackshear/frigate), not a Sixfab-compiled image on Docker Hub. Sixfab develops and maintains DEEPX support in Frigate ([Frigate’s DEEPX NPU detector docs](https://github.com/blakeblackshear/frigate/blob/dev/docs/docs/configuration/object_detectors.md)).

## Install

Run every command on the Raspberry Pi 5. Both ways start Frigate with the same `docker run` settings, and the other Sixfab Frigate projects use them as written here.

> [!WARNING]
> **Firewall port 5000**
>
> Host networking puts every Frigate port directly on the Raspberry Pi 5’s network interfaces, including port 5000, which Frigate treats as unauthenticated, admin-level access (see Frigate’s [authentication documentation](https://docs.frigate.video/configuration/authentication/)). There is no `-p` flag to leave it unpublished, so firewall port 5000 or keep the Raspberry Pi off an untrusted network. Run API checks from the Raspberry Pi itself with `docker exec` instead of exposing the port.

**Install script**

1. **Clone repository**

   The installer is `toolkit/install-frigate.sh` in the `sixfab-dx-frigate` repository.

   ```bash
   git clone https://github.com/sixfab/sixfab-dx-frigate [REPO_DIR]
   ```

   ```bash
   cd [REPO_DIR]
   ```

2. **Run installer**

   ```bash
   FRIGATE_IMAGE=ghcr.io/blakeblackshear/frigate:af0ba19-standard-arm64 \
     ./toolkit/install-frigate.sh --mosquitto yes
   ```

   - `FRIGATE_IMAGE` (string): The Frigate image the script starts. It has no default.

   - `--mosquitto` (string): Whether the script installs the Mosquitto MQTT broker on the Raspberry Pi 5.

     - Possible enum values: `yes` Installs Mosquitto on the Raspberry Pi 5., `no` Uses a broker on another computer, as in the tested setup; name it with `--broker`.

   - `--broker` (string): The broker on another computer, `[BROKER_HOST]`, with `--mosquitto no`.

   - `--dry-run` (flag): Prints the commands without running them.

   - `--yes` (flag): Answers the prompts.

   The script checks that `dxrt-cli` and `/dev/dxrt0` are present, installs `python3-yaml`, `ffmpeg` and `curl`, installs Docker if it is missing, and starts Frigate with `[FRIGATE_HOME]/config` and `[FRIGATE_HOME]/media` mounted (`FRIGATE_HOME` defaults to `~/frigate`). It ends with:

   ```text
   Frigate install complete.
     Frigate UI:  https://[PI_IP]:8971
     MQTT broker: 127.0.0.1
   Next: cd apps/boss-detector && ./install.sh
   ```

   The Mosquitto broker it installs accepts anonymous connections on port 1883. If the script installed Docker, log out and back in before running a project installer.

3. **Add camera and model**

   The `config.yaml` the script writes has MQTT on and no camera or model. A project installer adds them: [Boss Detector](https://docs.sixfab.com/projects/ai-hat-plus/get-person-alert-camera-boss-detector/) downloads and checks `yolov8n-ppu-coco80.dxnn`, merges its camera into `config.yaml` and installs its listener.

   ```bash
   cd apps/boss-detector && ./install.sh
   ```

4. **Open web interface**

   Browse to `https://[PI_IP]:8971`; this port requires login. The first visit shows a browser warning because Frigate uses a self-signed certificate. Read the admin password from `docker logs frigate`, then set your own.

   **Result:** the Frigate web interface shows the camera.

**Manual install**

1. **Create folders**

   `[FRIGATE_CONFIG_DIR]` holds Frigate’s configuration and models, `[FRIGATE_MEDIA_DIR]` holds recordings. Pick any 2 paths.

   ```bash
   mkdir -p [FRIGATE_CONFIG_DIR]/model_cache [FRIGATE_MEDIA_DIR]
   ```

2. **Get model**

   `yolov8n-ppu-coco80.dxnn` is a ready-compiled model from the DEEPX Model Zoo. It detects the 80 COCO classes listed in Frigate’s built-in label map `/labelmap/coco-80.txt`, the text file that lists the class names in the model’s output order; person is class 0. Clone the repository:

   ```bash
   git clone https://github.com/sixfab/sixfab-dx-frigate [REPO_DIR]
   ```

   Download the model:

   ```bash
   curl -L -o [FRIGATE_CONFIG_DIR]/model_cache/yolov8n-ppu-coco80.dxnn \
     https://github.com/sixfab/sixfab-dx-frigate/releases/download/boss-detector-v1.0.0/yolov8n-ppu-coco80.dxnn
   ```

   Check the download against its SHA-256 hash:

   ```bash
   echo "15493c7716478484e05c57d9afa07328d77c07b75e8ebec4260db7c76d3d7e66  [FRIGATE_CONFIG_DIR]/model_cache/yolov8n-ppu-coco80.dxnn" | sha256sum -c -
   ```

   ```text
   [FRIGATE_CONFIG_DIR]/model_cache/yolov8n-ppu-coco80.dxnn: OK
   ```

3. **Write Frigate config**

   Save this as `[FRIGATE_CONFIG_DIR]/config.yaml`, with your own camera name and RTSP URL.

   ```yaml filename="config.yaml"
   mqtt:
     enabled: false

   models:
     - scene: indoor_thermal
       model_type: yolo-generic
       width: 640
       height: 640
       path: /config/model_cache/yolov8n-ppu-coco80.dxnn
       labelmap_path: /labelmap/coco-80.txt
       devices:
         - deepx:PCIe:0

   cameras:
     [CAMERA_NAME]:
       ffmpeg:
         inputs:
           - path: [RTSP_URL]
             roles:
               - detect
               - record
       detect:
         enabled: true
         width: 1280
         height: 720
         scene: indoor_thermal
       objects:
         track:
           - person
         filters:
           person:
             min_score: 0.6
             threshold: 0.7
       record:
         enabled: true
   ```

   | Field | What it does |
   | --- | --- |
   | `devices: deepx:PCIe:0` | Runs this model on the DEEPX NPU |
   | `model_type: yolo-generic` | Reads the model as a YOLO-style detector |
   | `width`, `height` | The compiled model’s input size (640 × 640), not the camera’s `detect` size |
   | `labelmap_path` | The class names, in the model’s output order. This label map puts `person` first |
   | `mqtt: enabled: false` | Frigate starts with MQTT off. [Camera feeds and MQTT for Frigate projects](https://docs.sixfab.com/projects/ai-hat-plus/connect-camera-feeds-mqtt-frigate/) turns it on when you add a broker |
   | `record` role and `record: enabled: true` | Frigate records this camera to `[FRIGATE_MEDIA_DIR]` |
   | `scene` | A label that ties a camera to a model. Frigate accepts `all`, `indoor`, `outdoor`, `indoor_thermal` and `outdoor_thermal`. This config uses `indoor_thermal` as an unused slot so the model does not collide with other projects’ models; no thermal camera is involved |

4. **Start Frigate**

   Host networking lets DX-RT’s abstract IPC socket reach the container; `--device` passes in the NPU device node.

   ```bash
   docker run -d \
     --name frigate \
     --restart unless-stopped \
     --network host \
     -e DXRT_DYNAMIC_IPC_ENDPOINT=@dxrt_dynamic_ipc.sock \
     --device /dev/dxrt0:/dev/dxrt0 \
     --shm-size=256m \
     -v [FRIGATE_CONFIG_DIR]:/config \
     -v [FRIGATE_MEDIA_DIR]:/media/frigate \
     ghcr.io/blakeblackshear/frigate:af0ba19-standard-arm64
   ```

5. **Open web interface**

   Browse to `https://[PI_IP]:8971`; this port requires login. The first visit shows a browser warning because Frigate uses a self-signed certificate (see Frigate’s [TLS documentation](https://docs.frigate.video/configuration/tls/)). Read the admin password from `docker logs frigate`, then set your own.

   After you change `config.yaml` later, apply it with `docker restart frigate`.

   **Result:** the Frigate web interface shows the camera.

## Verify

Run the checks on the Raspberry Pi 5. `dxrt-cli` is DEEPX’s command-line tool for the NPU.

1. **Check that NPU device node exists**

   ```bash
   ls /dev/dxrt*
   ```

   ```text
   /dev/dxrt0
   ```

   **Result:** `/dev/dxrt0` is listed.

2. **Check that DX-RT sees the NPU**

   ```bash
   dxrt-cli -s
   ```

   ```text
   DXRT v3.4.2+d803450
    * Device 0: M1M, Accelerator type
   …
   ```

   The output, shortened here, also prints firmware, board and temperature lines; it is from DX-RT v3.4.2.

   **Result:** a DEEPX device is listed, for example `Device 0: M1M, Accelerator type`.

3. **Check that Frigate is running**

   ```bash
   docker ps --filter name=frigate
   ```

   **Result:** the `frigate` container is running.

4. **Check that NPU detector answers**

   ```bash
   docker exec frigate curl -s http://localhost:5000/api/stats | jq '.detectors'
   ```

   ```text
   {
     "deepx:PCIe:0": {
       "inference_speed": 18.48,
   …
   ```

   Frigate reports `inference_speed` in milliseconds. The `jq` filter is optional; without it you get the full JSON.

   **Result:** a `deepx:PCIe:0` entry with `inference_speed`.

5. **Check camera in web interface**

   Walk into the camera’s view.

   **Result:** bounding boxes appear when a person is in view.

## Details

### Several cameras and models on one NPU

One Frigate instance on a single NPU served several projects in testing, each with its own camera and model.

- Each model declares a `scene`, and each camera picks one under `detect`. That is how a camera finds its model.
- To add a second project, [merge it into the shared `config.yaml`](https://docs.sixfab.com/projects/ai-hat-plus/connect-camera-feeds-mqtt-frigate/#add-a-projects-camera-to-the-shared-config): add its `models:` entry with its own `scene`, and its camera with that scene under `detect`. The Sixfab project installers merge their entries for you, and a model with the same `path` is replaced instead of duplicated.
- Frigate lists each detector under `detectors` in `/api/stats`, so you can watch the NPU detector’s inference time while a second project runs. To see the NPU’s own load, [check NPU load with `dxtop`](https://docs.sixfab.com/edge-ai/ai-model-deployment/system-monitoring/).

## Limitations

- This setup ran with `docker run`. Home Assistant OS and the Frigate add-on were not tested.
- No benchmark is published for Frigate on the NPU: no inference time was recorded with its model, frame rate and load. Read your own from the `detectors` object in `/api/stats`. For NPU benchmarks on the Raspberry Pi 5, see the [Raspberry Pi 5 AI HAT+ benchmark: DEEPX versus Hailo](https://sixfab.com/blog/raspberry-pi-5-ai-hat-benchmark-deepx-vs-hailo/).
- The model detects only the 80 classes in its label map. Other objects need another `.dxnn` model, compiled with DEEPX’s DX-COM compiler (see [Deployment workflow](https://docs.sixfab.com/edge-ai/ai-model-deployment/custom-models-dxnn-sdk/workflow/)); [Porch Pirate](https://docs.sixfab.com/projects/ai-hat-plus/catch-package-theft-porch-pirate/) runs a custom 5-class model (package, person, car, truck, motorcycle).
- Frigate chooses the DX-RT version its DEEPX detector uses. The tested build pins DX-RT v3.4.0, and this setup cannot change it.
- Frigate does not recover by itself when the DX-RT daemon restarts: see [Detections stop after the DX-RT daemon restarts](https://docs.sixfab.com/projects/ai-hat-plus/set-up-frigate-nvr-ai-hat-plus/#detections-stop-after-the-dx-rt-daemon-restarts).

## Privacy

Cameras record people. Frigate writes recordings and clips to `[FRIGATE_MEDIA_DIR]`, the folder the container mounts at `/media/frigate`, so anyone who can log in on port 8971 or read that folder can watch them. Check the rules for recording people where you live, and read [Camera feeds and MQTT for Frigate projects](https://docs.sixfab.com/projects/ai-hat-plus/connect-camera-feeds-mqtt-frigate/) and each project’s Privacy section before you point a camera at people.

## Troubleshooting

### `/dev/dxrt0` is missing

The NPU is not visible to the host. Check that the AI HAT+ is plugged in and that the DX-RT driver loaded, then recheck the steps in the [AI HAT+ quickstart](https://docs.sixfab.com/edge-ai/ai-hat-plus/quickstart/) and see [AI HAT+ troubleshooting](https://docs.sixfab.com/edge-ai/ai-hat-plus/troubleshooting/).

### Detections stop after the DX-RT daemon restarts

When the DX-RT daemon (`dxrtd`, run by the `dxrt.service` unit, the background service that owns the NPU) restarts, detections stop. Restart the Frigate container:

```bash
docker restart frigate
```

### The camera shows no image

Check the feed from the Raspberry Pi 5 with `ffprobe [RTSP_URL]`. If the feed comes from a stream host, check its feed service on that host with `systemctl status [FEED_SERVICE_NAME]`.

### MQTT does not connect

On the broker host (the machine that runs the MQTT server, Mosquitto in this series), run `systemctl status mosquitto`. See [Camera feeds and MQTT for Frigate projects](https://docs.sixfab.com/projects/ai-hat-plus/connect-camera-feeds-mqtt-frigate/).

### DX-RT reports `Invalid .dxnn file format`

In testing, DX-RT returned this error when the model was not supported. Use a `.dxnn` model that DX-RT supports, such as `yolov8n-ppu-coco80.dxnn`, and check the download against its SHA-256 hash (Manual install, Get model).

## Next steps

- [Camera feeds and MQTT](https://docs.sixfab.com/projects/ai-hat-plus/connect-camera-feeds-mqtt-frigate/): Set up the camera feed and the MQTT broker.
- [Boss Detector](https://docs.sixfab.com/projects/ai-hat-plus/get-person-alert-camera-boss-detector/): Run a Python action on each person event.
- [Face recognition](https://docs.sixfab.com/projects/ai-hat-plus/add-face-recognition-frigate-camera/): Recognize faces with Frigate.
- [Porch Pirate](https://docs.sixfab.com/projects/ai-hat-plus/catch-package-theft-porch-pirate/): Detect packages with a custom 5-class model.
- [Bird feeder camera](https://docs.sixfab.com/projects/ai-hat-plus/identify-bird-species-bird-feeder-camera/): Identify bird species at a feeder.

## License and credits

The code is licensed under the MIT License. Each model file has its own license, listed with its details in the [boss-detector-v1.0.0 release notes](https://github.com/sixfab/sixfab-dx-frigate/releases/tag/boss-detector-v1.0.0): `yolov8n-ppu-coco80.dxnn` is derived from Ultralytics YOLOv8n and licensed under AGPL-3.0. The `ghcr.io/blakeblackshear/frigate:af0ba19-standard-arm64` image is MIT licensed and built from commit af0ba19 of the dev branch of the official Frigate repository. Frigate and the DEEPX tools belong to their respective authors.
