# LogLynx Configuration File # Copy this file to .env and customize the values # ================================ # Database Configuration # ================================ DB_PATH=loglynx.db DB_MAX_OPEN_CONNS=10 DB_MAX_IDLE_CONNS=3 DB_CONN_MAX_LIFE=1h # Data Retention (NEW - Automatic cleanup) # Set to 0 to disable automatic cleanup (database will grow indefinitely) DB_RETENTION_DAYS=60 # Cleanup schedule - how often to check if cleanup should run DB_CLEANUP_INTERVAL=1h # Time of day to run cleanup (24-hour format HH:MM) # Default: 02:00 (2 AM) - recommended for low-traffic time DB_CLEANUP_TIME=02:00 # Run VACUUM after cleanup to reclaim disk space # VACUUM briefly locks the database (~1 minute per GB freed) DB_VACUUM_ENABLED=true # ================================ # GeoIP Configuration # ================================ # Download GeoIP databases from MaxMind: # https://dev.maxmind.com/geoip/geolite2-free-geolocation-data GEOIP_ENABLED=true GEOIP_CITY_DB=geoip/GeoLite2-City.mmdb GEOIP_COUNTRY_DB=geoip/GeoLite2-Country.mmdb GEOIP_ASN_DB=geoip/GeoLite2-ASN.mmdb # ================================ # Log Sources Configuration # ================================ # --- Traefik --- # Single file or comma-separated list for multiple files TRAEFIK_LOG_PATH=traefik/logs/access.log # TRAEFIK_LOG_PATH=/var/log/traefik/access1.log,/var/log/traefik/access2.log # Log format hint: auto (default), json, clf TRAEFIK_LOG_FORMAT=auto # --- Caddy --- # Single file or comma-separated list for multiple files CADDY_LOG_PATH=caddy/logs/access.log # CADDY_LOG_PATH=/var/log/caddy/site1.log,/var/log/caddy/site2.log # --- nginx --- # Single file or comma-separated list for multiple files # NGINX_LOG_PATH=/var/log/nginx/access.log # NGINX_LOG_PATH=/var/log/nginx/site1.log,/var/log/nginx/site2.log # Log format hint: combined (default), common, json NGINX_LOG_FORMAT=combined # --- Apache HTTP Server --- # Single file or comma-separated list for multiple files # APACHE_LOG_PATH=/var/log/apache2/access.log # APACHE_LOG_PATH=/var/log/apache2/site1.log,/var/log/apache2/site2.log # Log format hint: combined (default), common, vhost_combined APACHE_LOG_FORMAT=combined # --- HAProxy --- # Single file or comma-separated list for multiple files # HAPROXY_LOG_PATH=/var/log/haproxy.log # HAPROXY_LOG_PATH=/var/log/haproxy-1.log,/var/log/haproxy-2.log # Auto-discover Traefik and Caddy at default locations (nginx/Apache/HAProxy require explicit paths) LOG_AUTO_DISCOVER=true # Initial Import Limiting # On first run, only import last N days from log files # Set to 0 to import all historical data INITIAL_IMPORT_DAYS=60 # Enable/disable initial import limiting INITIAL_IMPORT_ENABLE=true # ================================ # Web Server Configuration # ================================ SERVER_HOST=0.0.0.0 SERVER_PORT=8080 SERVER_PRODUCTION=false # Dashboard UI enabled (set to false for API-only mode) # When disabled, only API routes at /api/v1 are accessible # Useful for headless/API-only deployments or security-focused setups DASHBOARD_ENABLED=true # Splash screen on startup (set to false to disable) # When enabled, shows a loading screen while initial logs are being processed # Default: true SPLASH_SCREEN_ENABLED=true # Application log level (trace, debug, info, warn, error, fatal) # Default: info LOG_LEVEL=info # ================================ # Performance Tuning # ================================ # How often to collect real-time metrics # 1s recommended for best real-time responsiveness METRICS_INTERVAL=1s # GeoIP cache size (number of IPs to cache) GEOIP_CACHE_SIZE=10000 #Loaded but not implemented yet (reserved for future LRU caching) # Batch size for bulk inserts BATCH_SIZE=1000 # Number of worker goroutines for log processing WORKER_POOL_SIZE=4 # Dashboard timezone. Prefer TIMEZONE; Docker-style TZ is also accepted as fallback. # Use an IANA timezone name, e.g. America/New_York. TIMEZONE=UTC # Widget endpoints enabled (set to false to disable /widget page and API) # Useful for security - hides widget endpoints when not needed # Default: true WIDGET_ENABLED=true # ================================ # Alerting Configuration # ================================ # Enable/disable the alert evaluation engine # Default: true ALERTS_ENABLED=true # How often to evaluate alert rules against recent traffic # Default: 30s (min: 10s recommended) ALERTS_EVAL_INTERVAL=30s