Is a GPU server right for your cameras?
It is when you have a lot of cameras, more than one site, or footage you want kept somewhere other than the building it shows. Frigate's planning guide says that once 12 or more cameras are busy you need a handful of small accelerators or a single graphics card, and that past 40 cameras the answer is a modern discrete GPU. A card in a GPU dedicated server covers both ends of that, and it also takes the video decoding off the processor.
It is not right when your internet line is slow on the upload side, or when recording must carry on through an internet outage. In those cases Frigate's own hardware advice fits better: a small PC on site, with a second network port so the cameras live on a private network of their own.
Can your upload carry the streams?
This is the question most guides skip. Frigate does not wait for motion before receiving video: new recording segments land in a cache first, and only afterwards does it decide which ones to keep. So each camera streams continuously, usually twice over, a small substream for detection and the full stream for recording.
- Add each camera with Frigate's Add Camera wizard; it shows an estimated bandwidth figure for every stream it tests.
- Add those figures together for all cameras.
- Compare the total with the upload your line really delivers, and leave headroom for everyone else using it.
- If it does not fit, lower the bitrate in the camera's own settings, record fewer cameras remotely, or keep the recorder on site.
Expect alerts a little later than a recorder in the next room would give you: the video has to make the trip to the data centre first, and a dropped connection means a gap in the footage for that time. If your cameras can record to their own memory card, leave that switched on as a fallback.
Never open your cameras' RTSP ports to the internet. Join your router and the server with a WireGuard VPN and let Frigate reach the cameras through that tunnel. On our side the incoming video costs nothing extra: the port is unmetered and nothing counts the traffic.
What the card and the processor need
- The card: Frigate uses the CUDA 12.x libraries, so it wants an NVIDIA GPU with compute capability 5.0 or higher (Maxwell or newer, roughly) and a host driver of version 545 or newer, plus the NVIDIA Container Toolkit so Docker can hand the card to the container.
- The processor: Frigate will not start without AVX and AVX2. Intel brought AVX2 to the Xeon E5 line with its v3 generation, so a Xeon E5-2600 v1 or v2 machine is out, whatever card it carries.
- The memory: Frigate's guide calls 8 GB the minimum once you use extras such as face or plate recognition, and recommends 16 GB for eight or more cameras.
- The decoder: Frigate's planning page warns that many consumer GPUs top out at about 20 concurrent camera streams, so check your card before a large rollout.
Frigate supports several kinds of detector. Its hardware page describes the Coral Edge TPU, in USB or M.2 form, as one of the most power-efficient detectors, and the Hailo-8 as an M.2 module, also sold on a HAT for the Raspberry Pi. Both suit a compact box on site. OpenVINO runs detection on Intel hardware: the integrated graphics of 6th-generation and newer processors, Arc cards or an NPU (on the processor alone Frigate does not recommend it). On a rented server, an NVIDIA card through the ONNX detector in the -tensorrt image does the job, and Frigate points installations of roughly 40 cameras or more to a discrete GPU.
That AVX2 point matters on our list. For several cards, the cheapest listing puts them in a Xeon E5-2600 v1/v2 machine. Many parts fit more than one chassis, so in the configurator choose a host on Xeon E5-2620 v4 or Xeon Silver, or ask us which machines your card fits.
| Card we fit | Frigate's published inference time | Processor in its cheapest listing |
|---|---|---|
| RTX 3070 | YOLOv9 t-320: 6 ms; s-320: 8 ms | Xeon E5-2630L (v1/v2 line): no AVX2 |
| GTX 1070 | YOLOv9 s-320: 16 ms | Xeon E5-2630L (v1/v2 line): no AVX2 |
| RTX A4000 | YOLO-NAS 320: ~15 ms | Xeon E5-2620 v4: has AVX2 |
| Tesla P40 | YOLO-NAS 320: ~105 ms | Xeon E5-2630L (v1/v2 line): no AVX2 |
The Tesla P40 row is a useful warning: plenty of card memory does not make it quick at detection. Frigate's models are small, so a newer consumer or workstation card usually serves you better.
How much disk your footage takes
Frigate saves the recording stream exactly as your camera sends it, with no re-encoding, so the size depends on the bitrate set in the camera and how long you keep it. A rough rule from our own arithmetic: every 1 Mbit/s of recording is about 0.45 GB an hour.
- 6 cameras at 4 Mbit/s, recorded around the clock for a week: about 1.8 TB.
- The same 6 cameras kept around the clock for 3 days, then motion only: much less, depending on how busy the scene is.
- Alerts only, kept 30 days: smaller again, since only footage around tracked objects survives.
Frigate's retention settings handle those choices for you: a separate number of days for each kind of footage, and clips you export are never deleted by them. The GPU machines start with a mirrored pair of drives; you can set larger drives and the RAID level in the same order, and our storage servers are there when the archive outgrows one machine. Frigate recommends local disks over network storage for recordings.
Up and running in an evening
- Choose the card and a host with AVX2 on the build-to-order page, with Debian or Ubuntu. A card already in a racked machine is about 30 minutes once approved; fitting a card we hold takes 4-24 hours, and 5-10 working days if the card has to be bought in.
- Set up NVIDIA's driver plus its Container Toolkit, then Docker Engine using its apt repository method, the way Frigate's getting-started guide does.
- Run the checks below, then bring your WireGuard tunnel up so the server can reach the camera network.
- Export a YOLOv9 model to ONNX with the build command in Frigate's detector docs (the s variant at 320 is their suggested start) and put the file in
config/model_cache. - Start Frigate with
docker compose up -d. It prints a generated admin password in its log: read it withdocker logs frigate, log in, and set your own under Settings > Users (Frigate wants at least 12 characters).
grep -c avx2 /proc/cpuinfo # 0 means Frigate will not run on this processor
nvidia-smi # driver 545 or newer, and your card listed
mkdir storage config && touch docker-compose.yml
services:
frigate:
container_name: frigate
restart: unless-stopped
stop_grace_period: 30s
image: ghcr.io/blakeblackshear/frigate:stable-tensorrt
shm_size: "512mb" # adjust with the shm calculator in Frigate's docs
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
volumes:
- ./config:/config
- ./storage:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "127.0.0.1:8971:8971" # reach it with an SSH tunnel: ssh -L 8971:127.0.0.1:8971 root@server
mqtt:
enabled: False # turn on if you run Home Assistant / an MQTT broker
detectors:
onnx:
type: onnx
model:
model_type: yolo-generic
width: 320
height: 320
input_tensor: nchw
input_dtype: float
path: /config/model_cache/yolov9-s-320.onnx
labelmap_path: /labelmap/coco-80.txt
ffmpeg:
hwaccel_args: preset-nvidia
cameras:
driveway:
ffmpeg:
inputs:
- path: rtsp://10.20.0.11:554/stream2 # small substream, 5 fps
roles: [detect]
- path: rtsp://10.20.0.11:554/stream1 # main stream
roles: [record]
record:
enabled: True
Keeping it safe and healthy
- Only port 8971 asks for a login. Port 5000 has none, and the RTSP restream on 8554 is open by default, so keep both off the internet.
- A Docker port mapping skips your firewall rules, which is why the example binds the UI to 127.0.0.1: open it with an SSH tunnel (or bind it to the server's WireGuard address if you reach it over a VPN).
- Copy the
configfolder somewhere else regularly. It holds your settings and Frigate's database. - Update the image when you choose to, not automatically, and keep the NVIDIA driver at a version Frigate supports.
- If a driver update knocks the network out, the machine's own management console (iLO or iDRAC) still shows you the screen.
Questions people ask
- Do I need a Coral or Hailo stick if I have an NVIDIA card?
- No. Frigate runs detection on the NVIDIA card itself through its ONNX detector in the stable-tensorrt image. Frigate also cannot mix detector types for object detection, so one card does the whole job.
- Which NVIDIA cards work with Frigate?
- Any card with compute capability 5.0 or higher on a driver from version 545 onward, according to Frigate's docs. Check your card in NVIDIA's compute capability table. Also check the processor in the same machine, because Frigate needs AVX2.
- Is the GPU shared with anyone?
- No. Your operating system gets the whole card directly, in a physical machine that only your account uses. There is no vGPU, no time-slicing and no other tenant on it.
- Will remote cameras make my alerts slow?
- A little, because video travels to the data centre before Frigate sees it. How much depends on the distance and your line, so pick the city nearest your cameras. If you need the fastest possible alerts, a recorder on site is the better tool.
- What upload speed does each camera use?
- It is whatever bitrate the camera is set to send, for the substream and the main stream together, continuously. Frigate's camera wizard shows an estimated figure for each stream, so add those up before you commit.