Record your camera at home, let AI spot people and cars, and get a photo on your phone when it does. Each step explains what’s happening in plain English. Open “More detailed info” when you’re ready for the exact settings.
Why build your own?
Most Wi-Fi cameras send your video to the manufacturer’s servers, and the useful features, like recordings and person alerts, often sit behind a monthly subscription. Your footage lives on someone else’s computer.
In this guide your camera records to a computer in your own home. Free software watches the video, recognizes people and cars, and sends a snapshot to your phone. No video leaves your house unless you open it yourself.
What you need
- A Wi-Fi or wired camera that supports RTSP, a standard way to stream video on your home network. Many affordable models do, including TP-Link Tapo, Reolink and Amcrest cameras.
- A computer that stays on all the time, running Linux. An old desktop or a small mini PC is plenty for a few cameras. If you’re new to Linux, use Ubuntu LTS: every command in this guide works on it as written. Other Linux systems that run Docker work too. Windows and macOS aren’t a good fit, because Home Assistant’s network setup here needs Linux.
- Storage for the recordings. A few hundred gigabytes is enough to start. The storage section below helps you size it.
- A phone with the free Home Assistant app, for notifications.

Where to put the camera
Where the camera goes matters as much as which one you buy. A poor spot means glare that hides faces at night, a notification every time a car drives by, and video of your neighbors instead of your own door. Open the tips below before you drill any holes or tape a camera to a window. They also explain why the camera in my video is set up the way it is, and why you shouldn’t copy it.
Placement tips: avoid glare, false alerts and filming the neighborsHide placement tips
Point it at your own property
Aim at your own door, driveway or yard, not the street or a neighbor’s house. You get fewer false alerts, and you respect your neighbors’ privacy.
Outside beats behind a window
The Tapo C113 is made for outdoor use and comes with mounting screws, so mounting it outside, under an overhang, costs nothing extra. Behind glass, the camera’s own night lights reflect off the window and wash out the picture.
If it has to go behind glass
Press the lens right against the window, block the light around it with black foam or a dark cloth, keep room lights behind it off at night, and turn off night vision in the camera’s settings in the Tapo app. Window mounts with a built-in anti-glare hood exist, such as Wyze’s, but they only fit their own brand’s cameras, so check before you buy.
About the camera in my video
For the demo, I set the camera behind a window, looking across the street, because it was quick to set up for filming. It isn’t ideal, and you’ll see why: reflections in the glass, passing cars setting off alerts, and most of the picture blurred because it shows other people’s property. I’ll move mine later. Pick the spot that works for your home.
The three programs, in plain English
- Frigate is the recorder. It saves the video and uses AI to notice people, cars and pets.
- Home Assistant is the brain of a smart home. Here it turns “Frigate saw a person” into a notification on your phone.
- Mosquitto is the messenger. Frigate posts its news there, and Home Assistant listens. The language they use is called MQTT.
All three run in Docker, which packages each program with everything it needs. You don’t install them one by one; you describe them in a single file and start them together.
What it costs, compared with a cloud subscription
Expect about $50–280 up front, depending on what you already own, plus electricity, and no monthly fee. Cloud cameras with around-the-clock recording and AI alerts run $100–240 a year in subscriptions, every year.

More detailed infoLess info
What you pay for this build
| Item | Cost | Notes |
|---|---|---|
| One RTSP camera | $20–30 | A TP-Link Tapo C113 is often $20–26 on sale. Each extra camera costs just its price. |
| Always-on computer | $0–150 | An old desktop or laptop you already own costs nothing. A used office mini PC is roughly $60–150. |
| Storage | $0–70 | A spare drive is free. A new 2 TB drive is roughly $60–70 and holds weeks of footage for a camera or two. |
| Frigate, Home Assistant, Mosquitto, Docker | $0 | Free and open source. |
| Tailscale | $0 | The free personal plan is plenty for a household. |
| Electricity | ≈ $15–150/yr | The one bill that never stops. A small mini PC draws around 10–20 W; an old desktop 35–50 W. At $0.18–0.35 per kWh, that’s roughly $15–60 a year for a mini PC and $55–150 for a desktop. |
What the cloud versions cost
The cameras themselves are cheap: Ring’s indoor cameras are often $25–60 and its outdoor ones $60–100. The plan is where the money goes, every month, for as long as you want your recordings:
| Cloud plan | What you get | Per month | Per year |
|---|---|---|---|
| Ring Home Basic | Event clips, person and package alerts, one camera | $4.99 | $49.99 |
| Ring Home Premium | Adds 24/7 recording and AI video search | $19.99 | $199.99 |
| Google Home Premium Standard | 30 days of event video, smart alerts, all cameras | $10 | $100 |
| Google Home Premium Advanced | Adds 10 days of 24/7 video and AI descriptions | $20 | $200 |
| Arlo Secure | Event recording and smart alerts; one camera vs unlimited | ≈ $8–20 | ≈ $96–240 |
Three years, two cameras, recording around the clock
| Option | Up front | Each year | 3-year total |
|---|---|---|---|
| DIY with a computer you already own | ≈ $50 (cameras) | ≈ $55–150 (power) | ≈ $205–510 |
| DIY with a used mini PC + new drive | ≈ $160–280 | ≈ $15–60 (power) | ≈ $205–460 |
| Ring Home Premium | ≈ $50–200 (cameras) | $199.99 | ≈ $650–800 |
| Google Home Premium Advanced | ≈ $200+ (cameras) | $200 | ≈ $800+ |
The saving is real but honest-sized: a few hundred dollars over three years, not thousands. It grows with every camera you add, since DIY cameras cost only their price. Notice that an efficient mini PC can beat a “free” old desktop within a couple of years, just on electricity.
The bigger wins aren’t on the bill. Your video never leaves your house. Nothing stops working if a company changes its plans, raises prices or shuts a service down. And you learn how the whole thing works, which is half the fun. The trade-off is your time: an afternoon to build, and an hour a month to keep it updated.
Prices checked in November 2026 and rounded. Subscription prices change often and vary by region, so check the current plans before you decide. Sources: Google Home Premium announcement, Ring Home plans, Arlo plans (SafeWise), Tapo C113 (TP-Link store).
Turn on your camera’s local stream
Cameras usually keep their RTSP stream switched off until you create a separate username and password for it in the camera’s app.
More detailed infoLess info
On a TP-Link Tapo camera: open the Tapo app, tap the camera, then the gear icon → Advanced Settings → Camera Account. Create a username and password. This is separate from your Tapo account login.
Then find the camera’s address on your network. Your router’s app or web page lists connected devices, and the camera appears with an address like 192.168.1.50. In the router, reserve that address for the camera (often called a “DHCP reservation”) so it never changes.
A Tapo camera’s streams are then:
rtsp://USERNAME:PASSWORD@192.168.1.50:554/stream1 (high quality) rtsp://USERNAME:PASSWORD@192.168.1.50:554/stream2 (low quality)
To test one, open it in the free VLC player (Media → Open Network Stream). On Ubuntu, install VLC from the App Center (or sudo snap install vlc): the version from apt can’t play camera streams. If you see video, the camera side is done. Other brands use different paths; search for your model plus “RTSP URL.”
Install Docker on the always-on computer
Docker runs the three programs for you. You install it once.
More detailed infoLess info
Docker’s official install script works on Ubuntu, Debian, Fedora and most other Linux systems:
$ sudo apt install -y curl $ curl -fsSL https://get.docker.com | sudo sh $ sudo usermod -aG docker $USER
The second line lets you run Docker without typing sudo every time. Log out and back in for it to take effect, then check:
$ docker compose versionAny version number means you’re ready.
Create the project folder and its files
One folder holds everything: a file describing the three programs, a private file with your camera password, and a small settings file for the messenger.
More detailed infoLess info
$ mkdir -p ~/homeautomation/{frigate/config,mosquitto/config} $ cd ~/homeautomation
a. compose.yaml: the three programs
services:
mosquitto:
image: eclipse-mosquitto:2
restart: unless-stopped
volumes:
- ./mosquitto/config:/mosquitto/config
ports:
- "127.0.0.1:1883:1883"
frigate:
image: ghcr.io/blakeblackshear/frigate:stable
restart: unless-stopped
shm_size: "256mb"
env_file: .env
volumes:
- ./frigate/config:/config
- ./frigate/storage:/media/frigate
ports:
- "8971:8971"
- "127.0.0.1:5000:5000"
- "127.0.0.1:8554:8554"
- "8555:8555/tcp"
- "8555:8555/udp"
homeassistant:
image: ghcr.io/home-assistant/home-assistant:stable
restart: unless-stopped
network_mode: host
volumes:
- ./homeassistant/config:/configThe ports starting with 127.0.0.1 are only reachable from this computer. Those services have no password of their own, so keeping them local is an important safety step. Home Assistant runs on the computer’s own network, so it can still reach them.
b. .env: your camera login
FRIGATE_RTSP_USER=your-camera-username FRIGATE_RTSP_PASSWORD=your-camera-password
Keep this file private, and never share it or upload it anywhere. Use only letters and numbers in the camera account’s password. Symbols such as @, :, /, # or ! break the stream address, so change the password in the camera app if it has any. If you change this file later, run docker compose up -d --force-recreate frigate; a plain restart doesn’t read it again.
c. mosquitto.conf: the messenger’s settings
listener 1883 allow_anonymous true
Allowing connections without a password is acceptable here only because the compose file limits the messenger to this computer and Docker’s internal network.
Tell Frigate about your camera
Frigate’s settings file says where the camera is, what to look for, and how long to keep recordings.
More detailed infoLess info
Replace 192.168.1.50 with your camera’s address. The {FRIGATE_RTSP_USER} parts are filled in from your .env file, so the password never appears here.
mqtt:
host: mosquitto
port: 1883
detectors:
ov:
type: openvino
device: CPU
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
path: /openvino-model/ssdlite_mobilenet_v2.xml
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
go2rtc:
streams:
front_door:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.50:554/stream1
front_door_sub:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.50:554/stream2
record:
enabled: true
continuous:
days: 3
alerts:
retain:
days: 30
snapshots:
enabled: true
objects:
track: [person, car, dog, cat]
cameras:
front_door:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front_door
input_args: preset-rtsp-restream
roles: [record]
- path: rtsp://127.0.0.1:8554/front_door_sub
input_args: preset-rtsp-restream
roles: [detect]
detect:
enabled: true
fps: 5- go2rtc connects to the camera once and shares that stream with everything else, which small cameras handle much better than several connections at once.
- The high-quality stream is recorded and the low-quality stream is watched by the AI, which keeps the computer’s workload low.
- OpenVINO runs the AI efficiently on an ordinary Intel or AMD processor. No graphics card is needed.
- Recordings: everything is kept for 3 days, and clips of people and cars for 30.
Facing a street? Every passing car becomes an alert, and a notification on your phone. To be notified only about people, add these lines under front_door:, lined up with detect:. Cars are still recorded and still show up in Frigate under Detections.
review:
alerts:
labels: [person]Rather not edit the file by hand? This adds the same three lines right after fps: 5, then shows them so you can check. Run it only once: running it again adds the lines twice. With more than one camera, it adds them to each one.
$ cd ~/homeautomation $ sed -i '/^ fps: 5$/a\ review:\n alerts:\n labels: [person]' frigate/config/config.yml $ grep -n -B3 -A6 'fps: 5' frigate/config/config.yml
Either way, restart Frigate so it reads the change. After about 30 seconds, the last command should print detect: True | alert labels: ['person']:
$ docker compose restart frigate $ curl -s http://127.0.0.1:5000/api/config | python3 -c "import sys,json; c=json.load(sys.stdin)['cameras']['front_door']; print('detect:', c['detect']['enabled'], '| alert labels:', c['review']['alerts']['labels'])"
Start everything and log in to Frigate
One command starts all three programs. Frigate creates an admin password the first time it starts, and shows it only once, so save it right away.
More detailed infoLess info
$ docker compose up -d $ docker compose logs frigate | grep -iA2 password
The first run downloads a few gigabytes, so give it some minutes. Then open https://COMPUTER_IP:8971 in a browser, where COMPUTER_IP is the address of your always-on computer. Your browser will warn that the connection isn’t private, because Frigate uses its own certificate. That’s expected on your home network, so continue to the page.
Log in as admin with the password from the log. Then go to Settings → Users, set a password of your own, and save it in your password manager.
Forgot it? Add auth: reset_admin_password: true to config.yml, restart Frigate, read the new password from the log, log in, and then remove that line again.
Set up Home Assistant and connect it to Frigate
Create your Home Assistant account, connect it to the messenger, and add the Frigate integration so it can see your camera.
More detailed infoLess info
a. Create your account
Open http://COMPUTER_IP:8123 and follow the welcome screens to create your account and set your home’s location.
b. Connect the messenger
Go to Settings → Devices & services → Add integration, search for MQTT, and enter 127.0.0.1 as the broker with port 1883. Leave the username and password empty.
c. Add Frigate
The Frigate integration comes from the community, so install it from Home Assistant’s Marketplace, the built-in store that replaced the older HACS add-on. Search for Frigate, install it, and restart Home Assistant if it asks. Then go to Settings → Devices & services → Add integration → Frigate. It suggests an address like http://ccab4aaf-frigate:5000, which is for a different kind of install and fails to connect. Replace it with:
http://127.0.0.1:5000
Your camera now appears in Home Assistant, along with sensors that count the people and cars it sees.
Get a photo on your phone when someone shows up
Install the Home Assistant app on your phone and log in. Then add one automation that sends a snapshot whenever Frigate spots a person or a car (or only a person, if you set that up in step 04).
More detailed infoLess info
Install Home Assistant from the App Store or Google Play, connect it to http://COMPUTER_IP:8123, and allow notifications. Your phone now appears in Home Assistant as a device that can receive them.
Go to Settings → Automations & scenes → Create automation, open the menu (⋮) and choose Edit in YAML. Paste this, replacing your_phone with your phone’s name as Home Assistant knows it. To find it, add a step in the visual editor and search for mobile_app: the phone appears as “Send a notification via mobile_app_…”. If you connected the phone twice, the name ends in _2.
alias: "Camera: notify my phone on alerts"
mode: single
max_exceeded: silent
triggers:
- trigger: mqtt
topic: frigate/reviews
value_template: "{{ value_json.type }}"
payload: new
conditions:
- condition: template
value_template: "{{ trigger.payload_json.after.severity == 'alert' }}"
actions:
- variables:
review: "{{ trigger.payload_json.after }}"
event_id: "{{ review.data.detections[0] }}"
- action: notify.mobile_app_your_phone
data:
title: "{{ review.data.objects | unique | join(', ') | title }} detected"
message: "{{ review.camera | replace('_', ' ') | title }}"
data:
image: "/api/frigate/notifications/{{ event_id }}/snapshot.jpg"
- delay: "00:01:00"The one-minute pause at the end is a cooldown: one person walking around your yard sends one notification, not ten. Save it and walk in front of the camera to test it.
Keep it private and secure
Never open your camera system to the internet through your router. To check it from away, use a private network app like Tailscale, and turn on two-factor login in Home Assistant.
More detailed infoLess info
No port forwarding
Port forwarding in your router makes a service reachable by the entire internet, where automated scanners constantly try passwords. Don’t forward ports 8123, 8971, 8554 or 8555.
Tailscale for access from anywhere
Tailscale is a free app that links your own devices into a private, encrypted network. Install it on the always-on computer and on your phone, and sign in with the same account. Your phone can then reach Home Assistant at the computer’s Tailscale address, which starts with 100., from anywhere, while nobody else can. In the phone app, turn on VPN On Demand (iPhone and iPad) or Always-on VPN (Android) so it stays connected.
Two-factor login
In Home Assistant, click your profile, open Security, and enable the Authenticator app under multi-factor authentication. Even if your password leaks, nobody gets in without the code from your phone.
Who can see what on your Wi-Fi
Your router keeps the internet out, but anyone on your Wi-Fi is already inside. That includes guests and any smart gadget with a security flaw. That’s why the compose file keeps the password-free services local.
Keep everything up to date
Updates fix security holes, and nothing in this setup installs them for you. Once a month, back up your settings and run two commands.
More detailed infoLess info
a. Back up first
Copy Frigate’s settings folder, so you can go back if an update changes something:
$ cd ~/homeautomation $ sudo cp -a frigate/config frigate/config.bak-$(date +%F) $ ls frigate
ls should now list a config.bak- folder with today’s date next to config.
It needs sudo because Frigate runs as the administrator inside Docker, so it owns the files it creates, including a secret login key only it can read. Without sudo, the copy stops with “Permission denied”. The -a keeps the original owners and permissions, so that key stays protected in the backup too.
For Home Assistant, go to Settings → System → Backups and create a backup. If it shows you an encryption key, save it in your password manager: you need it to restore the backup.
b. Check the release notes for big jumps
Frigate’s version numbers look like 0.17, 0.18. When the middle number changes, the settings file format can change too. Read the release notes on Frigate’s GitHub page before updating across one of those jumps.
c. Download and switch to the new versions
$ docker compose pull $ docker compose up -d $ docker image prune -f
pull downloads the newest versions, up -d restarts only the programs that changed, and image prune deletes the old versions to free disk space. Recording pauses for about 30 seconds while Frigate restarts.
d. Update the rest
- Home Assistant integrations, including Frigate: open Settings → Marketplace and install any updates, then restart Home Assistant if asked.
- The Home Assistant and Tailscale apps on your phone: update them from the App Store or Google Play.
- Your camera’s firmware: the camera’s app shows when an update is available.
- The computer itself: on Ubuntu or Debian,
sudo apt update && sudo apt upgrade. On Fedora,sudo dnf upgrade.
e. Check it still works
First, check all three programs are running. Each line should say Up, and Frigate and Home Assistant should add (healthy) after a minute:
$ docker compose psThen open Frigate and confirm the camera shows live video, then walk in front of it to make sure a notification still arrives. If something broke, read the log with docker compose logs frigate (in the homeautomation folder), or put your backed-up config folder back.
Allow only your Tailscale devices
Once all your phones and tablets use Tailscale, you can close Home Assistant and Frigate to your home network completely. Then even someone on your Wi-Fi can’t reach the login page.
More detailed infoLess info
This is optional, and it makes Tailscale a requirement: every device that opens Home Assistant or Frigate, at home or away, needs Tailscale switched on. These steps are for Ubuntu with its built-in ufw firewall.
a. Move your devices to Tailscale first
In the Home Assistant app on each phone and tablet, go to Settings → Companion App → your server. Set both Internal URL and External URL to http://COMPUTER_TAILSCALE_IP:8123, the computer’s address that starts with 100.. Check that each one still connects before going on, or you’ll lock yourself out.
b. Close Home Assistant to the home network
List your firewall rules and remove any that let your home network reach port 8123:
$ sudo ufw status numbered $ sudo ufw delete NUMBER
Replace NUMBER with the number shown next to the 8123 rule. Tailscale keeps working without a rule of its own, because it lets its own traffic through before ufw checks anything.
c. Close Frigate to the home network
Docker’s ports skip ufw’s normal rules, so Frigate needs a short block at the end of /etc/ufw/after.rules. First find your network card’s name, often something like eno1 or enp3s0:
$ ip -br addr | grep 192.168Back up the file, then add this to the end, replacing eno1 with your network card’s name:
*filter :DOCKER-USER - [0:0] -A DOCKER-USER -i eno1 -p tcp -m conntrack --ctorigdstport 8971 --ctdir ORIGINAL -j DROP -A DOCKER-USER -i eno1 -p tcp -m conntrack --ctorigdstport 8555 --ctdir ORIGINAL -j DROP -A DOCKER-USER -i eno1 -p udp -m conntrack --ctorigdstport 8555 --ctdir ORIGINAL -j DROP -A DOCKER-USER -j RETURN COMMIT
$ sudo cp /etc/ufw/after.rules /etc/ufw/after.rules.bak $ sudo nano /etc/ufw/after.rules $ sudo ufw reload
In plain English: drop any new connection to Frigate’s ports that comes in through the home-network card. Tailscale traffic arrives through a different interface, so it still gets through.
d. Test it
From a laptop on your Wi-Fi with Tailscale off, http://COMPUTER_IP:8123 and https://COMPUTER_IP:8971 should no longer load. With Tailscale on, the 100. addresses should load as before.
e. Optional: point live view at your Tailscale address
Frigate’s live view uses WebRTC, a fast, low-delay way to stream video to a browser. To set it up, Frigate tells your browser which addresses it can be reached at, called candidates, and the browser tries each one. Running inside Docker, Frigate doesn’t know your computer’s Tailscale address on its own, so tell it, and only it:
go2rtc:
webrtc:
candidates:
- COMPUTER_TAILSCALE_IP:8555
streams:
...Don’t add your home-network address or a stun: entry, which you may see in other guides. After step c, the home-network address is blocked, and stun: points at your public internet address, which you haven’t opened. Neither can connect, so the browser would only waste time trying them. Restart Frigate afterwards with docker restart frigate.
Without this, live view still works: Frigate falls back to a slightly slower kind of streaming through its web page.
What you give up
Devices that can’t run Tailscale, like Google Cast speakers and smart displays, can no longer receive audio or announcements from Home Assistant. To undo everything, put back after.rules.bak, re-add your 8123 rule, and run sudo ufw reload.
Add a second camera
Once the first camera works, the next one takes about fifteen minutes: give it a fixed address, test its stream, copy the first camera’s settings under a new name, and restart Frigate. Your phone alerts cover it automatically.
More detailed infoLess info
These steps assume the new camera is called backyard and has the address 192.168.1.51. Use your own name and address.
a. Prepare the camera
- Update its firmware in the camera’s app first. A fresh camera is often several versions behind.
- Create its Camera Account (step 1). If you use the same username and password as your first camera, you don’t need to change
.env. That’s simpler, but one leaked password then opens both cameras. If you choose different ones, add them to.envunder new names, likeFRIGATE_RTSP_USER_2. - Reserve its address in your router (step 1). Frigate has the address written into its settings, so if the address changed, the camera would quietly stop recording.
b. Test the stream
Open rtsp://USERNAME:PASSWORD@192.168.1.51:554/stream1 in VLC, just like the first camera. If you see video, you’re ready.
c. Add it to Frigate
In frigate/config/config.yml, add two lines under streams: and a new block under cameras:, next to your first camera’s:
go2rtc:
streams:
# ...your first camera stays as it is...
backyard:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.51:554/stream1
backyard_sub:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.51:554/stream2
cameras:
# ...your first camera stays as it is...
backyard:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/backyard
input_args: preset-rtsp-restream
roles: [record]
- path: rtsp://127.0.0.1:8554/backyard_sub
input_args: preset-rtsp-restream
roles: [detect]
detect:
enabled: true
fps: 5Camera names in Frigate can’t contain spaces, so use underscores. You can give it a friendlier name in Home Assistant later. Watch the indentation: the new lines must line up exactly with the first camera’s.
$ cd ~/homeautomation $ docker compose restart frigate
After a minute, Frigate’s page should show both cameras with live video.
d. Show it in Home Assistant
Home Assistant doesn’t notice new cameras on its own. Go to Settings → Devices & services → Frigate → ⋮ → Reload. The new camera appears, and you can rename it there, for example to “Backyard”.
The notification automation from step 7 already works for every camera, and each message names the camera it came from. Its one-minute cooldown is shared, though: right after an alert from one camera, an alert from the other waits until the minute is up.
How much more does it cost?
In my own setup, adding a second camera of the same model barely changed things. Each camera recorded about 11 to 12 GB a day, the AI check per frame stayed well under 30 milliseconds, and the 4-core computer kept most of its power free. A second camera roughly doubles your storage, so check the storage section below.
Teach it to spot delivery trucks
If your camera faces the street, a car alert every few minutes gets old fast. Instead, you can train Frigate on your own footage to recognize UPS, USPS, FedEx and Amazon trucks, so only those stand out. It runs entirely on your computer, but it takes a few weeks of examples.
More detailed infoLess info
Frigate’s standard AI knows “car”, but not “UPS truck”. Recent versions of Frigate (this guide uses 0.18) can train a second, small model on pictures from your own camera. It runs on each car it sees and adds a label like ups or none. Everything stays on your computer.
a. Check your computer can do it
Training needs a processor with a feature called AVX2. Most Intel and AMD processors from about 2013 onward have it. This prints avx2 if yours does:
$ grep -o -w avx2 /proc/cpuinfo | head -1The trucks also need to look reasonably big in the picture: Frigate suggests at least 100 × 100 pixels. A camera that sees the street from across a big yard may not be close enough.
b. If your recordings are on another computer, do this first
If Frigate saves to a shared network folder, the setup wizard can fail with “Generation failed. Please try again.” Frigate’s web server keeps recently shown pictures open, and network shares can’t delete open files. Give the model its own folder on the local disk by adding one line under Frigate’s volumes: in compose.yaml:
- ./frigate/classification/delivery_trucks:/media/frigate/clips/delivery_trucks
Then run docker compose up -d. The model must be named exactly delivery_trucks in the next step to use that folder. If your recordings are on the same computer, skip this.
c. Create the model
In Frigate, open Classification → Add Classification and fill in:
- Name:
delivery_trucks - Type: Object, Object label:
car, Classification type: Sub label - Classes:
ups,usps,fedex,amazon(Frigate addsnonefor everything else)

delivery_trucks as the name; this screenshot shows my first attempt.Frigate then shows 24 sample cars and asks you to “Select all images with: ups”. Two things confused me:
- Continue seems to do nothing. It moves to the next class (watch the heading change from ups to usps), but shows the same 24 pictures. If there’s no delivery truck among them, select nothing and press Continue for each class. Unselected cars become
none, which is useful too. A “Missing Class Examples” warning lets you finish anyway. - The circular-arrow icon throws away the pictures and loads new ones. You don’t need it.
d. Collect, tag, train
From now on, Frigate saves pictures of each car under Classification → delivery_trucks. At first they all say Unknown 0%, because nothing has been trained yet. That’s normal.

- When a delivery truck passes, open its group of pictures, pick one or two clear ones, and use the small icon on the picture to tag it (for example
ups). - Tag a few ordinary cars as
noneas well, especially the ones parked on your street every day. One parked car can produce a dozen near-identical pictures, and you only need to tag one or two. - Once each carrier has about 5 to 10 pictures, press Train Model. It takes a few minutes and needs internet the first time.
Expect this to take a few weeks, since you need real trucks to drive by.
Optional: jump-start it with photos from the web
You don’t have to wait for every carrier to drive by before training. Frigate has no upload button for this, but training simply uses every picture in the model’s dataset folders, one folder per class. You can copy photos in through the Frigate container:
$ cd ~/homeautomation $ docker compose cp ./my-ups-photos/. frigate:/media/frigate/clips/delivery_trucks/dataset/ups/
- Use freely licensed photos, such as those on Wikimedia Commons, and keep them for your own training only.
- Pick photos that look like your camera’s view: the whole vehicle, from the side or at an angle, in daylight. Crop each one roughly square around the vehicle. A handful per carrier is enough. Don’t add many more than you have
nonepictures. - Name them so you can find them later, for example
ups-web-01.png. Then press Train Model.
The catch: web photos look different from your camera. They’re sharper, closer and taken at street level. The AI may learn “sharp photo means delivery truck” instead of “brown truck means UPS”, and then miss the real thing. In my setup, the trained model called every ordinary car “none” with high confidence, which is good, but I can’t tell yet how it will handle a real truck. Treat web photos as a starter only. When a real carrier passes, tag one or two of its pictures (even if the model got it wrong), retrain, and once you have about five real pictures per carrier, delete the web photos and retrain again.
e. Keep far-away and parked cars from flooding it
In Settings → Masks / Zones, an object mask tells Frigate to ignore objects in an area. Use one for tiny cars far in the distance, and for spots where cars sit parked for hours. A motion mask over the camera’s on-screen clock stops the changing digits counting as movement. Don’t mask the curb in front of your house: that’s where delivery trucks stop.


What to expect
- UPS’s brown trucks and the USPS mail truck look distinctive, so they’re learned quickly. Amazon is harder: many Amazon deliveries come in plain white rented vans.
- The camera sees every truck on your street, including ones delivering to your neighbors.
- Once it works, a Home Assistant automation can notify you only for these labels, and a log of sightings can show when each carrier usually comes. For that part, simple counting works better than more AI.
How much storage do you need?
Continuous recording uses roughly 20 to 45 GB per camera per day, depending on the camera’s quality. Alert clips add very little.
More detailed infoLess info
Rough figures for one camera recording all day, every day:
| Keep footage for | 1080p (≈2 Mbps) | 2K (≈4 Mbps) |
|---|---|---|
| 3 days | ≈ 65 GB | ≈ 130 GB |
| 7 days | ≈ 150 GB | ≈ 300 GB |
| 30 days | ≈ 650 GB | ≈ 1.3 TB |
These figures are on the safe side. My own 2K cameras stream at only about 1 Mbps, around 11 to 12 GB per day each, so measure yours after a day before buying a drive. Multiply by the number of cameras. Recording only when there’s motion cuts this a lot, often by more than half. Frigate deletes the oldest footage automatically once it passes the number of days you set, so the drive never fills up by surprise.
If the computer’s own disk is small, Frigate can record to a larger drive elsewhere on your network.
Troubleshooting
Most first-time problems are a wrong camera address, a password with special characters, or a phone that can’t reach Home Assistant.
More detailed infoLess info
Frigate shows no video
Test the stream address in VLC first (step 1). If VLC can’t play it either, check the camera’s address and the camera account’s username and password. If VLC works but Frigate doesn’t, read the log with docker compose logs frigate in the homeautomation folder.
Home Assistant can’t find the Frigate integration
If it doesn’t appear after installing it from the Marketplace, restart Home Assistant (Settings → ⋮ → Restart Home Assistant) and search again.
No notifications arrive
On your phone, check that notifications are allowed for the Home Assistant app. In Home Assistant, open the automation and look at Traces to see whether it ran.
Notifications arrive without a picture
Your phone downloads the picture from Home Assistant. Away from home, Tailscale needs to be on for that to work.
Where to go next
This guide stops at a working, private system. To fine-tune it, the projects’ own documentation is the most reliable source: it’s written by the people who make the software, and it changes when the software does.
More detailed infoLess info
Fewer, better alerts (Frigate)
- Review: which objects count as an alert and which are only recorded.
- Zones: alert only when someone enters an area you draw, such as your walkway.
- Masks: ignore things that always move, like the camera’s timestamp or a tree.
- Object filters: confidence and size limits that cut false detections.
Smarter notifications (Home Assistant)
- Automations and conditions: for example, notify only at night, or only when nobody is home.
- People and zones: how Home Assistant knows who is home, using the phone app.
- Phone notifications: pictures, grouping and priority in the companion app.
- The Frigate integration: every sensor, switch and camera it adds to Home Assistant.
- Dashboards: build a camera page that shows what changed at a glance.
Keep it secure
- Securing Home Assistant and two-factor login.
- Tailscale quickstart: reach your cameras from anywhere without opening your router.
Ask for help
- Frigate discussions on GitHub, where the developers answer questions.
- Home Assistant Community forum.
Before you post, search for your error message: most first-time problems have been answered already. Never post your camera passwords, your .env file or your home’s IP addresses.