This guide helps you diagnose and fix common web interface issues with LightNVR.
- Browser shows a blank white page
- Page title shows "WebRTC View - LightNVR" but no content
- No error messages visible on the page
The web assets (HTML, CSS, JavaScript files) were not installed to the web root directory during installation.
Important: The troubleshooting steps differ depending on how you installed LightNVR.
If you're running LightNVR in Docker, the web assets are already built into the Docker image. If you're experiencing web interface issues:
-
Check if you mounted
/var/lib/lightnvrdirectly (this overwrites the built-in web assets):docker inspect lightnvr | grep -A 5 MountsIf you see
/var/lib/lightnvrmounted, this is the problem. You should only mount/var/lib/lightnvr/data. -
Fix the volume mount:
# Stop the container docker compose down # Edit docker-compose.yml to change: # - ./data:/var/lib/lightnvr # WRONG - overwrites web assets # to: # - ./data:/var/lib/lightnvr/data # CORRECT - preserves web assets # Restart the container docker compose up -d
-
If the issue persists, recreate the container:
docker compose down docker compose pull # Get the latest image docker compose up -d
Note: The install_web_assets.sh script is not available in Docker containers and is not needed. The Docker image already contains all web assets.
If you installed LightNVR directly on your system (not using Docker), use the following steps:
Run the diagnostic script:
sudo bash scripts/diagnose_web_issue.shThis will check:
- Service status
- Configuration file
- Web root directory existence
- Critical web files
- Assets directory
- Recent logs
If the diagnostic confirms missing web assets, run:
sudo bash scripts/install_web_assets.shThis script will:
- Build web assets if needed (requires Node.js/npm)
- Install them to the correct location
- Set proper permissions
- Verify the installation
Then restart the service:
sudo systemctl restart lightnvrIf you prefer to fix it manually instead of using the script:
# Navigate to LightNVR source directory
cd /path/to/lightnvr
# Copy prebuilt assets
sudo mkdir -p /var/lib/lightnvr/www
sudo cp -r web/dist/* /var/lib/lightnvr/www/
# Set permissions
sudo chown -R root:root /var/lib/lightnvr/www
sudo chmod -R 755 /var/lib/lightnvr/www
# Restart service
sudo systemctl restart lightnvr# Navigate to LightNVR source directory
cd /path/to/lightnvr
# Install Node.js and npm if not already installed
# On Debian/Ubuntu:
sudo apt-get update
sudo apt-get install -y nodejs npm
# Build web assets
cd web
npm install
npm run build
# Install to web root
sudo mkdir -p /var/lib/lightnvr/www
sudo cp -r dist/* /var/lib/lightnvr/www/
# Set permissions
sudo chown -R root:root /var/lib/lightnvr/www
sudo chmod -R 755 /var/lib/lightnvr/www
# Restart service
cd ..
sudo systemctl restart lightnvrAfter applying the fix, verify the installation:
- Check that files exist:
ls -la /var/lib/lightnvr/www/You should see:
index.htmllogin.htmlstreams.htmlrecordings.htmlassets/directory with CSS and JS files
- Check service status:
sudo systemctl status lightnvr- Check logs for errors:
sudo tail -f /var/log/lightnvr/lightnvr.log- Access the web interface:
http://your-server-ip:8080
Default credentials:
- Username:
admin - Password:
admin
Cause: Web root path is incorrect in configuration
Fix:
- Check configuration:
sudo cat /etc/lightnvr/lightnvr.ini | grep "root"- Verify the path exists and contains files:
ls -la /var/lib/lightnvr/www/- If path is different, either:
- Update config to point to correct path, OR
- Install web assets to the configured path
Cause: Incorrect file permissions
Fix:
sudo chown -R root:root /var/lib/lightnvr/www
sudo chmod -R 755 /var/lib/lightnvr/www
sudo find /var/lib/lightnvr/www -type f -exec chmod 644 {} \;
sudo systemctl restart lightnvrSymptoms: Browser console (F12) shows errors like "Failed to load module" or "404 for assets"
Cause: Incomplete or corrupted web assets
Fix for Docker:
# Recreate the container with fresh assets
docker compose down
docker compose pull
docker compose up -dFix for Native Installation:
- Clear browser cache
- Reinstall web assets:
sudo bash scripts/install_web_assets.sh
sudo systemctl restart lightnvrSymptoms: Browser shows "Connection refused" or "Unable to connect"
Possible Causes:
- Service not running
- Firewall blocking port
- Wrong IP address or port
Fix:
- Check service status:
sudo systemctl status lightnvr- Check if port is listening:
sudo netstat -tlnp | grep 8080
# or
sudo ss -tlnp | grep 8080- Check firewall (if using ufw):
sudo ufw status
sudo ufw allow 8080/tcp- Check firewall (if using firewalld):
sudo firewall-cmd --list-all
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload- Verify configuration:
sudo cat /etc/lightnvr/lightnvr.ini | grep "port"Symptoms: Login page loads but credentials don't work
Fix:
- Check default credentials in config:
sudo cat /etc/lightnvr/lightnvr.ini | grep -A 2 "\[web\]"-
Try default credentials:
- Username:
admin - Password:
admin
- Username:
-
If you changed the password and forgot it, reset in config:
sudo nano /etc/lightnvr/lightnvr.iniChange the password line under [web] section, then:
sudo systemctl restart lightnvrIf none of these solutions work:
-
Collect diagnostic information:
For Docker:
# Collect container logs docker compose logs lightnvr > container_logs.txt # Check volume mounts docker inspect lightnvr | grep -A 10 Mounts > volume_info.txt # Check browser console # Open browser, press F12, go to Console tab, copy any errors
For Native Installation:
# Collect logs sudo journalctl -u lightnvr -n 100 --no-pager > service_logs.txt sudo tail -n 100 /var/log/lightnvr/lightnvr.log > app_logs.txt 2>/dev/null || true # Check browser console # Open browser, press F12, go to Console tab, copy any errors
-
Create an issue on GitHub with:
- Installation method (Docker or native)
- Container/service logs
- Application logs (if applicable)
- Browser console errors (if any)
- Your OS and version
- Docker version (if using Docker)
To avoid web interface issues in future installations:
-
Always use the correct volume mounts:
- Mount
/var/lib/lightnvr/datafor persistent data - Do NOT mount
/var/lib/lightnvrdirectly (overwrites web assets)
- Mount
-
Use the official Docker image:
docker compose pull docker compose up -d
-
Keep your docker-compose.yml updated: Follow the example in the repository to ensure correct configuration.
-
Always build web assets before installation:
cd web npm install npm run build cd ..
-
Use the installation script:
sudo bash scripts/install.sh
The install script will automatically detect and install prebuilt assets.
-
Keep backups: The install_web_assets.sh script automatically creates backups before overwriting files.