opensensor/lightNVR 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 GNU General Public License v3.0 许可证,目前获得 307 个 Star、74 次 Fork。
仓库全名
opensensor/lightNVR
README 摘要
LightNVR A self-hosted network video recorder that runs on anything from a 256 MB embedded board to a server. LightNVR records your IP cameras, streams them live to the browser over WebRTC or HLS, and finds what matters with detection zones, ONVIF events and licence plate search — all locally, with no cloud account. Free to use does not mean free to build. About $10,000 of the maintainer's own money has gone into…
A self-hosted network video recorder that runs on anything from a 256 MB embedded
board to a server. LightNVR records your IP cameras, streams them live to the browser
over WebRTC or HLS, and finds what matters with detection zones, ONVIF events and licence
plate search — all locally, with no cloud account.
Free to use does not mean free to build. About $10,000 of the maintainer’s own money
has gone into LightNVR over roughly two years. If it saves you money or supports your
customers, please help through the $10K Sustainability Drive or
sponsor on GitHub.
What it does
Record
Continuous, scheduled, motion- and detection-triggered recording to standard MP4, with a
pre-event buffer so clips include what led up to them
Retention policies, recording protection and tags, and disk-space management
The web UI ships in 19 languages, with light and dark modes and eight colour themes.
Detection zone editor
Recordings
Per-stream detection settings
System health
Quick start
Docker Compose
mkdir lightnvr && cd lightnvr
curl -LO https://raw.githubusercontent.com/opensensor/lightNVR/main/docker-compose.yml
docker compose up -d
Open http://<host>:8080. Images are published to ghcr.io/opensensor/lightnvr for
linux/amd64, linux/arm64 and linux/arm/v7 on every release. Volumes, ports,
environment variables and upgrades are covered in the Docker guide.
⚠️ The default login is admin / admin, and the web server listens on all
interfaces. Until you change the password, anyone who can reach port 8080 can see your
cameras.
LightNVR opens a password-change screen on first login and blocks the rest of the UI until
you replace the default. To avoid the default ever being valid, set password in the
[web] section of lightnvr.ini before the first start. Locked out? See
Authentication issues.
Then add a camera (ONVIF discovery or an RTSP URL), confirm it records, and set a retention
policy. The documentation index walks through each step.
Something wrong?
Blank page — usually a volume mounted over /var/lib/lightnvr instead of
/var/lib/lightnvr/data. See web interface troubleshooting.
WebRTC won’t connect — set external_ip under [go2rtc] in lightnvr.ini to the
host’s LAN address. See WebRTC not working.
LightNVR is written in C, and C remains the source of truth: every feature and fix is
made there, and the native builds above come from it.
Alongside them, CI translates the C into Rust with C2Rust
on every pull request, builds it, and runs the smoke and API contract tests against it.
This build, lightnvr-rs, is for organizations whose policies call for software built
in a memory-safe language. Starting with 0.47.3, it is
published as ghcr.io/opensensor/lightnvr-rs and lightnvr-rs_<version>_sid_amd64.deb.
Today the translation is C-shaped unsafe Rust linking the same native libraries, so its
safety properties are essentially those of the C build. It is the foundation for removing
unsafe over time, not a finished safe-Rust port. Contributors never edit
rust/ by hand. The
announcement explains the reasoning.
Requirements
Linux on ARM, x86 or MIPS (kernel 4.4+)
256 MB RAM minimum; more for several streams or detection
(memory in practice)
Cameras that speak RTSP or ONVIF, H.264 or H.265 (camera notes)
Documentation
The documentation index is grouped by task: install, configure,
operate, integrate and develop. Common starting points:
Pull requests are welcome. Make changes in C under src/ and include/, or in the web UI
under web/. CI regenerates the Rust build for you. On your first pull request, the CLA
bot will ask you to sign the Contributor License Agreement. Report security
issues privately as described in SECURITY.md.
评论