Show HN: CheapSecurity – Lightweight, Self-Hosted CCTV for Linux SBCs
Article URL: https://github.com/gmrandazzo/CheapSecurity Comments URL: https://news.ycombinator.com/item?id=49059398 Points: 3 # Comments: 0
mainBranchesTagsGo to fileCodeOpen more actions menuFolders and filesNameNameLast commit messageLast commit dateLatest commit History11 Commits11 Commitssrc/cheapsecuritysrc/cheapsecurity teststests .gitignore.gitignore .
pre-commit-config.yaml.pre-commit-config.
yaml LICENSELICENSE README.mdREADME.md cheapsecurity.
servicecheapsecurity.service config.json.
exampleconfig.json.example pyproject.
tomlpyproject.toml requirements.txtrequirements.
txt View all filesRepository files navigationCheapSecurity This project provides a lightweight, self-hosted CCTV solution designed for Linux-based single-board computers (SBCs) and standard USB webcams. It offers an affordable, privacy-focused alternative for home monitoring by keeping your video data entirely under your control. Project Philosophy Privacy-First: By storing all footage locally, this system eliminates the need for third-party cloud subscriptions and ensures your data never leaves your network.
Cost-Effective: Leverage existing hardware—such as a spare Linux board and a USB webcam—to build a fully functional surveillance system without recurring fees. Minimalist Architecture: The software is optimized to run efficiently on low-power devices, ensuring high performance even on entry-level hardware. Key Features Hardware Agnostic: Highly compatible with a wide range of standard USB webcams.
Resource Efficient: Optimized specifically for Linux-based boards (e.g., Raspberry Pi, Orange Pi, or similar SBCs).
Data Sovereignty: Full control over your storage path, retention policies, and access methods. Simple Deployment: Designed for quick setup and easy maintenance. Features Live MJPEG stream with a web dashboard Motion detection with frame differencing Automatic recording with a pre-motion buffer Email alerts with a snapshot picture when motion starts Telegram integration: Automatic video upload after motion is recorded Bot commands: /snapshot, /video <seconds>, /help Night mode low-light enhancement (software CLAHE + brightness/contrast boost) Recordings bulk actions: select all, send to Telegram, download ZIP, delete Storage cleanup by age, total size, and emergency low-disk cleanup systemd autostart ready Licensed under GNU AGPLv3 Requirements Python 3.
10 or newer OpenCV with V4L2 support (see installation options below) A USB webcam (/dev/video0 by default) Optional: a Telegram bot token for Telegram notifications Optional: SMTP credentials for email alerts Quick start Verify OpenCV is available: python3 -c "import cv2; print(cv2.__version__)" If OpenCV is not installed, you have two options: Option A — use a system OpenCV package (recommended on ARM boards such as the Odroid XU4, where a pre-built system package is usually optimized for the board). Option B — install OpenCV via pip (convenient on x86/amd64 machines or when no system package is available).
Use opencv-python-headless because the app does not need a GUI. Create and activate the virtual environment and install the app: Option A: system OpenCV (recommended for ARM) This creates a venv that can see the system site-packages, so the system cv2 is available inside the venv. cd $HOME/CheapSecurity python3 -m venv venv --system-site-packages source venv/bin/activate pip install -e .
Option B: install everything via pip Use this if you do not have a system OpenCV or prefer a self-contained venv. cd $HOME/CheapSecurity python3 -m venv venv source venv/bin/activate pip install opencv-python-headless pip install -e . Note: On some older ARM boards the pip opencv-python-headless wheel may not be available or may be slow.
If that happens, install OpenCV from your distribution’s package manager instead and use Option A. Find your webcam device (usually /dev/video0): v4l2-ctl --list-devices Copy config.json.
example to config.json and edit it: cp config.json.
example config.json nano config.json Set camera device, resolution, and frame rate Fill in SMTP credentials if you want email alerts Fill in Telegram bot token and chat ID if you want Telegram uploads Security: config.
json is listed in .gitignore and must never be committed. It contains passwords and tokens.
Always edit config.json, not config.json.
example. If you add a new setting, update both files so the example stays in sync. Run the app: .
/venv/bin/python -m cheapsecurity.app Open the dashboard in a browser: http://<odroid-ip>:5000 Configuration Edit config.json: Section Key Description camera device V4L2 device index (0 = /dev/video0) camera width, height, fps Capture resolution and frame rate camera night_mode Enable low-light enhancement camera night_mode_fps Target FPS in night mode (camera may ignore this) camera night_mode_gain Target analog gain in night mode (camera may ignore this) camera night_mode_brightness Brightness boost in night mode camera night_mode_contrast Contrast boost in night mode motion threshold Pixel difference threshold (0-255) motion min_area Minimum contour area to trigger motion (full-res pixels) motion cooldown_seconds Keep
Đọc thêm từ Công nghệ
Can Apple make smart glasses that aren’t a constant privacy threat?
As Apple prepares to launch its first smart glasses, the company may also be wrestling with how to address consumer privacy concerns.

India eases foreign investment rules for e-commerce companies, a win for Amazon, which lobbied to buy goods directly from Indian sellers and sell them overseas (Aditya Kalra/Reuters)
Aditya Kalra / Reuters: India eases foreign investment rules for e-commerce companies, a win for Amazon, which lobbied to buy goods directly from Indian sellers and sell them overseas — India's government on Thursday eased foreign investment rules to allow e-commerce companies to

1 Type Of Intelligence Only You Can Possess — Here’s A Test That Reveals Yours
Not every gut feeling works the same way. A psychologist breaks down the different types of intuitive intelligence — and the quick test that reveals yours.

Nanoleaf's monitor stand is an all-in-one setup that brightens up your desk space
The Smart LED Monitor Stand is currently available for $169.99.