I have just started testing this app to see if it feels me needs, looks great so far but I am hitting this start-up loop on multiple occassions.
I have edited some settings (disable STUN and set external IP, as per this issue: #412) and when i restart the docker container I get the following in logs:
[INFO] Initializing LightNVR configuration...
[INFO] Creating directory structure...
[INFO] Directory already exists: /etc/lightnvr
[INFO] Directory already exists: /var/lib/lightnvr/data
[INFO] Directory already exists: /var/lib/lightnvr/data/recordings
[INFO] Directory already exists: /var/lib/lightnvr/data/recordings/mp4
[INFO] Directory already exists: /var/lib/lightnvr/data/database
[INFO] Directory already exists: /var/lib/lightnvr/data/models
[INFO] Directory already exists: /var/log/lightnvr
[INFO] Verifying web assets at /var/lib/lightnvr/www
[INFO] Web assets present.
[INFO] Configuration file already exists at /etc/lightnvr/lightnvr.ini
[INFO] Removing old go2rtc configuration to regenerate fresh...
[INFO] Creating default go2rtc configuration...
[INFO] Default go2rtc configuration created at /etc/lightnvr/go2rtc/go2rtc.yaml
[INFO] No models to copy, skipping model initialization
[INFO] Setting permissions...
[INFO] Testing write permissions...
[INFO] Write permission OK: /var/lib/lightnvr/data
[INFO] Write permission OK: /etc/lightnvr
[INFO] Write permission OK: /var/log/lightnvr
[INFO] Initialization complete
[INFO] Using persistent go2rtc configuration from /etc/lightnvr/go2rtc/go2rtc.yaml
[INFO] Regenerating go2rtc configuration from saved LightNVR settings...
LightNVR v0.34.4 - Lightweight NVR
Build date: 2026-04-25
[2026-05-07 14:24:48.680] [INFO] Custom config path set to: /etc/lightnvr/lightnvr.ini
[2026-05-07 14:24:48.680] [INFO] Using custom config path: /etc/lightnvr/lightnvr.ini
[2026-05-07 14:24:48.680] [INFO] max_streams set to 4
[2026-05-07 14:24:48.680] [INFO] Loaded configuration from custom path: /etc/lightnvr/lightnvr.ini
[2026-05-07 14:24:48.680] [INFO] Loaded config path set to: /etc/lightnvr/lightnvr.ini
[2026-05-07 14:24:48.680] [INFO] Checking for LIGHTNVR_ environment variable overrides
[2026-05-07 14:24:48.680] [INFO] Using web root: /var/lib/lightnvr/www
[2026-05-07 14:24:48.680] [INFO] Logging to file: /var/log/lightnvr/lightnvr.log
[2026-05-07 14:24:48.681] [INFO] Initializing libcurl globally...
Setting log level from config: 2
[LOG LEVEL CHANGE] INFO -> INFO
[2026-05-07 14:24:48.681] [ERROR] Log level set to 2 (INFO)
[2026-05-07 14:24:48.685] [INFO] libcurl initialized globally successfully
[2026-05-07 14:24:48.685] [INFO] Generated go2rtc configuration file: /etc/lightnvr/go2rtc/go2rtc.yaml
[2026-05-07 14:24:48.685] [INFO] Cleaning up libcurl globally...
[2026-05-07 14:24:48.685] [INFO] libcurl cleaned up globally
[INFO] go2rtc configuration regenerated from saved settings
[INFO] ==========================================
[INFO] LightNVR Container Starting
[INFO] ==========================================
[INFO] Web UI: http://localhost:8080
[INFO] go2rtc API: http://localhost:1984
[INFO] RTSP Port: 8554
[INFO] WebRTC Port: 8555 (TCP/UDP)
[INFO]
[INFO] Default credentials:
[INFO] Username: admin
[INFO] Password: admin
[INFO]
[INFO] Volume mounts:
[INFO] Config: /etc/lightnvr
[INFO] Data: /var/lib/lightnvr/data
[INFO] Recordings: /var/lib/lightnvr/data/recordings
[INFO] ==========================================
[INFO] Starting LightNVR...
14:24:48.696 INF go2rtc platform=linux/amd64 revision=8ee7782 version=1.9.14+dev.8ee7782
14:24:48.696 INF config path=/etc/lightnvr/go2rtc/go2rtc.yaml
14:24:48.698 INF [rtsp] listen addr=:8554
14:24:48.698 INF [api] listen addr=:1984
14:24:48.698 INF [webrtc] listen tcp addr=[::]:8555
14:24:48.698 INF [webrtc] listen udp addr=10.88.0.10:8555
LightNVR v0.34.4 - Lightweight NVR
Build date: 2026-04-25
[2026-05-07 14:24:50.770] [INFO] Custom config path set to: /etc/lightnvr/lightnvr.ini
[2026-05-07 14:24:50.770] [INFO] Using custom config path: /etc/lightnvr/lightnvr.ini
[2026-05-07 14:24:50.770] [INFO] max_streams set to 4
[2026-05-07 14:24:50.770] [INFO] Loaded configuration from custom path: /etc/lightnvr/lightnvr.ini
[2026-05-07 14:24:50.770] [INFO] Loaded config path set to: /etc/lightnvr/lightnvr.ini
[2026-05-07 14:24:50.770] [INFO] Checking for LIGHTNVR_ environment variable overrides
[2026-05-07 14:24:50.770] [INFO] Using web root: /var/lib/lightnvr/www
[2026-05-07 14:24:50.770] [INFO] Logging to file: /var/log/lightnvr/lightnvr.log
Setting log level from config: 2
[LOG LEVEL CHANGE] INFO -> INFO
[2026-05-07 14:24:50.770] [ERROR] Log level set to 2 (INFO)
[2026-05-07 14:24:50.770] [INFO] LightNVR v0.34.4 starting up
[2026-05-07 14:24:50.770] [INFO] Shutdown coordinator initialized
[2026-05-07 14:24:50.770] [INFO] Shutdown coordinator initialized
[2026-05-07 14:24:50.770] [INFO] Signal handlers initialized with improved handling
[2026-05-07 14:24:50.771] [WARN] Another instance with PID 46 appears to be running
[2026-05-07 14:24:50.771] [INFO] Attempting to terminate previous instance (PID: 46) with SIGTERM
[SIGNAL] Received shutdown signal, initiating shutdown...
Cleaning up processes...
exit with signal: terminated
Streaming disconnected
The container just re-shuts itself down after starting it?
This happens over and over again until I either manually stop the container again when at the "Cleaning up processes" stage or delete the image and re-pull the image.
I have just started testing this app to see if it feels me needs, looks great so far but I am hitting this start-up loop on multiple occassions.
I have edited some settings (disable STUN and set external IP, as per this issue: #412) and when i restart the docker container I get the following in logs:
The container just re-shuts itself down after starting it?
This happens over and over again until I either manually stop the container again when at the "Cleaning up processes" stage or delete the image and re-pull the image.