Skip to content

Back to the catalog

OpenNVR
github.comrepo

OpenNVR

OpenNVR is a self-hosted, Docker-deployed network video recorder for ONVIF/RTSP IP cameras that is explicitly designed around a "sovereign, air-gapped by default" security architecture: network isolation between camera/gateway/analytics planes, Fernet-encrypted credentials at rest, RTSPS transport, and two default-deny gates (DEPLOYMENT_MODE=offline, AI_SOVEREIGNTY=local_only) that keep cloud and AI egress returning HTTP 403 until explicitly opened. It's positioned as a response to systemic IP-camera weaknesses (default creds, hard-coded keys, unsigned firmware, vendor cloud aggregation) exploited historically by the Mirai botnet and the 2021 Verkada camera-feed breach, and targets regulated buyers newly barred from Hikvision/Dahua/Uniview/Edimax-class vendors under NDAA §889 and 2025-26 FCC enforcement. Its pluggable AI Adapter Contract (Apache-2.0 SDK) lets third parties add detection/LLM capabilities out-of-tree, with correlation-ID audit trails and SHA-256 model fingerprinting for compliance evidence.

TL;DR Self-hosted, air-gapped-by-default NVR for IP cameras with default-deny cloud/AI egress, encrypted credentials, and audit-chained AI adapters — built to replace vendor-cloud cameras banned under NDAA §889/FCC rules.
Document

What it is

OpenNVR is a self-hosted network video recorder for ONVIF and RTSP cameras, an Android phone, or a local webcam. It runs as separate Docker containers (core, media server, NATS bus, AI gateway, detect pipeline, adapters, apps). The platform core is AGPL-3.0-or-later. The app SDK and adapter SDK are Apache-2.0 and on PyPI as opennvr-app-sdk and opennvr-adapter-sdk. The page does not give a release version.

How it works

Recording is written in one-minute chunks and does not depend on AI. If every adapter crashes, video is still recorded.

A cheap "Tier-0" detector scans the camera substream at a low frame rate. It wakes heavier models only when something is worth a closer look. The page says this is why a mini-PC can carry a whole site.

Models plug in through a gateway ("KAI-C") that requests a task such as object_detection. Each adapter registers with the SHA-256 of its weights, re-checked every minute. A changed hash raises a critical alert and an audit entry. A model that requests a new permission stops serving until an operator re-approves it. One correlation ID links the alert, gateway, model and exact weights.

Apps declare the cameras, outbound hosts and licence key they need, and an administrator approves them. Apps reach the outside only through an egress proxy with an admin-approved allowlist.

flowchart LR
  Cam[Cameras: no route out] --> NIC1[NIC 1: camera side]
  NIC1 --> Box[OpenNVR host]
  Box --> NIC2[NIC 2: management side]
  NIC2 --> Ops[Operators, phone app, alerts, updates]
  Box -. 403 until opened .-> Cloud[Cloud / non-local AI]

Preconditions / Affected

Docker is the only requirement. The first run takes 8 to 15 minutes, mostly image downloads. Dual-NIC isolation needs a second network card and is offered by start.sh. The installer can add a firewall rule that drops forwarding between the two networks.

What to do

Install:

git clone https://github.com/open-nvr/open-nvr.git && cd open-nvr
./start.sh          # Windows: .\start.ps1

Unattended install:

cp .env.example .env && ./scripts/generate-secrets.sh --write && ./start.sh up

The wizard prints a URL and a one-time setup token, and the certificate is self-signed. For high detector CPU, the page says the cause is almost always video decode. Use the camera's substream URL, check DETECT_FPS, and set DETECT_HWACCEL. Details are in docs/DETECT_CPU.md.

For procurement and review, the page points to docs/GOVERNMENT_DEPLOYMENT.md, docs/SECURITY_ARCHITECTURE.md (control-by-control threat model) and docs/COMPLIANCE.md (evidence pack mapping). A §889 covered-vendor self-check is built in. The architecture paper is DOI 10.5281/zenodo.22804254.

Home Assistant works through MQTT discovery with no add-on. It runs under an OpenNVR API token you choose, so Home Assistant sees only the cameras that token may see, and commands are audited. A native HACS integration, hass-opennvr, adds live video and notifications.

Caveats

The page states that a hash proves weights did not change after approval, not that they were clean when approved. It relies on declared permissions, default-deny network policy and fine-tuning on your own footage for that gap.

Online, the host itself is exposed to the internet. The page says to keep it behind a firewall and never port-forward it.

Licensing: the AGPL network clause applies to the core. Pre-installed hardware, embedding, hosted offerings without source disclosure and white-labelling need the commercial licence. Core contributions require a CLA. The project is funded by paid deployment help, fine-tuning and compliance packs. The page recommends Frigate for many homelabs. The security claims are the project's own, with no independent audit cited.

Organisations named here

  • Dahua
  • Edimax
  • Hikvision
  • NDAA §889
  • Uniview
  • Verkada

Technologies named here

  • IP cameras
  • OpenNVR
  • MediaMTX
  • Verkada cloud camera platform
  • Ollama
  • Hikvision camera firmware
  • Dahua camera firmware
  • Pipecat
  • Uniview camera firmware
  • Silero VAD
  • Edimax camera firmware
  • Whisper STT
  • Piper TTS
  • NATS bus
  • KAI-C
  • opennvr-adapter-sdk
  • opennvr-app-sdk
  • Home Assistant integration
  • OpenNVR Cam
  • Docker
  • Python

Techniques named here

  • Encryption of camera credentials at rest
  • RTSPS transport for video leaving the host
  • Default-deny egress gates
  • Egress allowlist proxy for apps
  • Correlation-ID based inference auditing
  • Model weight fingerprinting and drift detection
  • Least-privilege app capability declaration
  • Tier-0 compute-gating detection

Threat actors named here

  • Mirai botnet
  • Verkada breach attacker
  • Mirai