👍 What we like
- Fully local object detection accelerated by the Coral Edge TPU.
- Camera entities, motion sensors and switches directly in Home Assistant.
- File-based configuration that is easy to version and back up.
- Also works without Home Assistant thanks to Frigate's standalone UI.
👎 What to watch
- Requires a Linux host: the Coral Dev Board and Docker Desktop for Mac are not suitable.
- A PCIe Coral requires installing and maintaining the gasket driver on the host.
- Several components to maintain (Frigate, Mosquitto, HACS, reverse proxy).
- Frigate configuration options change between versions.
📑 Contents ▾
This tutorial installs three components on an x86 Linux mini-PC or server: Frigate, an open-source NVR that runs object detection locally, accelerated by a Coral Edge TPU; Mosquitto, an MQTT broker; and Home Assistant, which gets Frigate’s cameras, sensors and events through the Frigate integration. Everything runs in Docker with Docker Compose. The Coral is not mandatory for Frigate, but it is an accelerator that is easy to plug in, over USB or M.2/PCIe. The files and ports come from the official Frigate documentation (version 0.18 at the time of writing) and the Home Assistant documentation.
Do you need a Coral for Frigate?
Frigate separates two kinds of processing. Motion detection always stays on the CPU. Object detection (person, car, animal) runs TensorFlow Lite models on a “detector”, and that is where the Coral comes in: it offloads these models from the CPU. The number of frames analyzed per second depends on the detection model, the resolution and the number of cameras; we have not measured it.
The Coral is not the only possible detector. Frigate supports, among others:
- OpenVINO, on the GPU or CPU of an Intel machine;
- Hailo-8 and Hailo-8L;
- ONNX on an NVIDIA or AMD GPU;
- the Apple Silicon detector.
You can’t mix several detector types for object detection, and the CPU detector is for testing only. In practice, the Coral remains the most direct choice when the server has no GPU that Frigate can use, or when you want a low-power accelerator to add to an existing machine. If your mini-PC has an Intel processor, OpenVINO is an alternative worth trying before buying an accelerator.
USB or M.2/PCIe? The USB Coral needs no driver on the host: the Edge TPU library is included in the Frigate image. It is best plugged into a USB 3 port. The M.2/PCIe Coral frees up a USB port but requires the gasket driver on the host, to be maintained across kernel updates.
What doesn’t fit this tutorial:
- The Google Coral Dev Board is a complete single-board computer, not an accelerator you plug into a mini-PC. The Frigate documentation says its “native” Coral may have compatibility issues after version 0.9.x.
- The NVIDIA Jetson Nano Developer Kit is also a standalone embedded Linux computer (JetPack), not an accelerator to plug into the Frigate server.
- Docker Desktop for Mac runs containers inside a virtual machine and, according to its documentation, can’t pass a USB device such as the Coral to a container: check the documentation for your version. You need a Linux host.
If you want to run Frigate on a smaller machine, our tutorial on installing Frigate on a NAS or a Raspberry Pi 5 covers that case.
Prerequisites
- An x86-64 mini-PC or server running Debian 12/13 or Ubuntu 24.04, with a fixed IP address on the local network.
- A Coral Edge TPU accelerator, either USB (preferably on a USB 3 port) or M.2/PCIe.
- Docker Engine with the Docker Compose v2 plugin, installed with the official procedure from docs.docker.com.
- One or more IP cameras with an RTSP stream. Ideally, use a low-resolution substream for detection and the main stream for recording. Our comparison of PoE cameras for Frigate helps you choose them.
- A disk with enough space for recordings, mounted for example at
/srv/frigate-media. - Optional: a public domain name pointing to your IP, if you want HTTPS access to Home Assistant from outside.
Step-by-step installation
Step 1: Check Docker and the Coral
First, check that Docker and Compose work and that Docker starts with the system:
docker --version
docker compose version
sudo systemctl enable --now docker
A USB Coral needs no driver on the host: the Edge TPU library is already included in the Frigate image. Check that the stick is detected:
lsusb | grep -Ei "1a6e:089a|18d1:9302"
Until Frigate has used the stick, it shows up as 1a6e:089a Global Unichip Corp.. After the first inference, it changes to 18d1:9302 Google Inc.. A PCIe/M.2 Coral needs the gasket driver (the Frigate documentation points to the gasket-builder project). Then check that the device exists:
ls -l /dev/apex_0
Step 2: Install Home Assistant (Container)
On x86, use the generic ghcr.io/home-assistant/home-assistant:stable image. Don’t use the Raspberry Pi-specific images. Our Home Assistant Docker tutorial covers this installation in detail if you are starting from scratch.
sudo mkdir -p /opt/homeassistant/config
sudo nano /opt/homeassistant/compose.yaml
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /opt/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
restart: unless-stopped
stop_grace_period: 60s
privileged: true
network_mode: host
environment:
TZ: Europe/Paris
cd /opt/homeassistant && sudo docker compose up -d
curl -sI http://127.0.0.1:8123 | head -n 1
The curl command should return an HTTP/1.1 200 line or a redirect (302). Then open http://SERVER_IP:8123 on the local network and create the owner account (onboarding).
Step 3: Prepare Mosquitto (MQTT)
The Frigate integration needs MQTT for most of its entities. Mosquitto goes in the same Compose project as Frigate:
sudo mkdir -p /opt/frigate/config /opt/frigate/mosquitto/config /opt/frigate/mosquitto/data
sudo tee /opt/frigate/mosquitto/config/mosquitto.conf > /dev/null <<'EOF'
listener 1883
allow_anonymous false
password_file /mosquitto/config/passwd
persistence true
persistence_location /mosquitto/data/
EOF
sudo docker run --rm -it -v /opt/frigate/mosquitto/config:/mosquitto/config \
eclipse-mosquitto mosquitto_passwd -c /mosquitto/config/passwd frigate
Enter a strong password when prompted. Then check that the file contains the user:
sudo cut -d: -f1 /opt/frigate/mosquitto/config/passwd
The command should print frigate.
Step 4: Deploy Frigate with the Coral
Put the MQTT password in a .env file, which Compose reads automatically:
echo 'FRIGATE_MQTT_PASSWORD=your_chosen_password' | sudo tee /opt/frigate/.env
sudo chmod 600 /opt/frigate/.env
sudo nano /opt/frigate/compose.yaml
services:
mosquitto:
container_name: mosquitto
image: eclipse-mosquitto:2
restart: unless-stopped
volumes:
- /opt/frigate/mosquitto/config:/mosquitto/config
- /opt/frigate/mosquitto/data:/mosquitto/data
ports:
- "127.0.0.1:1883:1883" # reachable from the host only (Home Assistant in host mode)
frigate:
container_name: frigate
image: ghcr.io/blakeblackshear/frigate:stable
restart: unless-stopped
stop_grace_period: 30s
shm_size: "512mb" # adjust to the number of cameras and their detect resolution
depends_on:
- mosquitto
devices:
- /dev/bus/usb:/dev/bus/usb # USB Coral
# - /dev/apex_0:/dev/apex_0 # PCIe/M.2 Coral (instead of the line above)
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/frigate/config:/config
- /srv/frigate-media:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971" # authenticated UI (self-signed HTTPS)
- "127.0.0.1:5000:5000" # unauthenticated API, host only
- "8554:8554" # RTSP restream
- "8555:8555/tcp" # WebRTC
- "8555:8555/udp"
environment:
FRIGATE_MQTT_PASSWORD: ${FRIGATE_MQTT_PASSWORD}
Port 5000 is only published on 127.0.0.1: Home Assistant, which runs in host network mode, can reach it, but the rest of the network can’t.
Step 5: Configure the Coral detector and cameras (config.yml)
Frigate’s configuration doesn’t go in the Compose file. It goes in /opt/frigate/config/config.yml, which is /config/config.yml inside the container. The detectors section with type: edgetpu is what enables the Coral.
mqtt:
enabled: true
host: mosquitto
port: 1883
user: frigate
password: "{FRIGATE_MQTT_PASSWORD}"
detectors:
coral:
type: edgetpu
device: usb # "pci" for a PCIe/M.2 Coral
cameras:
entree: # camera name (lowercase, no spaces)
ffmpeg:
inputs:
- path: rtsp://user:password@192.168.1.50:554/substream
roles:
- detect
- path: rtsp://user:password@192.168.1.50:554/mainstream
roles:
- record
detect:
enabled: true
width: 1280 # resolution of the detect stream
height: 720
record:
enabled: true
Replace the RTSP URLs with your cameras’ URLs: the exact path depends on the manufacturer. The retention options (record) have changed between versions, so check them in the documentation for your version. Then start the stack:
cd /opt/frigate && sudo docker compose up -d
sudo docker logs frigate 2>&1 | grep -iE "tpu|password|error"
On first startup, Frigate creates the admin user and prints its password in the logs. The TPU lines should show that the Coral was found, and no detector error should appear. Then log in at https://SERVER_IP:8971. The certificate is self-signed, so your browser will show a warning.
Step 6: Integrate Frigate into Home Assistant (HACS)
The Frigate integration is a custom integration installed through HACS. It isn’t configured in YAML. Start by installing HACS inside the container:
sudo docker exec -it homeassistant bash -c "wget -O - https://get.hacs.xyz | bash -"
sudo docker restart homeassistant
Then, in the Home Assistant UI:
- Settings > Devices & services > Add integration > MQTT: broker
127.0.0.1, port1883, userfrigateand the password you chose. - Settings > Devices & services > Add integration > HACS: accept the terms, then authorize access with the GitHub device code shown.
- HACS: search for “Frigate”, download the integration, then restart Home Assistant.
- Settings > Devices & services > Add integration > Frigate: URL
http://127.0.0.1:5000.
curl -s http://127.0.0.1:5000/api/version
Run on the host, this command should return Frigate’s version number. This is the URL the integration uses.
Step 7: Remote HTTPS access with Caddy (optional)
Expose only Home Assistant, behind Caddy, with a public domain name. Only ports 80 and 443 are forwarded to Caddy. Frigate stays reachable through Home Assistant (camera entities, media browser). Example Caddyfile for Caddy installed on the host:
ha.example.com {
reverse_proxy 127.0.0.1:8123
}
Caddy automatically gets a Let’s Encrypt certificate for ha.example.com. Home Assistant then has to accept the proxy. According to the current documentation, this is set in Settings > System > Network, in the HTTP server section: turn on Trust X-Forwarded-For and add 127.0.0.1 under Trusted proxies (or the IP/network of the Caddy container). On older versions, these options are in configuration.yaml:
http:
use_x_forwarded_for: true
trusted_proxies:
- 127.0.0.1
- ::1
curl -sI https://ha.example.com | head -n 1
Verification checks
sudo docker ps --format "table {{.Names}}\t{{.Status}}"
curl -s http://127.0.0.1:5000/api/stats | python3 -m json.tool | grep -A3 '"coral"'
lsusb | grep 18d1:9302
sudo docker exec mosquitto mosquitto_sub -u frigate -P 'your_chosen_password' -t 'frigate/available' -C 1 -v
Here’s what you should see:
- all three containers are
Up; - the
coraldetector shows aninference_speed; - the USB Coral shows up with the Google ID
18d1:9302; - the MQTT topic returns
frigate/available online.
In Home Assistant, the Frigate device should show camera, binary_sensor (motion/occupancy), sensor and switch entities.
Security and best practices
- Don’t open any port on your router to Frigate (5000, 8971, 8554, 8555), Mosquitto or SSH. Port 5000 has no authentication, and RTSP on 8554 has none by default. For full remote access, use a VPN (WireGuard, Tailscale) instead.
- Forward only ports 80/443 to the reverse proxy, and only if you need to reach Home Assistant from outside. Turn on two-factor authentication for your Home Assistant user.
- Change Frigate’s
adminpassword and keepallow_anonymous falsein Mosquitto. - If your switch allows it, put the cameras in a separate VLAN: see configuring VLANs on a managed switch.
- Regularly back up
/opt/homeassistant/config,/opt/frigate/configand/opt/frigate/.env. - Before using a new disk for recordings, identify it with
lsblk -f. Formatting erases everything on it: check several times that it’s the right disk.
Troubleshooting common errors
- “Bus error” or capture crashes:
shm_sizeis too small. Increase it, based on the detect resolution and the number of cameras. - USB Coral not detected: try another USB 3 port or another cable, or a USB hub with its own power supply (the stick can draw up to 900 mA). As a last resort, try
privileged: true, which the documentation says is sometimes needed. - PCIe Coral missing / “Illegal instruction”: the gasket driver is missing or too old for your kernel. Reinstall it with gasket-builder and check that
/dev/apex_0exists. - Frigate entities missing or unavailable: check that MQTT is configured in both Home Assistant and
config.yml, on the same broker, and that the integration URL ishttp://127.0.0.1:5000. - “400 Bad Request” behind Caddy: the proxy isn’t listed in Home Assistant’s trusted proxies.
- Mosquitto won’t start: read
docker logs mosquitto. It’s often a permissions problem onpasswdordata/.
The hardware mentioned on this page
We did not test this hardware: the information below comes from the Frigate documentation and manufacturers’ spec sheets.
- The Google Coral USB Accelerator is the format used in this tutorial: no driver to install on the host and a USB 3 port. It adds to an existing mini-PC or server, which makes it the simplest way to accelerate Frigate.
- The Intel NUC Compute Element is an x86 compute module that only works once installed in a compatible chassis or carrier board. Set up that way, it can host this tutorial, with a USB Coral plugged into it; like any Intel machine, it can also try the OpenVINO detector.
- The NVIDIA Jetson Nano Developer Kit is a standalone embedded Linux computer (JetPack), more expensive and more power-hungry than the Coral according to the spec sheets. It is not used as an accelerator in this tutorial’s architecture.
- The Google Coral Dev Board is a single-board computer, not an accelerator to plug in: for Frigate, use a USB or M.2/PCIe Coral instead.
- Docker Desktop for Mac does not pass the USB Coral through to the Frigate container: you can’t follow this tutorial on a Mac with it.
For the host machine, our comparison of which mini-PC for Home Assistant helps you pick an x86 model that will run Home Assistant and Frigate together.
FAQ
Does Frigate work without Home Assistant?
Yes. Frigate is standalone, with its own UI on port 8971. Home Assistant adds automations, notifications and centralized remote access.
Key facts
Our picks
Affiliate links · same price for youGoogle Coral USB Accelerator
Amazon · price and availability on the listing
Google Coral Dev Board
Amazon · price and availability on the listing
Docker Desktop for Mac
Amazon · price and availability on the listing
NVIDIA Jetson Nano Developer Kit
Amazon · price and availability on the listing
Intel NUC Compute Element
Amazon · price and availability on the listing
See all our recommended gear in the shop.