Administration Overview
This section covers server administration, configuration, and monitoring for Media Viewer.
Configuration
- Server Configuration - Directory structure, Docker deployment, and performance tuning
- Environment Variables - Complete environment variable reference
- Security - Authentication, session management, and security best practices
Monitoring & Operations
- Metrics & Monitoring - Prometheus metrics for performance monitoring and alerting
- Memory & GC Tuning - Optimize garbage collection and memory usage
- Thumbnail Management - Thumbnail generation, caching, and maintenance
Advanced Features
- WebAuthn Setup - Passwordless authentication with passkeys
Common Tasks
Deployment
- Configure environment variables for your paths and settings
- Set up volume mounts for media, cache, and database directories
- Configure security settings including strong passwords
- Review server configuration for performance tuning
Monitoring
- Enable Prometheus metrics endpoint at
/metrics - Configure Prometheus to scrape your Media Viewer instance
- Import the provided Grafana dashboard from
hack/grafana/dashboard.json - Set up alerts for indexer failures, high latency, and memory pressure
Maintenance
- Clear Thumbnail Cache: Use the clear cache button to regenerate all thumbnails
- Session Cleanup: Expired sessions are automatically removed
- Cache Management: Monitor cache size via metrics
Performance Tuning
Use Prometheus metrics to identify bottlenecks:
- Filesystem Latency: Critical for NFS deployments - monitor
filesystem_operation_duration - Indexing Performance: Track
indexer_files_per_secondand batch processing times - Thumbnail Generation: Analyze phase timing (decode/resize/encode) to optimize
- Memory & GC: Tune
MEMORY_RATIOorGOGCfor optimal performance - see Memory & GC Tuning - Database Performance: Watch transaction durations and query latencies
See Metrics & Monitoring for detailed guidance.
Troubleshooting
For common issues and solutions, see the Troubleshooting Guide.
Key troubleshooting resources:
- Check application logs for errors
- Review metrics for performance anomalies
- Validate file permissions on mounted volumes
- Verify FFmpeg is available for video/image processing