👍 What we like
- ✓Open-source software built around AI object detection, with far fewer false alerts than plain motion detection.
- ✓Works with most cameras that provide an RTSP stream.
- ✓Runs fully locally, with an authenticated UI on port 8971.
- ✓Easy to update thanks to the official Docker image.
👎 What to watch
- ✕Without an accelerator, CPU detection on the Pi 5 is discouraged by the documentation and limited to a few cameras.
- ✕Recordings wear out the microSD: an SSD is strongly advised.
- ✕The documentation provides no ffmpeg hardware acceleration for the Pi 5.
- ✕YAML configuration requires care and changes between versions.
🏆 Our picks
Affiliate links · same price for youSanDisk Extreme microSDXC A2 128 Go
Amazon · price and availability on the listing
See all our recommended gear in the shop.
📑 Contents ▾
- 01 Prerequisites
- 02 Step-by-step installation
- · Step 1: Install 64-bit Raspberry Pi OS
- · Step 2: Install Docker Engine and the Compose plugin (official repository)
- · Step 3: Prepare recording storage (SSD recommended)
- · Step 4: Create the docker-compose.yml file
- · Step 5: Describe the camera in /config/config.yml
- · Step 6: Start Frigate and log in
- 09 Verification checks
- 10 Security and best practices
- 11 Troubleshooting common errors
- · The container keeps restarting
- · ”Bus error” or random crashes
- · Black image or “No frames received”
- · CPU maxed out, slow detection
- 16 FAQ
- · Is my camera compatible?
- · Can detection be accelerated on a Raspberry Pi 5?
- · Why an SSD rather than the microSD for recordings?
- 20 Read also
Frigate is an open-source network video recorder (NVR). Its core feature is AI object detection (people, cars, animals…) in real time on your IP camera streams. It goes beyond motion detection: an event is only kept when an object is recognised. Recent versions add optional features such as face recognition, but this guide sticks to the essentials. You will install 64-bit Raspberry Pi OS on a Raspberry Pi 5, install Docker Engine and the Compose plugin from the official repository, run the official ghcr.io/blakeblackshear/frigate:stable image, and then describe a camera in /config/config.yml.
One thing to know before you start: without an accelerator, Frigate runs detection on the Pi’s processor (the cpu detector). The Frigate documentation does not recommend this detector for general use. It is fine for trying the software or for watching one or two cameras at a low detection frame rate. To go further on a Pi 5, the documented path is a Hailo-8/8L module (AI Kit on a PCIe board).
Prerequisites
- Raspberry Pi 5: the Raspberry Pi 5 8 Go (8 GB) leaves headroom for Docker, Frigate’s shared memory and the RAM cache. Use the official USB-C power supply and active cooling, because CPU detection puts a heavy load on the processor.
- OS: 64-bit Raspberry Pi OS (Bookworm or Trixie). The Pi 5 does not boot Buster or Bullseye. Docker supports Debian 12 (Bookworm) and 13 (Trixie) on
arm64. - System storage: a card such as the SanDisk Extreme microSDXC A2 128 Go (128 GB) is fine for the OS and configuration. However, video recording writes constantly and wears out microSD cards: for
/media/frigate, use an SSD instead (USB 3, or NVMe through a PCIe expansion board). - IP camera providing an RTSP stream (ideally a high-definition main stream plus a low-resolution sub-stream). Note its IP address, username, password and the RTSP path given by the manufacturer.
- Local network: Frigate serves its authenticated UI on port 8971 (HTTPS, self-signed certificate by default). Port 5000 gives internal access without authentication and must not be opened to the network.
Step-by-step installation
Step 1: Install 64-bit Raspberry Pi OS
On your PC, open Raspberry Pi Imager. Select Raspberry Pi 5, then Raspberry Pi OS Lite (64-bit), then your card or SSD. In the customisation options, set the hostname (for example frigate) and a user with a strong password (there is no default pi user any more), then enable SSH. Once the Pi has booted:
ssh your_user@frigate.local
sudo apt update && sudo apt full-upgrade -y
sudo reboot
Check: the architecture must be arm64 and the codename bookworm or trixie.
dpkg --print-architecture
. /etc/os-release && echo "$VERSION_CODENAME"
Step 2: Install Docker Engine and the Compose plugin (official repository)
Docker says that 64-bit Raspberry Pi OS should follow the Debian procedure (arm64 packages). First import the GPG key, then declare the repository with the architecture and release detected automatically:
sudo apt update
sudo apt install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Check: the test container must print “Hello from Docker!”, and Compose is called with docker compose, with no hyphen.
sudo docker run --rm hello-world
docker compose version
Optional: run sudo usermod -aG docker $USER, then log out and back in to use Docker without sudo. Be aware that membership of the docker group is equivalent to root access.
Step 3: Prepare recording storage (SSD recommended)
Plug in the SSD and identify it with certainty:
lsblk -o NAME,SIZE,MODEL,MOUNTPOINTS
⚠️ Warning: the next command permanently erases the target device. Replace
/dev/sdawith the disk identified above. It must never bemmcblk0(the system microSD) or a disk that holds your data.
sudo parted /dev/sda --script mklabel gpt mkpart frigate ext4 0% 100%
sudo mkfs.ext4 -L frigate /dev/sda1
sudo mkdir -p /mnt/frigate
echo "UUID=$(sudo blkid -s UUID -o value /dev/sda1) /mnt/frigate ext4 defaults,nofail 0 2" | sudo tee -a /etc/fstab
sudo systemctl daemon-reload
sudo mount -a
Check: /mnt/frigate must appear with the SSD’s size.
findmnt /mnt/frigate && df -h /mnt/frigate
If you have no SSD, use a folder such as ~/frigate/storage, keeping microSD wear in mind.
Step 4: Create the docker-compose.yml file
mkdir -p ~/frigate/config && cd ~/frigate
nano docker-compose.yml
services:
frigate:
container_name: frigate
image: ghcr.io/blakeblackshear/frigate:stable
restart: unless-stopped
shm_size: "512mb"
volumes:
- /etc/localtime:/etc/localtime:ro
- ./config:/config
- /mnt/frigate:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971" # authenticated UI (HTTPS)
- "127.0.0.1:5000:5000" # unauthenticated internal access, Pi only
environment:
FRIGATE_RTSP_USER: ${FRIGATE_RTSP_USER}
FRIGATE_RTSP_PASSWORD: ${FRIGATE_RTSP_PASSWORD}
A few notes. shm_size replaces Docker’s 64 MB default: the documentation mentions about 210 MB for two cameras detecting at 720p, and 512 MB leaves headroom. The tmpfs is the cache for recording segments. Ports 8554 (RTSP restream, unauthenticated by default) and 8555 (WebRTC) are not published here. Only add them if you need them, and only on the local network.
Put the camera credentials in a .env file that only you can read:
printf 'FRIGATE_RTSP_USER=admin\nFRIGATE_RTSP_PASSWORD=MotDePasseCamera\n' > .env
chmod 600 .env
Check: Compose must print the merged configuration with no YAML syntax error.
docker compose config
Step 5: Describe the camera in /config/config.yml
Frigate reads a single file: /config/config.yml, which is ~/frigate/config/config.yml on the host. Replace the IP address and RTSP paths with your camera’s. Frigate substitutes the {FRIGATE_RTSP_USER} and {FRIGATE_RTSP_PASSWORD} variables at startup.
nano ~/frigate/config/config.yml
mqtt:
enabled: False
detectors:
cpu1:
type: cpu
num_threads: 3
objects:
track:
- person
- car
record:
enabled: True
continuous:
days: 1
motion:
days: 3
alerts:
retain:
days: 10
detections:
retain:
days: 10
cameras:
entree:
ffmpeg:
inputs:
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.50:554/stream2
roles:
- detect
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.50:554/stream1
roles:
- record
detect:
enabled: True
width: 640
height: 360
fps: 5
The sub-stream (stream2) is used for detection and the main stream (stream1) for recording. width and height must match the sub-stream’s actual resolution. Before starting Frigate, test the URL from the Pi:
sudo apt install -y ffmpeg
ffprobe -rtsp_transport tcp "rtsp://admin:MotDePasseCamera@192.168.1.50:554/stream2"
Check: ffprobe must print a Video: stream (codec and resolution). Copy that resolution into detect.
Note: the Frigate documentation only describes ffmpeg hardware acceleration (preset-rpi-64-h264, /dev/video11) for the Raspberry Pi 3 and 4. Do not add these settings on a Pi 5 without checking the documentation for your version.
Step 6: Start Frigate and log in
cd ~/frigate
docker compose up -d
docker logs frigate 2>&1 | grep -i -A2 password
On first startup, Frigate creates an admin user and writes its password to the logs. Open https://frigate.local:8971 and accept the self-signed certificate warning. Log in, then change the password right away under Settings > Users.
Verification checks
docker compose ps # status "running"
curl -s http://127.0.0.1:5000/api/version; echo # Frigate version
docker logs --tail 50 frigate # no validation errors
ls /mnt/frigate/recordings # segments appear after a few minutes
In the UI, the entree camera must show a live image. Walk in front of it: a person detection should appear in the Review view.
Security and best practices
- Never expose Frigate directly to the Internet, nor port 5000 (no authentication) or port 8554. For remote access, use a VPN (WireGuard, Tailscale). If you put a reverse proxy on your local network, point it at port 8971.
- Do not publish SSH access to the Internet. Use SSH keys on the local network.
- Put the cameras on a VLAN or an isolated network with no Internet access if your network hardware allows it.
- Keep the camera credentials in
.env(chmod 600), never in plain text in a Git repository. - Updates:
docker compose pull && docker compose up -d. Read the release notes before moving to a major version, because the configuration syntax changes over time. - If you lose the admin password, add
auth:thenreset_admin_password: truetoconfig.yml, restart, and read the new password in the logs. Remove the option afterwards.
Troubleshooting common errors
The container keeps restarting
Cause: a validation error in config.yml (unknown key, wrong indentation).
Fix: docker logs frigate names the faulty key. Fix it, then run docker compose restart frigate.
”Bus error” or random crashes
Cause: not enough shared memory.
Fix: increase shm_size (calculate it from the number of cameras and the detect resolution), then run docker compose up -d.
Black image or “No frames received”
Cause: wrong RTSP URL, credentials or resolution.
Fix: test the URL again with ffprobe (step 5), check the RTSP path in the manufacturer’s documentation, and adjust detect.width and detect.height.
CPU maxed out, slow detection
Cause: the cpu detector is very demanding.
Fix: lower detect.fps, use the low-resolution sub-stream, limit objects.track, or add a Hailo accelerator (see the FAQ).
FAQ
Is my camera compatible?
Frigate needs a video stream, usually RTSP, in H.264 or H.265. ONVIF is not required for detection; it is used mainly for PTZ control. See the “Camera specific configurations” page in the Frigate documentation.
Can detection be accelerated on a Raspberry Pi 5?
Yes. The Frigate documentation supports Hailo-8 and Hailo-8L modules, including on the Pi 5 with the AI Kit PCIe board (hailo8l detector, with the /dev/hailo0 device mapped in the compose file). On Bookworm, the built-in Hailo driver conflicts with Frigate and has to be replaced following the official procedure. Follow the documentation for your version. The Coral is no longer recommended for new installations.
Why an SSD rather than the microSD for recordings?
Recording writes constantly, which wears out microSD cards. An SSD handles these writes better and offers more capacity. Keep the microSD for the OS, or boot straight from NVMe (see the guide below).