TC
Troy’s Tech Corner
build tech2026-02-0830 min

Build a Home Security Camera System with Raspberry Pi

Create your own DIY security camera with motion detection, night vision, and remote viewing. No monthly fees, complete privacy, and expandable to multiple cameras.

Difficulty: ⭐⭐⭐ Intermediate | Time: 2-4 hours | Cost: $90-180 per camera

Quick Shopping List

Raspberry Pi (Choose One):

Camera (Choose Based on Needs):

Storage:

Power:

Case & Mounting:

Night Vision (if using NoIR camera):

Advanced Options:

Total Cost:

  • Basic (daylight, Pi Zero): ~$90
  • Standard (Pi 4, night vision): ~$140
  • Premium (Pi 4, SSD, PoE): ~$180

What You're Building

✅ Motion-triggered recording
✅ 24/7 monitoring with night vision
✅ Remote viewing via phone/computer
✅ Local storage (no cloud fees)
✅ Expandable to multiple cameras
✅ Smart home integration

Camera Options Explained

Camera Module V2: Great for daylight, 8MP, 1080p video, fixed focus

Camera Module 3: Latest version, autofocus, better low light, HDR

NoIR Camera: No IR filter, sees in complete darkness with IR illuminator, black & white night mode

Arducam with Case: Includes protective case, good all-around option

Recommendation: NoIR Camera + IR Illuminator for 24/7 security

Step-by-Step Setup

1. Install MotionEyeOS

  1. Download from: github.com/motioneye-project/motioneyeos/releases
  2. Flash to microSD card using Raspberry Pi Imager
  3. Choose image for your Pi model

2. Connect Camera

Power off Pi first!

  1. Locate camera port (between HDMI and USB)
  2. Pull up black clip gently
  3. Insert ribbon cable (blue side facing out)
  4. Push clip down to secure

3. Boot and Configure

  1. Insert SD card, connect ethernet (or Wi-Fi)
  2. Power on with Pi power supply
  3. Find Pi IP address (check router or use Fing app)
  4. Open browser: http://[PI_IP]
  5. Login: username admin, password (blank)

4. Basic Setup

Set password:

  • Menu → Settings → Admin Password

Configure camera:

  • Resolution: 1920x1080 (1080p)
  • Frame Rate: 15-20 FPS
  • Quality: 75%

5. Enable Motion Detection

  1. Motion Detection → Enable
  2. Frame Change Threshold: 2-5%
  3. Configure alerts (email/webhook)
  4. Set recording to USB storage or SSD

6. Add Storage

  1. Plug USB drive or SSD into Pi
  2. Menu → Storage → Select USB device
  3. Recording Mode: Motion triggered (saves space)
  4. Preserve: 7 days (auto-delete older footage)

Night Vision Setup

With NoIR Camera:

  1. Install IR illuminator near camera
  2. Point IR LEDs in same direction as camera
  3. Test in complete darkness
  4. Adjust camera exposure if needed

Tips:

  • More IR LEDs = longer range
  • Position to avoid reflections
  • Works through weatherproof case

Outdoor Installation

Using Weatherproof Case:

  1. Mount Pi and camera inside case
  2. Seal cable entry points
  3. Angle downward to prevent rain on lens
  4. Use long power cable if outlet is far
  5. Consider PoE HAT for single-cable installation

Power Over Ethernet (Advanced)

For clean, professional installation:

For Pi 4/3B+: PoE HAT

  • Powers Pi via ethernet cable
  • No separate power cable needed
  • Includes cooling fan
  • Requires PoE switch or injector

For Pi Zero: PoE HAT with USB Hub

  • Adds ethernet + power
  • 3x USB ports
  • Compact solution

Remote Viewing

Option 1: VPN (Recommended)

  • Set up VPN server (PiVPN)
  • Access securely from anywhere
  • No port forwarding needed

Option 2: Tailscale (Easiest)

  • Install Tailscale on Pi and phone
  • Automatic secure connection
  • Works anywhere

Option 3: Port Forwarding (Not Recommended)

  • Security risk
  • Use VPN instead

Storage Recommendations

1TB USB Drive (HDD):

  • More affordable
  • Motion-only: 100+ days
  • Continuous: 60-90 days
  • Slower access

1TB SSD (Recommended):

  • Faster, more reliable
  • Better for continuous recording
  • Silent operation
  • Worth the extra cost

Multi-Camera Setup

Add more cameras:

  1. Set up additional Pis with cameras
  2. Menu → Add Camera → Network Camera
  3. Enter other Pi's IP and credentials
  4. View all cameras in one interface

Or use USB webcams as additional cameras on same Pi

Troubleshooting

No camera feed: Check cable connection, reboot Pi

Motion detection too sensitive: Increase threshold, mask busy areas

Poor night vision: Add more IR LEDs, adjust exposure

Storage filling up: Reduce retention days, lower resolution/FPS

Cost Comparison

DIY Raspberry Pi: $90-180 one-time, $0/month

vs. Commercial:

  • Nest Cam: $180 + $6-12/month
  • Ring: $180 + $3-10/month
  • Arlo: $200 + $3-10/month

Savings: $50-120 per year + equipment savings

Tips for Best Results

Camera placement:

  • Entry points (doors, windows)
  • 8-10 feet high
  • Avoid direct sunlight
  • Cover driveways and walkways

For reliability:

  • Use ethernet over Wi-Fi
  • Quality power supply
  • SSD over HDD for continuous recording

For best image:

  • Clean lens regularly
  • Proper IR illuminator placement
  • Avoid reflective surfaces

What's Next?

  • Add AI object detection (Frigate)
  • Integrate with Home Assistant
  • Set up cloud backup
  • Add license plate recognition
  • Multiple camera zones

Resources

  • MotionEyeOS: github.com/motioneye-project/motioneyeos
  • r/raspberry_pi
  • r/homedefense

Build your security system today! Professional-grade monitoring without monthly fees.

Disclosure: Troy's Tech Corner participates in the Amazon Associates Program. We may earn a commission from qualifying purchases at no additional cost to you.

Enjoyed this guide?

Get more beginner-friendly tech explanations and guides sent to your inbox.

No spam. Unsubscribe at any time. We respect your privacy.

Related Guides