Privacy Tools Guide

Set up a dedicated Linux PC or Raspberry Pi with large external drives running Frigate or MotionEye to record directly from IP cameras over your local network—no cloud required, no subscriptions. Alternatively, configure your router to attach external storage and set up Samba network shares where cameras record directly. Both methods cost $50-200 in hardware for a complete system that stores months of footage locally while avoiding cloud vendor dependence.

Understanding Your Storage Requirements

Before implementing a solution, calculate your storage needs. Security cameras generate significant data volumes. A single 1080p camera recording continuously at medium quality produces approximately 30GB per day. Higher resolutions or multiple cameras multiply this requirement quickly.

Consider these factors when planning your storage:

For most home installations, a dedicated hard drive with 2-4TB provides adequate storage for 7-14 days of footage from 2-4 cameras using motion-triggered recording.

Option 1: Direct Network Share (SMB/CIFS)

The simplest approach uses your existing network infrastructure. Most modern IP cameras support writing directly to network shares via SMB/CIFS protocol.

Setting Up a Shared Folder

On Linux, create a dedicated storage location:

# Create a dedicated directory
sudo mkdir -p /srv/camera-storage
sudo chown -R $USER:$USER /srv/camera-storage

# Configure Samba share
sudo apt install samba
sudo nano /etc/samba/smb.conf

Add this configuration to /etc/samba/smb.conf:

[cameras]
   path = /srv/camera-storage
   writable = yes
   guest ok = no
   valid users = camerauser
   create mask = 0775
   directory mask = 0775

Create a dedicated user for camera access:

sudo smbpasswd -a camerauser
sudo systemctl restart smbd

Camera Configuration

Access your camera’s web interface and navigate to storage settings. Configure these parameters:

This approach works well for cameras from manufacturers like Amcrest, Reolink, and many Dahua devices. The footage writes directly to your server, bypassing any cloud dependency.

Option 2: RTSP Stream Recording with Dedicated Software

For greater control and compatibility with more camera models, use RTSP streaming with dedicated recording software.

Shinobi is an open-source video management system that runs locally:

# Install dependencies
sudo apt install -y nodejs npm ffmpeg libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++

# Clone and install Shinobi
git clone https://github.com/Shinobi-Systems/Shinobi.git
cd Shinobi
npm install

# Copy configuration
cp conf.sample.json conf.json
cp super.sample.json super.json

# Start Shinobi
node shinobi.js

Configure Shinobi via its web interface at http://your-server:8080. Add your cameras using their RTSP streams, typically formatted as:

rtsp://camera-ip-address:554/user=admin&password=password&channel=1&stream=0.sdp

Recording Configuration

Create a storage plan in Shinobi’s dashboard. Set up different retention periods based on camera location:

{
  "detector": {
    "recordOnDetection": true,
    "saveImmediately": true,
    "timeout": 10
  },
  "recorder": {
    "storage": "/srv/camera-storage",
    "maxRetentionDays": 14,
    "codec": "h264"
  }
}

This configuration enables motion-triggered recording, immediately saving clips when movement is detected.

Option 3: Raspberry Pi with MotionEyeOS

For smaller deployments or edge storage, Raspberry Pi combined with MotionEyeOS provides an excellent solution.

Flashing MotionEyeOS

Download the appropriate image for your Raspberry Pi model:

# For Raspberry Pi 4
wget https://github.com/motioneye-project/motioneyeos/releases/download/20230618/motioneyeos-raspberrypi4-20230618.img.gz

# Flash to SD card
sudo apt install -y zcat gzip dd
sudo zcat motioneyeos-raspberrypi4-20230618.img.gz | sudo dd of=/dev/sdX bs=4M status=progress

Replace /dev/sdX with your actual SD card device.

Initial Configuration

Connect the Raspberry Pi to your network and access the web interface at http://motioneyeos.local. The default credentials are admin with no password.

Configure your cameras by adding them in the camera settings. MotionEye supports various protocols including:

Storage Configuration

Mount external storage for extended recording capacity:

# Format external drive (warning: erases all data)
sudo mkfs.ext4 -L CameraStorage /dev/sdX1

# Mount permanently
sudo mkdir -p /mnt/cameras
sudo mount /dev/sdX1 /mnt/cameras

Configure MotionEye to use this mount point for recordings through the storage settings in the web interface.

Option 4: Containerized Recording with Docker

For developers preferring containerized deployments, combine FFmpeg with Docker for flexible recording.

Docker Compose Configuration

Create a docker-compose.yml file:

version: '3.8'
services:
  camera-recorder:
    image: jshridha/docker-frigate
    container_name: frigate
    privileged: true
    volumes:
      - ./config:/config
      - /mnt/camera-storage:/media/frigate
    ports:
      - "5000:5000"
      - "8554:8554"
    environment:
      - FRIGATE_RTSP_PASSWORD=your_secure_password

Running Frigate

Frigate provides intelligent recording with AI object detection:

# Start the container
docker-compose up -d

# Access the interface
# Open http://localhost:5000

Configure cameras in config/config.yml:

mqtt:
  host: localhost
  user: mqtt_user
  password: mqtt_password

cameras:
  front_door:
    ffmpeg:
      inputs:
        - path: rtsp://camera_ip:554/stream
          roles:
            - detect
            - record
    detect:
      width: 1280
      height: 720
      fps: 5
    record:
      enabled: true
      retain:
        days: 14
        mode: motion

Securing Your Local Storage

Regardless of which method you choose, implement these security practices:

Network Isolation

Place cameras on a separate VLAN from your main devices:

# Example VLAN configuration on many routers
# Camera Network: 192.168.50.0/24
# Main Network: 192.168.1.0/24
# Storage Server: 192.168.50.10

Access Controls

Always use strong authentication for any web interfaces:

# Generate secure password hash for nginx
htpasswd -nbm admin 'YourSecurePassword123!' | cut -d: -f2

Encryption at Rest

For sensitive installations, encrypt the storage drive:

# Encrypt partition (warning: data loss if password forgotten)
sudo cryptsetup luksFormat /dev/sdX1
sudo cryptsetup luksOpen /dev/sdX1 camera_storage
sudo mkfs.ext4 /dev/mapper/camera_storage
sudo mount /dev/mapper/camera_storage /srv/camera-storage

Monitoring and Maintenance

Implement basic monitoring to ensure continuous operation:

# Check storage usage
df -h /srv/camera-storage

# Monitor recording directory size by camera
du -sh /srv/camera-storage/*

# Set up simple health check cron job
# */5 * * * * df -h /srv/camera-storage | awk 'NR==2 {print "Storage: " $5 " used"}' >> /var/log/camera-health.log

Regular maintenance tasks include:

Built by theluckystrike — More at zovo.one