Scripts for building, installing, testing, and maintaining LightNVR.
Main build script for LightNVR (C backend).
bash scripts/build.sh [options]Options: --release, --debug, --clean, --no-sod, --sod-dynamic, --no-go2rtc, --no-tests
Builds web frontend assets using Vite.
bash scripts/build_web_vite.sh [-m|--with-maps]Extracts version from CMakeLists.txt, installs npm deps, and runs Vite build to web/dist/.
Main installation script. Installs binary, config, web assets, and systemd service.
sudo bash scripts/install.sh [--prefix=DIR] [--config-dir=DIR] [--data-dir=DIR]Downloads and installs go2rtc binary (opensensor fork with memory leak fixes).
sudo bash scripts/install_go2rtc.sh [-d DIR] [-c DIR] [-v VERSION]Builds (if needed) and installs web interface files to the web root.
sudo bash scripts/install_web_assets.sh [-m|--with-maps]Extracts version from CMakeLists.txt and generates web/js/version.js. The shell version is used by CMake; the JS version is used by build_web_vite.sh.
Bumps version number across all project files.
bash scripts/bump-version.sh <new_version> # e.g. 0.13.0Automates the release process (bump, build, tag, push).
bash scripts/release.sh <new_version> [--no-push]Playwright-based automation for capturing documentation media. See each script's --help for options.
| Script | Purpose |
|---|---|
capture-screenshots.js |
Captures screenshots of all major UI pages |
capture-demos.js |
Records video demonstrations of key features |
capture-detection-demos.js |
Captures detection-focused screenshots (zones, overlays) |
setup-demo-streams.js |
Configures demo camera streams from demo-cameras.json |
update-documentation-media.sh |
Orchestrates the full capture pipeline |
test-screenshot-capture.sh |
Quick test wrapper for screenshot capture |
demo-cameras.json |
Demo camera configuration data |
Quick start:
npm install --save-dev playwright && npx playwright install chromium
node scripts/capture-screenshots.js --url http://localhost:8080| Script | Purpose |
|---|---|
run-integration-tests.sh |
Runs integration tests with go2rtc test streams |
run-playwright.sh |
Runs Playwright UI tests |
start-test-lightnvr.sh |
Starts lightNVR with test configuration |
test-streams.sh |
Manages test RTSP streams via go2rtc |
bash scripts/build.sh --release
bash scripts/build_web_vite.sh
sudo bash scripts/install.sh
sudo bash scripts/install_go2rtc.sh
sudo systemctl start lightnvr
sudo systemctl enable lightnvrbash scripts/build_web_vite.sh
sudo bash scripts/install_web_assets.sh
sudo systemctl restart lightnvrbash scripts/build.sh --release
sudo systemctl stop lightnvr
sudo cp build/bin/lightnvr /usr/local/bin/
sudo systemctl start lightnvrBuilding C backend: GCC/Clang, CMake, libsqlite3-dev, libuv1-dev
Building web frontend: Node.js (v14+), npm (v6+)
Screenshot capture: Node.js, Playwright, Chromium
Installation: Root/sudo access, systemd