# CheapSecurity

> Self-hosted CCTV for Linux SBCs with USB webcams: live MJPEG, motion detection, pre-buffer recording, Telegram/email alerts, cloud uploads with AES-256 encryption.

- **Category:** Video Surveillance
- **Licence:** AGPL-3.0
- **Latest version:** v1.2.0
- **Open source:** oss
- **Languages:** Python
- **Platforms:** Python
- **Tags:** Raspberry Pi, Rtsp, Onedrive, Video Surveillance, Motion Detection, Cctv, Google drive, Telegram bot, Aes encryption, Odroid, USB Webcam, Night Vision

## Description

CheapSecurity is a privacy-focused, self-hosted CCTV application designed to run on low-power Linux single-board computers (SBCs) such as Raspberry Pi or Odroid with standard USB webcams. It provides a web dashboard with live MJPEG streaming, motion detection using frame differencing, and automatic recording that includes footage from before motion was detected. Recordings can be managed through an interactive calendar interface with bulk actions for download, deletion, and Telegram upload. The system integrates with Telegram for bot commands (snapshot, video recording, encryption toggles) and supports email alerts with snapshots. Optional cloud uploads to Google Drive and OneDrive are available, with per-channel AES-256 ZIP encryption for Telegram, Google Drive, and OneDrive. Night mode offers software low-light enhancement (CLAHE) or hardware switching to a second IR camera. An optional RTSP stream can be published via MediaMTX and FFmpeg for integration with NVRs, Home Assistant, or VLC. Storage cleanup policies include age, size, and emergency low-disk thresholds. The app runs as a Python Flask/Gunicorn service managed by systemd, with configuration via a JSON file and secrets via environment variables. It is licensed under GNU AGPLv3.

## Links

- [Homepage](https://github.com/gmrandazzo/cheapsecurity)
- [GitHub Repository](https://github.com/gmrandazzo/CheapSecurity)

---
Source: https://selfhost.directory/project/cheapsecurity