Skip to content

Epic: Documentation overhaul #492

Description

@matteius

Why now

Two recent issues were really documentation gaps wearing other clothes:

  • The database version is severely outdated. #489 — a user reported an outdated SQLite version. The shipped images were fine (3.53.4 on all three architectures); what was missing was any documentation of how to tell what a container is actually running, or that sqlite_version() reports the client's engine rather than anything stored in the database. While tracing it, the README turned out to advertise matteius/lightnvr:latest and docs/INSTALLATION.md to advertise lightnvr/lightnvr:latest — neither is a published image.
  • Windows? #490 — "Windows?" was closed with a correct support decision (containers, no native build), and the reporter's follow-up was simply "Do you recommend any guide or tutorial?" We had nothing to point at.

Neither user was confused about LightNVR. They were confused because we hadn't written the page.

This epic tracks a pass over the documentation with a bias toward things that are actively wrong first, structure second.


Phase 0 — Correctness

Documentation that states something untrue is worse than no documentation. These are all verified against the current code.

  • Default credentials were documented as auto-generated; they are not. db_auth_init() in src/database/db_auth.c falls back to the literal string "admin". Random generation existed once and was intentionally removed in 453fbbd. Every install gets admin / admin, and the web server binds 0.0.0.0 by default. We were telling users to go find a generated password in the logs, which invites them to leave the default in place believing it is random. Rewritten in:
    • README.md — the "Auto-Generated Credentials (v0.21.7)" feature entry is now "Database-Backed User Management", plus a new First login section carrying the warning and the recovery procedure
    • docs/DOCKER.md — quick-start comment and the Default Credentials block
    • docs/CONFIGURATION.md — both [web] examples, the password key description, and a warning block
    • docs/TROUBLESHOOTING.md — the auth-recovery steps were wrong in a second way: users live in the database, so editing password in lightnvr.ini does nothing for an account that already exists. Replaced with the delete-the-row-and-restart procedure that actually works.
  • Decision: keep the admin / admin default, document it as a warning, and make it hard to keep by gating new installs behind a forced password change — tracked in Require admin password change on first login #493.
  • Secondary: the first-run banner in db_auth_init() printed Password: admin unconditionally, including when a config-file password was used — wrong in the one case where the operator did the right thing, and it contradicted the newly documented "pre-set the password before first start" path. Now reports which credential is actually valid.
  • Phantom registry references. matteius/lightnvr (Docker Hub, zero tags) and lightnvr/lightnvr (does not exist) removed in favor of ghcr.io/opensensor/lightnvr, which is what docker-publish.yml actually pushes.
  • Minimum memory — replaced the "unknown what the minimum is" placeholder with a measured table: ~75 MB for the started container with no streams, 256 MB for a few streams without detection, 1 GB+ with detection.
  • Code-block sweep. Script flags were all real (the suspicious hits were journalctl invocations). What was wrong: the web-asset copy that does not happen, two environment variables nothing reads, a diagnostic script that never existed, a build-ingenic.sh that never existed, a .tar.gz release asset that is not published, and a .deb download URL missing the Debian suite.

Phase 1 — Platform coverage

  • Windows via Podman + WSL2docs/WINDOWS_PODMAN.md. Covers the parts that actually bite: podman binds published ports to 127.0.0.1 only (so LAN access needs mirrored networking or netsh portproxy), the SQLite database must not live on a C:\ bind mount, ONVIF multicast discovery does not cross WSL's NAT, and keeping a 24/7 recorder alive across logon/sleep/reboot.
  • Home Assistant add-ondocs/HOME_ASSISTANT.md. The add-on lives in opensensor/lightnvr-hassio-addons and documents its own options there; this guide is the discovery point and covers the deviations from a plain Docker deployment (port 7800, host networking, recordings kept out of HA backups) plus the MQTT step that actually makes Home Assistant aware of detections.
  • NAS — covered as one section in INSTALLATION.md. Deliberately not three per-vendor click-path guides: their UIs change and I cannot verify them. What it does cover is the LightNVR-specific part — database off network shares, bridge networking vs ONVIF multicast, container UID, disk spin-down.
  • Raspberry Pi — leads with the container and .deb, and opens with the SD-card wear problem that kills Pi NVR builds.

Phase 2 — Structure

docs/ holds 32 files with no index, mixing user-facing guides with internal design notes (PRD_*, SUMMARY_*, *_REFACTORING, *_IMPLEMENTATION, GO2RTC_CAMERA_RECONNECTION_FIX). Some have not been touched since April 2025. A newcomer cannot tell which files are for them.

  • docs/README.md — grouped by task, opening with a getting-started path.
  • docs/internal/ — nine historical writeups moved, plus the retention PRD into docs/prd/. Eight of the nine had zero inbound links from anywhere.
  • Getting-started path — install → change the password → add a camera → verify recording → set retention → optional detection, at the top of docs/README.md.
  • docs/CAMERAS.md — requirements, how to find an RTSP URL by asking the camera rather than from stale vendor lists, and a vendor table built only from real linked issues that were really fixed. No invented compatibility matrix.

Phase 3 — Keeping it true

  • CI link checkscripts/check_docs_links.py, run by the Documentation Links workflow and locally the same way. Found seven dead links on its first run.
  • Release checkpoint — a table in RELEASE_PROCESS.md mapping each kind of change to the documents that must change with it. Every row is there because it was wrong at some point.
  • Version stamps — on the guides whose behavioral claims were checked against a running 0.37.x.

Not in scope

Rewriting ARCHITECTURE.md or API.md. Both are large, current, and serve their audience.

Landed so far

  • docs/WINDOWS_PODMAN.md — Windows via Podman + WSL2, linked from the README index, INSTALLATION.md, and DOCKER.md
  • Phantom registry references replaced with ghcr.io/opensensor/lightnvr
  • The credentials rewrite across four documents, plus the startup-banner correction

Next up: docs/INSTALLATION.md's minimum-memory placeholder, and the Phase 2 index — the
structural problem is what makes everything else hard to find.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions