Stop Paying a Monthly Subscription for Security Cameras. Build Your Own with Raspberry Pi & Frigate
I recently booted up an old indoor security camera from a company I won't name. I haven't always had a consistent need for a security camera, but sometimes you move to a new location or simply think about the state of your home security and realize it might be time to bust out the ol' camera or maybe invest in one if you're starting from scratch. I set it up, saw the feed, and everything looked great. NICE.
In a matter of minutes though, I was reminded of the painful reality of using products from many home security camera companies. I was testing the motion detector, got the motion notification after I jumped into frame and flailed my arms around with a grin on my face. I click on the notification to review the footage from the recording event and...

PAYWALL.
I was immediately reminded of the frustration that I guess I had just forgotten about. The proposition seemed ridiculous to me. A monthly subscription just to let me see my own footage recorded in my own apartment? It felt like this company was holding my data hostage and charging me rent for it. They don't even hold the data in the cloud to access for that long--recorded clips stay in their cloud for only 60 days. And sure, they offer a "local storage" option, but you have to buy their proprietary hub and it's still limited. Not very cool, and no thank you.
I knew there were DIY solutions out there but hadn't really looked to much into them before. This time hitting the paywall felt more personal because I have my own cloud storage that I've been loving, and it just felt like a tremendous injustice to not be able to use it. So I got to work, dusting off an old, cheap Raspberry Pi that has been waiting in a drawer for years for its next opportunity to shine.
The results? SUCCESS! Now, there are things you'll want to take note of depending on your needs and situation, but here's a guide on how you can do it too!
Today, we are building a fully custom, AI-powered, subscription-free security system using an old Raspberry Pi, a cheap $15 camera, and the power of OPEN SOURCE. You own the data. You control the hardware. Zero monthly fees.
The "Secret Sauce": RTSP
Before we buy anything, we need to quickly talk about RTSP (Real-Time Streaming Protocol). This is the key. We want raw access to the video stream so we can feed it into our own software. So, just make sure you...
Get a camera that supports RTSP.
Most "smart" cameras lock their video feed inside their app. We don't want that, because that's exactly what locked us into the company managed ecosystem in the first place. I used a TP-Link Tapo C100. It's like $15 on Amazon, does 1080p, and most importantly: it lets us tap into the stream! (It feels like hacking, super cool and rewarding). Eufy and Reolink also have good options.
The Hardware Checklist
- Raspberry Pi 3 Model B+: Yeah, it's old. A Pi 4 or 5 is better, but the 3 B+ works if we tune it right.
- TP-Link Tapo C100 Camera: Cheap, effective, RTSP-ready.
- Micro SD Card: Get a fast one because we're writing video data.
As mentioned earlier, I had this Raspberry Pi from buying it years ago for tinkering around with projects like this. If you intend to take full advantage of Frigate's AI object recognition and have several cameras, make sure you have a capable CPU with integrated graphics, 16GB RAM, and an SSD for stream writes.
The Software Stack
We are going to use Docker. If you aren't using Docker yet, I'm envious of the joy you're about to experience. It makes everything so easy! We'll spin up isolated containers for our apps.
Here is our star lineup:
- Frigate: This is the magic. It's an open-source NVR (Network Video Recorder) with AI object detection. It can tell the difference between a person, a dog, and a tree blowing in the wind.
- Rclone: To beam our data to the cloud using a cron job.
- NextCloud: My personal cloud. You could use Google Drive or Dropbox, but self-hosting NextCloud is the way to go for true privacy.
Step 1: Unlock the Camera 🔓
First, set up the Tapo camera in their app. But we aren't stopping there.
- Go to Device Settings > Advanced Settings > Device Account.
- Create a username and password. Keep these somewhere safe.
- Find the camera's IP address (check your router). Pro tip: Set a Static IP in your router so it doesn't change on you!
Now you have your RTSP URL. It looks like this:
rtsp://username:password@192.168.x.x:554/stream1
That URL is your ticket to accessing the stream. This is what the URL format is specifically for the TAPO C100. If you're using a different camera, chances are the format will be a little different but don't worry, you can look up the RTSP URL format for your specific camera with google pretty quickly.
Step 2: Prep the Pi 🥧
Install Raspberry Pi OS Lite (install docs here). Then, SSH into your new Pi buddy and let's install Docker. Copy-paste this:
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker pi
Log out and log back in. Congratulations, you are now a Docker user!
Step 3: Unleash Frigate 🦅
We need to tell Frigate how to talk to our camera.
mkdir -p ~/security-cam/config
mkdir -p ~/security-cam/storage
cd ~/security-cam
vim config/config.yml
Paste this in (and swap in your RTSP URL):
mqtt:
enabled: False
cameras:
front_door:
ffmpeg:
inputs:
- path: rtsp://user:pass@192.168.1.100:554/stream2 # Low res for detection
roles:
- detect
- path: rtsp://user:pass@192.168.1.100:554/stream1 # High res for recording
roles:
- record
detect:
width: 640
height: 360
fps: 5 # Low FPS because the Pi 3 is trying its best!
objects:
track:
- person
record:
enabled: True
retain:
days: 3
mode: motion
Note: I'm keeping the FPS low because the Pi 3 B+ CPU is sweating. If you have a capable CPU or add a Google Coral USB Accelerator, you can crank this up!
Now, let's spin it up with docker-compose.yml:
version: "3.9"
services:
frigate:
container_name: frigate
privileged: true
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "128mb" # Frigate needs this!
volumes:
- /etc/localtime:/etc/localtime:ro
- ./config/config.yml:/config/config.yml
- ./storage:/media/frigate
- type: tmpfs # Save your SD card! Use RAM!
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "8554:8554"
Run it:
docker compose up -d
Go to http://<your-pi-ip>:5000. Voila, you have a security system.
Step 4: The Cloud Backup ☁️
So at the moment, your configured recordings are being written to the local storage. There are situations where this data can fill up pretty fast, so it's a good idea to quickly set up data back-ups. That way, you can keep recordings for as long as you want to, let Frigate routinely clean up the clips that are locally stored and the system is allowed to run smoothly. Let's setup cloud syncing.
We'll use Rclone. It's like a Swiss Army knife for cloud storage.
curl https://rclone.org/install.sh | sudo bash
rclone config
Follow the prompts. Hook it up to NextCloud, Google Drive, whatever you want.
Then, script it! Create sync_footage.sh:
#!/bin/bash
rclone copy /home/pi/security-cam/storage/recordings nextcloud:/SecurityCamera/recordings --transfers 4
Then, make a cron job to run it with any desired frequency you like. Now your footage is safely backed-up.
Optional Quality of Life Steps
I did two key steps to enable two features that I really value, which is being able to check the camera when I'm away from home and getting phone notifications on object recognition, so here is a quick note on how I accomplished them.
Phone notifications: For a little bit I was using a simple DIY python service to send emails via gmail so I didn't have to worry about being on the same network, but this presented custom notification issues. My phone, and seemingly many, don't provide baseline OS custom notification rules for specific email labels, so I couldn't separate out general email notifications from camera notifications. So I ended up going with a cool service called ntfy. It's an open-source notification service, you can use their server for free for up to 250 messages per day. If you need more, you can self-host for free.
Secure Remote Frigate Server Access: This part was surprisingly simple. At this point, Frigate is currently protected by my password protected WiFi network, and it's not a good idea to expose it to the internet. So, I had heard good things about Tailscale, gave it a try and it's perfect for the use case. Now, when I'm away from home on a different network, I can securely access my Frigate server on the "Tailnet," as long as the Frigate server is on the Tailnet and the device I'm trying to access it from is also on the Tailnet. Tailscale lets you have 100 devices and up to 3 users entirely free. Super cool!
Done ✅
Now you have a system that is extensible and you and create rules as complicated as you want--it's really up to you! It quickly pays itself off after months compared to paying for a subscription, and a lot quicker if the system you end up with has several cameras, but the end result here is so much more than just the dollar value. The data is completely yours and you get to do whatever you want with it.
I can tell you that I have been running this one Tapo cam with my Raspberry Pi for a few weeks now and it's been doing exactly what I need it to, which is record when it detects humans and send a notification to me when these events happen. Because I'm limited with the old hardware, I made a simple service that listens for messages from Frigate and sends a notification, so this will do for the time being until this little Raspberry Pi craps out or I need to add more cameras.
It detects people. It notifies. It records. It backs up. And it costs $0/month. This is the power of Linux, Open Source, and impressively powerful hardware that's only becoming more accessible over time.
If you found value in this article, please consider supporting me with a one time or recurring donation! The donation link is at the bottom of this website. If you followed this tutorial and you're now free from the clutches of subscription-based home security, send me an email because I'd love to hear about these wins. Thank you for reading!