Repository navigation
EN Debian
RustNVR as a systemd service on a Linux x86-64 machine (mini-PC, home
server) or, since 2026.11.11, ARM 64-bit (Raspberry Pi 4 and 5 on 64-bit
Raspberry Pi OS). Checked from installation to removal on Ubuntu 26.04, and
as an update on a Raspberry Pi 4 (Raspberry Pi OS 13); the archive is built
on Debian 12 and runs on Debian 12 and 13 (and distributions as recent).
install.sh takes the archive of the machine by itself (linux-x86_64 or
linux-aarch64).
On a Raspberry Pi: keep the recordings on a USB disk or a NAS rather than on the SD card (Settings → Storage), and pick a small object recognition model (YOLOX-nano or YOLOX-s): the large ones take several seconds per picture.
Nothing to build, neither Rust nor Node.js:
sudo apt install curl ffmpeg
curl -fsSLO https://raw.githubusercontent.com/Guiyomee/RustNVR/main/packaging/install.sh
sudo bash install.shinstall.sh downloads the latest version, checks its hash, then creates the
rustnvr account, the /etc/rustnvr and /var/lib/rustnvr folders, a
starting configuration (HTTPS, admin account, password drawn at random and
shown once, kept in /etc/rustnvr/rustnvr.env) and starts the service. At
the end, it checks that the interface answers and otherwise shows the last
lines of the log.
Options: --version v2026.11.11, --port 8081, --no-start. A port below
1024 (80, 443) works too: the service has that one right
(CAP_NET_BIND_SERVICE).
Update: sudo rustnvr-update. Only the program and the interface are
replaced. From the interface too (since 2026.11.10): About → Updates → Update to
… (administrators). A separate service, as root, downloads the version from
the repository chosen at installation, checks its fingerprint, installs it and
restarts RustNVR (about a minute); the page reloads by itself. That service is
installed by an update by hand made with the rustnvr-update of 2026.11.10 or
later. If the button does not show (update made from an older version),
reinstall the current version once, as « About » says:
sudo rustnvr-update --version v<installed version>.
Requirements: stable Rust, gcc, Node.js 24 and npm (for the interface),
FFmpeg recommended.
cargo build --release # program: target/release/rustnvr
cd web && npm ci && npm run build # interface: web/distInstall:
sudo useradd --system --home-dir /var/lib/rustnvr --shell /usr/sbin/nologin rustnvr
sudo install -d -o rustnvr -g rustnvr -m 0750 /etc/rustnvr /var/lib/rustnvr /var/lib/rustnvr/recordings
sudo install -m 0755 target/release/rustnvr /usr/local/bin/rustnvr
sudo install -d /usr/local/share/rustnvr
sudo cp -r web/dist /usr/local/share/rustnvr/webConfigure: start from config.example.toml,
copied to /etc/rustnvr/config.toml (owner rustnvr, mode 0640):
[storage]
recordings_dir = "/var/lib/rustnvr/recordings"
[web]
listen = "0.0.0.0:8080"
static_dir = "/usr/local/share/rustnvr/web"
username = "admin" # first administrator account
password_env = "RUSTNVR_WEB_PASSWORD"
tls_self_signed = true
[[cameras]]
id = "front"
name = "Front door"
main = { url = "rtsp://192.168.1.20:554/Streaming/Channels/101", username = "admin", password_env = "RUSTNVR_FRONT_PASSWORD" }
sub = { url = "rtsp://192.168.1.20:554/Streaming/Channels/102", username = "admin", password_env = "RUSTNVR_FRONT_PASSWORD" }Cameras can also be added later from the interface. Passwords stay out of
config.toml, in a file readable by root only, read by systemd:
sudo install -m 0600 /dev/null /etc/rustnvr/rustnvr.env
sudoedit /etc/rustnvr/rustnvr.envRUSTNVR_WEB_PASSWORD=a-long-password
RUSTNVR_FRONT_PASSWORD=the-camera-passwordCheck the configuration:
sudo sh -c 'set -a; . /etc/rustnvr/rustnvr.env; /usr/local/bin/rustnvr check-config -c /etc/rustnvr/config.toml'Start the service (rustnvr.service):
sudo install -m 0644 packaging/systemd/rustnvr.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now rustnvr
journalctl -u rustnvr -fThe service runs under the rustnvr account, can only write to
/etc/rustnvr and /var/lib/rustnvr, and restarts on error. When it stops,
the segments being written are finished: no partial file stays. Settings
made in the interface are written next to config.toml (*.ui.toml, mode
0600 when they hold passwords). Once an account exists, password_env is
no longer used.
Updating from the code:
cargo build --release && (cd web && npm ci && npm run build)
sudo systemctl stop rustnvr
sudo install -m 0755 target/release/rustnvr /usr/local/bin/rustnvr
sudo rm -rf /usr/local/share/rustnvr/web && sudo cp -r web/dist /usr/local/share/rustnvr/web
sudo systemctl start rustnvr-
web.tls_self_signed = true: RustNVR makes a certificate and logs its fingerprint (journalctl -u rustnvr | grep fingerprint); compare it with the browser's before accepting. - Or your certificate:
web.tls_certandweb.tls_key(PEM files readable by therustnvraccount). - Or a reverse proxy: see Accounts and security.
| Flow | Port | For |
|---|---|---|
| TCP in |
web.listen (8080) |
interface, API, standard live view |
| UDP in | 32768–60999 | « Low latency » live view (WebRTC), one port per viewer |
| TCP in | 8554 | RTSP republication, when on |
| TCP out | 554 (RTSP) of the cameras | receiving the streams |
| TCP out | 1883 / 8883 | MQTT, when used |
With ufw, limited to the local network:
sudo ufw allow from 192.168.1.0/24 to any port 8080 proto tcp
sudo ufw allow from 192.168.1.0/24 to any port 32768:60999 proto udp # WebRTC only-
NAS or second disk: mount the share (
/etc/fstab,softoption for NFS so that a NAS failure returns errors instead of blocking), give access to therustnvraccount (uid=/gid=options of an SMB share, or folder owner), then declare it in Settings → Storage with « Network share must be mounted ». -
S3, SFTP: Settings → Storage. An SFTP private key preferably goes in
/etc/rustnvr(ownerrustnvr, mode0600).
/etc/rustnvr (configuration and settings, passwords included) and
/var/lib/rustnvr/recordings/.rustnvr (accounts, events, thumbnails,
detection settings, certificate). Copy the database with the service
stopped, or with sqlite3 rustnvr.db ".backup /path/backup.db". The
encrypted backup of the interface (Settings → Backup) covers the
configuration. The videos are ordinary MP4 files.
sudo systemctl disable --now rustnvr rustnvr-update.path
sudo rm -f /etc/systemd/system/rustnvr.service /etc/systemd/system/rustnvr-update.*
sudo systemctl daemon-reload
sudo rm -rf /usr/local/bin/rustnvr /usr/local/bin/rustnvr-update /usr/local/share/rustnvr
sudo rm -f /usr/bin/rustnvr /usr/bin/rustnvr-update
sudo rm -rf /etc/rustnvr /var/lib/rustnvr /var/lib/rustnvr-update # also deletes the recordings
sudo userdel rustnvr