# NextNVR A lightweight, self-hosted video recorder for IP cameras. Records 8 RTSP streams into 5-minute MP4 clips with near-zero CPU usage. Built for the **Casa Alba Mindelo** guesthouse. --- ## Quick Install Copy and paste this single line into your terminal: ```bash curl -sSL https://git.lohmar.co.uk/cclohmar/NextNVR/raw/branch/main/setup.sh | bash ``` That's it. The script installs everything needed and starts NextNVR automatically. Once done, open the web interface in your browser (the script prints the URL). --- ## Supported Systems | Distro | Package Manager | Status | |---|---|---| | Debian 12+ / Ubuntu 22.04+ | `apt` | ✅ Tested | | Fedora 40+ / RHEL 9+ | `dnf` / `yum` | ✅ | | Arch Linux | `pacman` | ✅ | | Alpine Linux | `apk` | ✅ | | Other (systemd) | auto-detect | ✅ | | Other (no systemd) | fallback to `nohup` | ✅ | - **ARM64** (Raspberry Pi, etc.) — auto-detected - **Root or sudo** — handles both --- ## What It Does | Feature | Detail | |---|---| | 📹 **Recording** | 8 cameras simultaneously, 5-minute MP4 clips | | 💾 **Storage** | Saves to `/mnt/recordings/` — keeps 18 days, auto-deletes older | | 🖥️ **Live Wall** | 4×2 grid showing all cameras at once. Click one to enlarge. | | 🔍 **Playback** | Browse recordings by camera and date with presets (Today, Yesterday, Last 7 Days) | | ⚙️ **Setup Wizard** | Scans your network for cameras and helps you name them | | 🔒 **Local Only** | Everything runs on your own hardware. No cloud, no subscriptions. | --- ## Server | What | Detail | |---|---| | Web interface | `http://:8080` | | Config file | `/opt/nextnvr/config.yaml` | | Recordings | `/mnt/recordings/` | | Logs | `sudo journalctl -u nextnvr -f` (systemd) or `tail -f /opt/nextnvr/nextnvr.log` (nohup) | ### Useful Commands ```bash sudo systemctl status nextnvr # is it running? sudo systemctl restart nextnvr # restart after changing config sudo systemctl stop nextnvr # stop recording sudo journalctl -u nextnvr -f # watch live logs ``` --- ## How It Works ``` IP Cameras NextNVR Your Browser ─────────── ────────── ───────────── 192.168.1.201 ─┐ 192.168.1.202 ─┤ RTSP FFmpeg -c copy .mp4 http://192.168.1.10:8080 192.168.1.203 ─┼──────────► (no re-encoding) ────────► Live Wall + Playback ... ┤ 5 min segments Settings + Setup 192.168.1.209 ─┘ auto-delete >18d ``` - **Zero transcoding** — FFmpeg copies the video stream directly. CPU stays under 5%. - **Crash-proof** — if a camera disconnects, it auto-reconnects after 5 seconds. - **Atomic files** — recording in progress uses `.part.mp4`. Only renamed to `.mp4` when complete. No corrupted files. --- ## Adding or Changing Cameras 1. Open the web interface in your browser 2. Click the **Settings** tab 3. Click **🔍 Scan Network** to find your cameras 4. Give each camera a name and description 5. Click **💾 Save Configuration** 6. Restart: `sudo systemctl restart nextnvr` Or edit the config file directly: ```bash sudo nano /opt/nextnvr/config.yaml sudo systemctl restart nextnvr ``` --- ## Updating ```bash curl -sSL https://git.lohmar.co.uk/cclohmar/NextNVR/raw/branch/main/setup.sh | bash ``` The script pulls the latest version and restarts the service automatically. --- ## Troubleshooting | Problem | Check | |---|---| | Can't open the web page | Is NextNVR running? `sudo systemctl status nextnvr` | | No cameras showing | Check `config.yaml` — are camera IPs and passwords correct? | | Recordings not saving | Does `/mnt/recordings/` exist? Is the disk mounted? (`df -h`) | | Disk full | Recordings older than 18 days are auto-deleted. Check `df -h /mnt/recordings` | --- Built with ❤️ in Mindelo, Portugal. 🇵🇹