-
Notifications
You must be signed in to change notification settings - Fork 0
Windows Service
NeXroll can run as a Windows Service for background operation without user login.
The Windows Service (NeXrollService) provides:
- Automatic startup on system boot
- Runs without user session
- Survives user logoff/login
- Managed by Windows Services console
Select "Install as Windows Service" during NeXroll installation:
- Run
NeXroll_Installer.exeas administrator - Check "Install as Windows Service"
- Complete installation
After installation, install the service manually:
cd "C:\Program Files\NeXroll"
NeXrollService.exe install
NeXrollService.exe start- Press
Win + R, typeservices.msc - Find "NeXroll Service"
- Right-click for Start/Stop/Restart/Properties
# Install service
NeXrollService.exe install
# Start service
NeXrollService.exe start
# Stop service
NeXrollService.exe stop
# Restart service
NeXrollService.exe restart
# Remove service
NeXrollService.exe remove
# Check status
sc query NeXrollServiceIf tray app is installed, use tray menu:
- Right-click tray icon
- Start Service / Stop Service / Restart Service
- Service Name: NeXrollService
- Display Name: NeXroll Service
- Description: NeXroll background service
- Startup Type: Automatic (Delayed Start)
- Log On: Local System account
The service depends on:
- Windows Event Log
- Network services (for Plex/Jellyfin access)
- Windows starts service at boot
- Service initializes NeXroll backend
- Web UI becomes available on port 9393
- Scheduler begins monitoring schedules
- Runs in background with no UI
- Monitors Plex/Jellyfin connections
- Executes scheduled preroll changes
- Handles API requests
- Logs to
%ProgramData%\NeXroll\logs\service.log
- Graceful shutdown on system shutdown
- Saves current state
- Stops scheduler cleanly
Check service health:
sc queryex NeXrollServiceService logs location:
%ProgramData%\NeXroll\logs\service.log
Monitor logs for:
- Startup messages
- Connection status
- Schedule execution
- Error conditions
Monitor service resource usage:
- CPU: Should be <5% when idle
- Memory: ~100-200 MB typical
- Network: Minimal, mostly API calls
Symptoms: Service fails to start after boot/installation
Solutions:
- Check service logs for errors
- Verify port 9393 is not in use
- Ensure proper permissions
- Try starting manually:
NeXrollService.exe start
Common errors:
- Port conflict: Another service using port 9393
- Permission denied: Run installer as administrator
- Missing dependencies: Reinstall NeXroll
Symptoms: Service stops unexpectedly
Solutions:
- Check Windows Event Viewer → Windows Logs → System
- Review service logs for stack traces
- Verify database integrity
- Check system resources (memory/disk)
Symptoms: http://localhost:9393 not responding
Solutions:
- Verify service is running
- Check firewall rules
- Try restarting service
- Check service logs
Symptoms: Service using excessive CPU/memory
Solutions:
- Check for runaway processes
- Review recent schedule executions
- Verify Plex/Jellyfin connectivity
- Restart service
Runs as Local System account with:
- Full access to NeXroll installation directory
- Access to
%ProgramData%\NeXroll - Network access for Plex/Jellyfin
- No interactive login capability
Service requires:
- Read/write access to data directory
- Network access to media servers
- Windows service management rights
Service needs inbound rule for TCP port 9393 (created by installer).
Service settings are stored in Windows registry:
HKLM\SYSTEM\CurrentControlSet\Services\NeXrollService
Service data includes:
- Database:
%ProgramData%\NeXroll\nexroll.db - Logs:
%ProgramData%\NeXroll\logs\ - Configuration files
To recover from service failure:
- Stop service
- Backup data directory
- Reinstall service
- Restore data
- Start service
Modify service parameters in registry or use command line:
# Set custom port
NeXrollService.exe --port 9394
# Debug mode
NeXrollService.exe --debugService inherits system environment variables. Custom variables:
set NEXROLL_PORT=9394
set NEXROLL_DEBUG=1Configure service dependencies:
sc config NeXrollService depend= LanmanServer- Tray app monitors service status
- Provides start/stop controls
- Shows service notifications
Can be combined with Windows Task Scheduler for additional automation.
Service logs important events to Windows Event Log:
- Application log
- Source: NeXrollService
Uninstaller automatically:
- Stops service
- Removes service registration
- Cleans up registry entries
# Stop and remove service
NeXrollService.exe stop
NeXrollService.exe remove
# Clean registry (optional)
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\NeXrollService" /fThe service uses pywin32 to wrap the NeXroll application:
import win32serviceutil
import win32service
import win32event
class NeXrollService(win32serviceutil.ServiceFramework):
_svc_name_ = "NeXrollService"
_svc_display_name_ = "NeXroll Service"
def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
self.hWaitStop = win32event.CreateEvent(None, 0, 0, None)
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self.hWaitStop)
def SvcDoRun(self):
# Start NeXroll application
import subprocess
self.process = subprocess.Popen(["NeXroll.exe", "--service"])
win32event.WaitForSingleObject(self.hWaitStop, win32event.INFINITE)Debug service issues:
# Run service interactively
NeXrollService.exe debug
# Check service events
eventvwr.msc → Windows Logs → SystemEnable verbose logging:
import logging
logging.basicConfig(
filename=r'C:\ProgramData\NeXroll\logs\service.log',
level=logging.DEBUG,
format='%(asctime)s - %(levelname)s - %(message)s'
)- Service automatically manages memory
- Monitor for memory leaks
- Restart periodically if needed
- Background processing for thumbnails
- Asynchronous API calls
- Efficient database queries
- Connection pooling for Plex/Jellyfin
- Timeout handling
- Retry logic for failed requests
- Regularly check service status
- Monitor log files
- Set up alerts for service failures
- Keep NeXroll updated
- Regularly backup data
- Monitor disk space
- Clean old log files
- Keep Windows updated
- Use strong Plex/Jellyfin tokens
- Monitor service account permissions
- Regular security audits