opensensor/lightNVR

The fully OSS lightweight network video recorder system witten in C (and now rust) with modern js frontend

What it solves

It solves the need for a local, self-hosted video surveillance system without relying on cloud accounts or services. LightNVR records IP cameras, provides live viewing, and adds object detection, ONVIF events, and license plate search, all on your own hardware — even on very small devices.

How it works

LightNVR records video to standard MP4 files with options for continuous, scheduled, motion-triggered, or detection-triggered recording. A pre-event buffer includes footage leading up to triggers. It manages retention and can archive to S3, NFS, or SAN. Live streams are served to browsers via WebRTC (sub-second latency) or HLS, proxied and authenticated through LightNVR. Detection is done via polygon zones with per-zone object classes and confidence thresholds, using external engines like light-object-detect (ONNX/TFLite) or DOODS2, or an embedded SOD for small devices. ONVIF discovery and camera-side motion events are supported, as is license plate recognition with plate search. The system includes an investigation workspace that reviews up to 16 cameras against a single timeline, and supports multi-camera export. It has a REST API, MQTT integration, and Home Assistant discovery. A web UI ships in 19 languages with light/dark modes and eight color themes.

Who it’s for

LightNVR is for home users, small businesses, and organizations that want an open-source, self-hosted NVR capable of running on modest hardware like 256 MB embedded boards, Raspberry Pi, or servers. It suits those who need local control, security features like multi-factor authentication and non-root containers, and integration with existing automation systems.

Highlights

  • Runs on anything from a 256 MB embedded board to a server (Linux on ARM, x86, or MIPS).
  • Records to standard MP4 with pre-event buffer, retention policies, and optional archiving to S3/NFS/SAN.
  • Live streaming via WebRTC (sub-second) or HLS with detection overlays.
  • Polygon detection zones with per-zone object classes and confidence thresholds.
  • Integrates external detection engines (ONNX/TFLite, DOODS2) or embedded SOD for small devices.
  • ONVIF discovery and camera-side motion events.
  • License plate reads with plate search.
  • Investigation workspace reviewing up to 16 cameras against one shared clock.
  • REST API with in-app reference, MQTT events, and Home Assistant discovery.
  • Security: database-backed users with roles, TOTP MFA, API keys, forced password change, and a non-root container with all capabilities dropped.
  • Written in C, with an automatically generated Rust translation (lightnvr-rs) for organizations requiring memory-safe languages.

Related

  • Project
  • Project
  • Project
  • Project