👍 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.
🏆 Our picks
Affiliate links · same price for youSee all our recommended gear in the shop.
📑 Contents ▾
- 01 Prerequisites
- 02 Step-by-step installation
- · Step 1: Check Docker and the Coral
- · Step 2: Install Home Assistant (Container)
- · Step 3: Prepare Mosquitto (MQTT)
- · Step 4: Deploy Frigate with the Coral
- · Step 5: Configure the Coral detector and cameras (config.yml)
- · Step 6: Integrate Frigate into Home Assistant (HACS)
- · Step 7: Remote HTTPS access with Caddy (optional)
- 10 Verification checks
- 11 Security and best practices
- 12 Troubleshooting common errors
- 13 FAQ
- · Can I use the Google Coral Dev Board as an accelerator?
- · Can I use accelerators other than the Coral?
- · Does Frigate work without Home Assistant?
- 17 Read also
- 18 Host this yourself
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 files and ports come from the official Frigate documentation (version 0.18 at the time of writing) and the Home Assistant documentation.
A word about hardware before you start. Frigate supports USB and M.2 / Mini PCIe Corals, which you plug into the server. The Google Coral Dev Board is a complete single-board computer, not an accelerator you plug into a mini-PC. The Frigate documentation says the Dev Board’s “native” Coral may have compatibility issues after version 0.9.x, so it isn’t suitable for this tutorial. Likewise, 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.
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.
- 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.
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. - 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/.
FAQ
Can I use the Google Coral Dev Board as an accelerator?
No, not in this setup. It’s a standalone single-board computer, not an accelerator you plug into a mini-PC. Frigate also warns that its native Coral may have compatibility issues after version 0.9.x. Use a USB or M.2/PCIe Coral.
Can I use accelerators other than the Coral?
Yes. Frigate supports, among others, OpenVINO (Intel GPUs and CPUs), Hailo-8/8L, ONNX on NVIDIA or AMD GPUs, and the Apple Silicon detector. You can’t mix several detector types for object detection. The CPU detector is for testing only.
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.
Read also
Host this yourself
No hardware to manage? This kind of service runs on a managed VPS, ready in minutes. See PlanetHoster plans