Deploying Frigate
Introduction
Frigate is a complete open-source Network Video Recorder (NVR) solution designed from the ground up for real-time AI object detection. Built with a focus on performance and efficiency, Frigate processes video streams locally using machine learning models to detect people, vehicles, animals, and other objects—enabling intelligent alerts, automated recording, and powerful search capabilities without relying on cloud services or subscriptions.
Unlike traditional NVR systems that simply record everything or motion-triggered systems that generate countless false alerts from shadows, rain, or leaves, Frigate uses sophisticated object detection to understand what’s actually happening in your camera feeds. It can distinguish between a person walking up your driveway and a branch swaying in the wind, between your car pulling in and headlights passing by, or between your dog and a stranger approaching your door.
Frigate achieves this through efficient use of hardware acceleration, supporting Google Coral TPU, NVIDIA GPUs, Intel OpenVINO, and even CPU-based detection. It intelligently manages resources by only analyzing frames when motion is detected, caching objects for smooth scrubbing through footage, and maintaining 24/7 recording alongside event-based clips. The web interface provides live camera views, detailed event timelines, configurable zones and object filters, and integration with home automation platforms like Home Assistant, MQTT brokers, and REST APIs.
Deploying Frigate on Klutch.sh brings enterprise-grade infrastructure to your home security and automation setup. You get reliable persistent storage for recordings and database snapshots, automatic HTTPS for secure remote access to your camera feeds, straightforward configuration through environment variables, and the flexibility to scale compute resources as you add more cameras or enable more advanced detection features—all without managing physical servers or wrestling with complex networking.
This guide walks you through deploying Frigate on Klutch.sh using Docker, configuring camera streams, setting up object detection, connecting to MQTT for home automation, managing persistent storage for recordings and clips, and implementing production-ready practices for reliability, security, and performance optimization.
Why Deploy Frigate on Klutch.sh?
- Local AI Processing: Run real-time object detection without cloud dependencies or subscription fees
- Automatic HTTPS: Secure remote access to camera feeds and web interface
- Persistent Storage: Reliable volume storage for recordings, clips, and database
- Flexible Compute: Scale CPU/RAM resources based on camera count and detection load
- Easy Integration: Built-in support for MQTT, Home Assistant, and REST APIs
- No Hardware Hassles: Deploy without managing physical NVR boxes or servers
- Quick Updates: Deploy new Frigate versions with zero-downtime rollouts
- Cost-Effective: Pay only for compute and storage, no per-camera licensing
- GitHub Integration: Version-controlled configuration management
- Professional Reliability: Enterprise uptime for critical security infrastructure
Prerequisites
Before you begin, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your deployment
- IP cameras with RTSP streams (most modern cameras support this)
- Basic understanding of video streaming and networking concepts
- Camera network credentials (username and password for RTSP access)
Technical Requirements:
Frigate’s resource needs scale with camera count and resolution:
- Minimum 2GB RAM (4GB+ recommended for multiple cameras)
- At least 20GB persistent storage (scales with retention needs and camera count)
- CPU with AVX support for TensorFlow Lite (most modern CPUs)
- Optional: Hardware accelerator (Coral TPU, NVIDIA GPU) for better performance
Optional Dependencies:
For enhanced functionality, consider deploying:
- MQTT broker (like EMQX) for home automation integration
- Redis for improved performance with multiple Frigate instances
Understanding Frigate Architecture
Frigate is built as a sophisticated video processing and analysis system:
Core Components:
- FFmpeg: Handles video stream decoding and encoding
- Detector: Runs machine learning models for object detection
- Motion Detection: Efficient pixel-based motion detection to trigger object detection
- Object Tracking: Tracks detected objects across frames
- Recording Manager: Handles 24/7 recording and event-based clips
- HTTP Server: Provides web UI and REST API
- MQTT Client: Publishes events and receives commands
- Database: SQLite for event metadata and object tracking
Detection Pipeline:
- FFmpeg decodes RTSP camera streams
- Motion detection identifies areas of interest
- When motion detected, frames sent to object detector
- Detector identifies objects (person, car, dog, etc.)
- Objects tracked across frames for smooth tracking
- Events created when objects enter defined zones
- Clips and snapshots saved for matched events
- Metadata published via MQTT and API
Storage Strategy:
- Recordings: Continuous 24/7 recording with configurable retention
- Clips: Event-based segments when objects detected
- Snapshots: Still images of detected objects
- Database: SQLite database for metadata and search
- Cache: In-memory cache for smooth timeline scrubbing
Preparing Your Repository
Step 1: Create Project Directory
Create a new directory for your Frigate deployment:
mkdir frigate-nvrcd frigate-nvrStep 2: Create Frigate Configuration
Create a config.yml file for Frigate configuration:
# Frigate Configuration# See: https://docs.frigate.video/configuration/
mqtt: # MQTT broker for Home Assistant integration # Replace with your MQTT broker URL enabled: false # host: mqtt-broker.klutch.sh # port: 8000 # user: frigate # password: your-mqtt-password
database: path: /media/frigate/frigate.db
detectors: cpu1: type: cpu num_threads: 3
model: width: 300 height: 300
# Configure object detectionobjects: track: - person - car - dog - cat filters: person: min_area: 5000 max_area: 100000 threshold: 0.75 car: min_area: 10000 threshold: 0.75
# Recording configurationrecord: enabled: true retain: days: 7 mode: all events: retain: default: 30 mode: motion
snapshots: enabled: true timestamp: true bounding_box: true crop: false retain: default: 30
# Live view configurationlive: stream_name: default
# Camera configurationcameras: front_door: enabled: true ffmpeg: inputs: - path: rtsp://username:password@camera-ip:554/stream roles: - detect - record detect: width: 1280 height: 720 fps: 5 record: enabled: true retain: days: 7 snapshots: enabled: true zones: porch: coordinates: 640,0,1280,0,1280,720,640,720 objects: - person - car
# Add more cameras as needed # backyard: # enabled: true # ffmpeg: # inputs: # - path: rtsp://username:password@camera-ip:554/stream # roles: # - detect # - record # detect: # width: 1280 # height: 720 # fps: 5Step 3: Create Dockerfile
Create a Dockerfile for your Frigate deployment:
FROM ghcr.io/blakeblackshear/frigate:stable
# Frigate stable includes:# - FFmpeg with hardware acceleration support# - TensorFlow Lite for CPU-based detection# - Python runtime and all dependencies# - Web UI and API server# - MQTT client
# Configuration will be mounted at runtime# Recordings and clips stored in persistent volumes
# Expose ports# 5000: HTTP API and Web UI# 8554: RTSP restream server# 8971: WebRTC serverEXPOSE 5000 8554 8971
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=60s \ CMD curl -f http://localhost:5000/api/version || exit 1
# Frigate starts automatically via base imageAlternative: Custom Build with Coral TPU Support
For Google Coral TPU acceleration:
FROM ghcr.io/blakeblackshear/frigate:stable-tensorrt
# This image includes:# - TensorRT for NVIDIA GPU acceleration# - Support for Google Coral Edge TPU# - OpenVINO for Intel acceleration
# Install additional utilities if neededRUN apt-get update && \ apt-get install -y --no-install-recommends \ curl \ && rm -rf /var/lib/apt/lists/*
# Copy custom configurationCOPY config.yml /config/config.yml
EXPOSE 5000 8554 8971
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s \ CMD curl -f http://localhost:5000/api/version || exit 1Step 4: Create Environment Configuration
Create a .env.example file for documentation:
# Frigate ConfigurationFRIGATE_RTSP_PASSWORD=your-rtsp-password
# Camera CredentialsCAMERA_USERNAME=adminCAMERA_PASSWORD=your-camera-password
# MQTT Configuration (optional)MQTT_HOST=mqtt-broker.klutch.shMQTT_PORT=8000MQTT_USER=frigateMQTT_PASSWORD=your-mqtt-password
# TimezoneTZ=America/New_York
# Plus API Key (for Frigate+ features)# PLUS_API_KEY=your-plus-api-keyStep 5: Create .gitignore
Create a .gitignore file to exclude sensitive data:
# Environment files.env.env.local.env.production
# Frigate data/media//recordings//clips//cache/frigate.dbfrigate.db-shmfrigate.db-wal
# Logs*.log
# System files.DS_StoreThumbs.db
# Temporary files*.tmpStep 6: Create README.md
Document your deployment:
# Frigate NVR on Klutch.sh
Open-source Network Video Recorder with real-time AI object detection.
## Quick Start
1. Update `config.yml` with your camera RTSP URLs2. Push this repository to GitHub3. Deploy on Klutch.sh with HTTP traffic4. Access web interface at your assigned URL5. Configure zones and notifications
## Features
- Real-time AI Object Detection- 24/7 Recording + Event Clips- Home Assistant Integration- Mobile-Friendly Web UI- Zone-Based Detection- MQTT Support- Hardware Acceleration
## Configuration
Edit `config.yml` to add cameras and configure detection settings.See Klutch.sh dashboard for environment variables.
## Documentation
- [Frigate Documentation](https://docs.frigate.video/)- [Camera Setup Guide](https://docs.frigate.video/configuration/cameras)Step 7: Push to GitHub
Initialize git and push your repository:
git initgit add Dockerfile config.yml .env.example .gitignore README.mdgit commit -m "Initial Frigate NVR deployment setup"git branch -M maingit remote add origin https://github.com/your-username/frigate-nvr.gitgit push -u origin mainDeploying Frigate on Klutch.sh
Step 1: Create New App
-
Log in to the Klutch.sh dashboard
-
Create a new project or select an existing one
-
Create a new app and configure it:
- Repository: Select your Frigate GitHub repository
- Branch: Choose the branch to deploy (e.g.,
mainorproduction) - Traffic Type: Select HTTP (Frigate’s web interface runs on HTTP)
- Internal Port: Set to 5000 (Frigate’s web server listens on port 5000)
Step 2: Configure Persistent Volumes
Frigate requires persistent storage for recordings, clips, snapshots, and database.
-
In your app settings, navigate to the Volumes section
-
Add a volume for Frigate media (recordings, clips, snapshots):
- Mount Path:
/media/frigate - Size: 50GB minimum (100GB+ recommended based on camera count and retention)
- Mount Path:
-
Add a volume for cache (optional but recommended for performance):
- Mount Path:
/tmp/cache - Size: 10GB
- Mount Path:
-
Add a volume for configuration:
- Mount Path:
/config - Size: 1GB
- Mount Path:
Step 3: Configure Environment Variables
Set essential environment variables for your Frigate deployment:
-
In your app settings, navigate to the Environment Variables section
-
Add the following variables (mark sensitive values as secrets):
Timezone:
Terminal window TZ=America/New_YorkCamera Credentials:
Terminal window CAMERA_USERNAME=adminCAMERA_PASSWORD=your-camera-passwordMQTT Configuration (if using MQTT broker):
Terminal window MQTT_HOST=mqtt-broker.klutch.shMQTT_PORT=8000MQTT_USER=frigateMQTT_PASSWORD=your-mqtt-passwordRTSP Password (for restreaming):
Terminal window FRIGATE_RTSP_PASSWORD=your-rtsp-passwordPlus API Key (optional, for Frigate+ features):
Terminal window PLUS_API_KEY=your-plus-api-key
Step 4: Deploy Your Application
-
Click Deploy to start the build process
-
Klutch.sh will:
- Pull your GitHub repository
- Detect the Dockerfile automatically
- Build the Frigate container image
- Deploy it with your configured volumes and environment variables
-
Monitor the build logs for any errors
-
Once deployed, your Frigate NVR will be available at
https://example-app.klutch.sh -
Initial startup may take 2-3 minutes as Frigate initializes the database and loads models
Initial Setup and Configuration
After deployment, configure your Frigate installation:
Step 1: Access Web Interface
-
Navigate to
https://example-app.klutch.shin your browser -
You should see the Frigate web interface with a live view dashboard
-
If no cameras are configured, you’ll see a message prompting you to add cameras
Step 2: Verify Configuration
-
Click the settings icon (gear) in the top right corner
-
Navigate to System to view:
- Frigate version
- Detector status
- Storage usage
- GPU/TPU availability
-
Check that your configuration loaded correctly
Step 3: Test Camera Streams
-
Navigate to the Live view in Frigate
-
You should see your configured cameras streaming
-
If cameras don’t appear:
- Check camera RTSP URLs are correct
- Verify network connectivity to cameras
- Ensure camera credentials are correct
- Check Frigate logs for connection errors
Camera Configuration
Finding Camera RTSP URLs
Most IP cameras support RTSP streaming. Common URL formats:
Generic Format:
rtsp://username:password@camera-ip:554/streamPopular Camera Brands:
Reolink:
rtsp://username:password@camera-ip:554/h264Preview_01_mainrtsp://username:password@camera-ip:554/h264Preview_01_subHikvision:
rtsp://username:password@camera-ip:554/Streaming/Channels/101rtsp://username:password@camera-ip:554/Streaming/Channels/102Dahua:
rtsp://username:password@camera-ip:554/cam/realmonitor?channel=1&subtype=0rtsp://username:password@camera-ip:554/cam/realmonitor?channel=1&subtype=1Amcrest:
rtsp://username:password@camera-ip:554/cam/realmonitor?channel=1&subtype=0Wyze (with RTSP firmware):
rtsp://username:password@camera-ip/liveAdding Cameras to config.yml
Edit your config.yml to add cameras:
cameras: front_door: enabled: true ffmpeg: inputs: # Main stream for recording - path: rtsp://admin:password@192.168.1.10:554/stream1 roles: - record # Sub stream for detection (lower resolution = better performance) - path: rtsp://admin:password@192.168.1.10:554/stream2 roles: - detect detect: width: 640 height: 480 fps: 5 record: enabled: true retain: days: 7 mode: all events: retain: default: 30 snapshots: enabled: true timestamp: true bounding_box: true crop: false
backyard: enabled: true ffmpeg: inputs: - path: rtsp://admin:password@192.168.1.11:554/stream1 roles: - record - path: rtsp://admin:password@192.168.1.11:554/stream2 roles: - detect detect: width: 640 height: 480 fps: 5 record: enabled: true retain: days: 7 snapshots: enabled: trueStream Configuration Best Practices
-
Use Two Streams:
- Main stream (high resolution) for recording
- Sub stream (lower resolution) for detection
- Reduces CPU load significantly
-
Detection Resolution:
- 640x480 or 854x480 recommended
- Higher resolution = more CPU usage
- No significant accuracy benefit above 720p
-
Detection FPS:
- 5 FPS is optimal for most scenarios
- Higher FPS = more CPU usage
- 10+ FPS only needed for fast-moving objects
-
Recording Settings:
- Use main stream at full camera resolution
- H.264 codec recommended
- Consider bandwidth and storage
Configuring Object Detection
Detection Settings
Configure what objects to detect and track:
objects: # Objects to track track: - person - car - dog - cat - bicycle - motorcycle
# Object-specific filters filters: person: min_area: 5000 # Minimum pixels max_area: 100000 # Maximum pixels threshold: 0.75 # Confidence threshold (0-1) min_score: 0.6 # Minimum detection score car: min_area: 10000 threshold: 0.75 dog: min_area: 3000 threshold: 0.7Detection Zones
Define zones for targeted detection:
cameras: front_door: zones: # Porch zone - only detect people porch: coordinates: 640,0,1280,0,1280,720,640,720 objects: - person
# Driveway zone - detect cars and people driveway: coordinates: 0,400,640,400,640,720,0,720 objects: - person - car
# Street zone - ignore to reduce false alerts street: coordinates: 0,0,1280,200,1280,400,0,400 inertia: 3 # Require object present for 3 framesFinding Zone Coordinates
-
Access your Frigate web interface
-
Navigate to Live view and select a camera
-
Click the mask/zone editor icon
-
Click points to define zone boundaries
-
Copy the generated coordinates
-
Paste into your
config.yml
Configuring Motion Detection
Frigate uses efficient motion detection to trigger object detection:
cameras: front_door: motion: # Enable motion detection enabled: true
# Mask areas to ignore motion (trees, flags, etc.) mask: - 0,0,100,0,100,100,0,100 # Top-left corner - 1180,0,1280,0,1280,100,1180,100 # Top-right corner
# Motion detection sensitivity threshold: 25 # Lower = more sensitive (default: 25)
# Contour area threshold contour_area: 30 # Minimum motion area in pixels
# Pixels to improve motion improve_contrast: true
# Frame height for motion detection frame_height: 180 # Lower = faster, less accurateCreating Motion Masks
To reduce false alerts from trees, flags, or other moving objects:
-
Navigate to the mask/zone editor in Frigate
-
Select Motion Mask mode
-
Draw polygons around areas to ignore
-
Copy the generated coordinates
-
Add to your
config.ymlundermotion.mask
Recording Configuration
Continuous Recording
Configure 24/7 recording:
record: enabled: true
# Retention settings retain: days: 7 # Keep recordings for 7 days mode: all # Record continuously
# Event-based clips events: # Pre-capture before event pre_capture: 5 # seconds
# Post-capture after event post_capture: 5 # seconds
# Retention for event clips retain: default: 30 # days mode: motion # Only save clips with motion
# Per-object retention objects: person: 60 # Keep person clips for 60 days car: 30 dog: 14Snapshot Configuration
Configure event snapshots:
snapshots: enabled: true
# Clean snapshot strategy clean_copy: true # Save clean image without bounding box
# Timestamp on snapshot timestamp: true
# Draw bounding box bounding_box: true
# Crop to object crop: false
# Snapshot quality (1-100) quality: 85
# Retention retain: default: 30 # days objects: person: 60 car: 30MQTT Integration
Configuring MQTT
Connect Frigate to an MQTT broker for home automation:
mqtt: enabled: true host: mqtt-broker.klutch.sh port: 8000 user: frigate password: your-mqtt-password
# Client ID client_id: frigate
# Topic prefix topic_prefix: frigate
# Stats interval (seconds) stats_interval: 60Note: Deploy an MQTT broker first. See our EMQX deployment guide for instructions.
MQTT Topics
Frigate publishes events to MQTT topics:
Event Topics:
frigate/{camera}/person- Person detectedfrigate/{camera}/car- Car detectedfrigate/{camera}/events- All events
State Topics:
frigate/available- Frigate online statusfrigate/{camera}/recordings- Recording statusfrigate/{camera}/snapshots- Snapshot status
Command Topics:
frigate/{camera}/detect/set- Enable/disable detectionfrigate/{camera}/recordings/set- Enable/disable recordingfrigate/{camera}/snapshots/set- Enable/disable snapshots
Home Assistant Integration
Frigate integrates seamlessly with Home Assistant:
-
Install the Frigate integration in Home Assistant
-
Add your Frigate instance:
- URL:
https://example-app.klutch.sh - MQTT: Auto-discovered if using same broker
- URL:
-
Frigate entities will appear in Home Assistant:
- Camera live feeds
- Event sensors
- Recording switches
- Snapshot buttons
Hardware Acceleration
CPU Detection (Default)
Frigate uses CPU-based detection by default:
detectors: cpu1: type: cpu num_threads: 3 # Adjust based on available CPUsGoogle Coral TPU
For significant performance improvement, use a Coral TPU:
detectors: coral: type: edgetpu device: usbNote: Coral TPU requires USB passthrough, which may not be available in containerized environments. Consider CPU detection or NVIDIA GPU for cloud deployments.
NVIDIA GPU
Use NVIDIA GPU for acceleration:
detectors: tensorrt: type: tensorrt device: 0 # GPU device IDUpdate Dockerfile to use TensorRT image:
FROM ghcr.io/blakeblackshear/frigate:stable-tensorrtIntel OpenVINO
Use Intel integrated graphics:
detectors: openvino: type: openvino device: GPUPerformance Optimization
Reduce CPU Usage
-
Use Lower Resolution for Detection:
detect:width: 640height: 480 -
Reduce Detection FPS:
detect:fps: 5 -
Use Sub-Streams:
- Configure separate streams for recording and detection
- Detection uses lower resolution stream
-
Limit Tracked Objects:
objects:track:- person- car -
Optimize Motion Detection:
motion:frame_height: 180threshold: 25
Optimize Storage
-
Adjust Retention Periods:
record:retain:days: 7 # Reduce for less storage -
Use Event-Based Recording:
record:retain:mode: motion # Only save when motion detected -
Lower Recording Resolution:
- Configure cameras to use lower bitrate for recording
- Balance quality vs storage
-
Enable Database Vacuum:
- Frigate automatically optimizes database
- Manually vacuum if database grows large
Notifications and Alerts
MQTT Notifications
Use MQTT events to trigger notifications:
Example: Node.js MQTT Client
const mqtt = require('mqtt');
const client = mqtt.connect('mqtt://mqtt-broker.klutch.sh:8000', { username: 'frigate', password: 'your-mqtt-password'});
client.on('connect', () => { console.log('Connected to MQTT broker');
// Subscribe to all Frigate events client.subscribe('frigate/+/person'); client.subscribe('frigate/+/car');});
client.on('message', (topic, message) => { const event = JSON.parse(message.toString());
if (event.type === 'new' && event.after.label === 'person') { console.log(`Person detected at ${event.after.camera}`);
// Send notification (email, SMS, push, etc.) sendNotification({ title: 'Person Detected', message: `Person detected on ${event.after.camera}`, image: `https://example-app.klutch.sh/api/${event.after.camera}/person/snapshot.jpg?bbox=1` }); }});REST API Notifications
Use Frigate’s REST API to query events:
# Get recent eventscurl https://example-app.klutch.sh/api/events
# Get events for specific cameracurl https://example-app.klutch.sh/api/events?camera=front_door
# Get events for specific objectcurl https://example-app.klutch.sh/api/events?label=person
# Get event snapshotcurl https://example-app.klutch.sh/api/events/{event_id}/snapshot.jpgSecurity Best Practices
Authentication
-
Proxy Authentication:
- Frigate doesn’t have built-in authentication
- Use a reverse proxy with authentication (Nginx, Caddy, Authelia)
- Klutch.sh provides HTTPS by default
-
Network Segmentation:
- Place cameras on isolated VLAN
- Restrict camera internet access
- Only allow Frigate to access cameras
-
RTSP Credentials:
- Use strong passwords for camera RTSP access
- Change default camera credentials
- Store credentials in environment variables (not config.yml)
Camera Security
-
Disable Cloud Services:
- Disable manufacturer cloud features
- Block camera internet access via firewall
- Use local-only recording
-
Firmware Updates:
- Keep camera firmware updated
- Check manufacturer security bulletins
- Test updates before deploying to all cameras
-
Network Isolation:
- Use separate network for cameras
- Implement firewall rules
- Monitor network traffic
Access Control
-
HTTPS Only:
- Klutch.sh provides automatic HTTPS
- Never expose Frigate over HTTP
- Use secure WebSocket for live streams
-
IP Whitelisting:
- Restrict access to known IP addresses
- Use VPN for remote access
- Implement rate limiting
-
Regular Audits:
- Review Frigate logs regularly
- Monitor access patterns
- Check for unauthorized access attempts
Backup and Recovery
Configuration Backup
-
Version Control:
- Store
config.ymlin GitHub - Commit changes with descriptive messages
- Use branches for testing changes
- Store
-
Automated Backups:
- Backup configuration directory
- Export zone and mask coordinates
- Document camera settings
Database Backup
-
SQLite Database:
- Located at
/media/frigate/frigate.db - Backup regularly for event history
- Use SQLite backup command:
Terminal window sqlite3 /media/frigate/frigate.db ".backup /media/frigate/backups/frigate-backup.db" - Located at
-
Automated Backup Script:
#!/bin/bashDATE=$(date +%Y%m%d-%H%M%S)sqlite3 /media/frigate/frigate.db ".backup /media/frigate/backups/frigate-$DATE.db"find /media/frigate/backups -name "frigate-*.db" -mtime +30 -delete
Recording Backup
-
Important Events:
- Export critical event clips
- Save snapshots separately
- Consider cloud backup for important footage
-
Bulk Export:
- Use Frigate’s export feature in web UI
- Download clips via REST API
- Automate exports for specific labels
Monitoring and Maintenance
System Monitoring
-
Frigate Web UI:
- Navigate to System page
- Monitor CPU, RAM, and GPU usage
- Check detector statistics
- Review storage usage
-
Klutch.sh Dashboard:
- Monitor resource utilization
- Track CPU and memory usage
- Review volume storage
- Check application health
-
Frigate Stats API:
Terminal window curl https://example-app.klutch.sh/api/stats
Log Monitoring
-
Frigate Logs:
- View logs in Klutch.sh dashboard
- Check for camera connection errors
- Monitor detector performance
- Review MQTT connection status
-
Common Log Messages:
Unable to connect to camera: Check RTSP URL and credentialsDetector appears to have stopped: Restart applicationMQTT connection lost: Check MQTT broker connectivityOut of memory: Increase RAM allocation
Regular Maintenance
-
Weekly Tasks:
- Review detection accuracy
- Check recording retention
- Monitor storage usage
- Verify camera connectivity
- Review event notifications
-
Monthly Tasks:
- Update Frigate to latest version
- Optimize database (automatic)
- Review and adjust zones
- Clean up old recordings
- Audit camera access
-
Quarterly Tasks:
- Review configuration
- Update camera firmware
- Test disaster recovery
- Audit security settings
- Review performance metrics
Troubleshooting Common Issues
Frigate Won’t Start
-
Check Logs:
- View application logs in Klutch.sh dashboard
- Look for configuration errors
- Check for missing environment variables
-
Verify Configuration:
- Validate
config.ymlsyntax - Check for typos in camera names
- Ensure RTSP URLs are correct
- Validate
-
Check Resources:
- Verify sufficient RAM allocated
- Check CPU availability
- Ensure storage volume mounted correctly
Camera Not Connecting
-
Verify RTSP URL:
- Test RTSP URL with VLC or FFmpeg
- Check camera IP address
- Verify port number (usually 554)
-
Check Credentials:
- Verify username and password
- Check for special characters in password
- Ensure camera allows RTSP connections
-
Network Connectivity:
- Ping camera IP address
- Check firewall rules
- Verify network routing
-
Test with FFmpeg:
Terminal window ffmpeg -rtsp_transport tcp -i "rtsp://username:password@camera-ip:554/stream" -frames:v 1 test.jpg
No Object Detection
-
Check Detector Status:
- Navigate to System page
- Verify detector is running
- Check detector logs for errors
-
Verify Motion Detection:
- Check if motion is being detected
- Review motion detection settings
- Adjust motion threshold
-
Review Object Filters:
- Check
min_areaandmax_areasettings - Verify confidence threshold
- Ensure objects are in tracked list
- Check
-
Test Detection:
- Walk in front of camera
- Check live view for detection boxes
- Review recent events
Poor Detection Accuracy
-
Adjust Confidence Threshold:
objects:filters:person:threshold: 0.7 # Lower for more detections -
Optimize Detection Area:
- Adjust
min_areafor object size - Review zone coordinates
- Check camera angle and positioning
- Adjust
-
Improve Lighting:
- Add lighting to detection areas
- Enable camera night vision
- Adjust camera exposure settings
-
Use Zones:
- Create specific zones for detection
- Exclude areas with false positives
- Adjust zone-specific filters
High CPU Usage
-
Reduce Detection Load:
- Lower detection FPS (5 recommended)
- Use lower resolution for detection
- Reduce number of tracked objects
-
Optimize Motion Detection:
- Increase motion threshold
- Add motion masks for busy areas
- Lower motion frame height
-
Use Sub-Streams:
- Configure separate streams for detection
- Use main stream only for recording
-
Scale Resources:
- Increase CPU allocation in Klutch.sh
- Consider hardware acceleration
- Reduce number of cameras
Recording Issues
-
Check Storage Space:
- Verify volume has sufficient space
- Review retention settings
- Manually delete old recordings if needed
-
Verify Recording Settings:
record:enabled: trueretain:days: 7 -
Check FFmpeg Errors:
- Review Frigate logs for FFmpeg errors
- Test camera stream stability
- Adjust FFmpeg input parameters
-
Database Issues:
- Check database file permissions
- Verify database not corrupted
- Restart Frigate to rebuild cache
Advanced Features
Multi-Camera Views
Create custom camera groups:
camera_groups: front: cameras: - front_door - driveway icon: mdi:home-outline order: 1
back: cameras: - backyard - garage icon: mdi:garage order: 2Custom Notifications
Use webhooks for custom notifications:
# Not built into Frigate, use external service with MQTT or APITimeline Search
Search recordings by detected objects:
-
Navigate to Events page
-
Filter by:
- Camera
- Object label
- Date range
- Zone
-
Click event to view clip and snapshot
-
Export clips as needed
Statistics and Analytics
View detection statistics:
-
Navigate to Storage page for space usage
-
Use REST API for custom analytics:
Terminal window # Get event count by labelcurl https://example-app.klutch.sh/api/events?limit=0&label=person# Get events in date rangecurl "https://example-app.klutch.sh/api/events?after=1640995200&before=1641081600" -
Export data for visualization in external tools
Scaling Considerations
Adding More Cameras
-
Resource Planning:
- Estimate 5-10% CPU per camera (720p @ 5fps)
- Plan storage: ~1-2GB/day per camera (depends on activity)
- Scale RAM: 1-2GB base + 200-300MB per camera
-
Update Configuration:
- Add cameras to
config.yml - Configure detection settings
- Set up zones and masks
- Add cameras to
-
Scale Klutch.sh Resources:
- Increase CPU allocation
- Add more RAM
- Expand storage volumes
Multi-Instance Deployment
For large deployments, use multiple Frigate instances:
-
Split by Location:
- Deploy separate instances per building/location
- Configure separate MQTT topics
- Use Redis for shared state (optional)
-
Load Balancing:
- Distribute cameras across instances
- Balance by detection load
- Consider network bandwidth
-
Centralized Management:
- Use Home Assistant to aggregate instances
- Centralized notification handling
- Unified event storage
Production Deployment Checklist
Before going live with Frigate:
- Persistent volumes configured and tested (minimum 50GB for
/media/frigate) - All environment variables set correctly
- Camera RTSP streams tested and working
-
config.ymlconfigured with all cameras - Detection zones defined for each camera
- Motion masks created to reduce false alerts
- Recording retention configured
- Snapshot settings configured
- MQTT broker deployed and connected (optional)
- Home Assistant integration tested (optional)
- HTTPS working correctly (automatic via Klutch.sh)
- Event notifications tested
- CPU/RAM resources sized appropriately
- Storage usage monitored
- Backup strategy implemented
- Security best practices applied
- Camera network segmented
- Firmware updated on all cameras
- Logs reviewed for errors
- Performance metrics validated
- Documentation updated with camera details
Resources and Further Reading
- Frigate Official Website
- Frigate Documentation
- Frigate GitHub Repository
- Configuration Reference
- Camera Setup Guide
- Home Assistant Notifications
- EMQX MQTT Broker Guide
- Redis Deployment Guide
- Klutch.sh Quick Start Guide
- Klutch.sh Volumes Documentation
Conclusion
Deploying Frigate on Klutch.sh gives you a powerful, self-hosted security camera system with intelligent AI object detection. With automatic HTTPS, persistent storage for recordings, flexible resource scaling, and seamless home automation integration, you can build a professional-grade surveillance solution without the complexity of managing physical servers or dealing with cloud service limitations.
This guide covered everything from initial deployment to advanced configuration, including camera setup, object detection tuning, zone configuration, MQTT integration, recording management, and troubleshooting. Whether you’re setting up a simple home security system or deploying a multi-camera surveillance network, Frigate on Klutch.sh provides the performance, reliability, and features you need.
Remember to keep your system updated, monitor resource usage, regularly review detection accuracy, and follow security best practices to protect your camera feeds and recordings. For additional help or questions, refer to the resources above or engage with the Frigate community.
Happy monitoring!