# Umami Environment Configuration Template # Copy this file to .env and update with your actual values # ============================================ # REQUIRED CONFIGURATION # ============================================ # Database Configuration (Required) # PostgreSQL connection string (minimum version 12.14) # Format: postgresql://username:password@host:port/database # Example: postgresql://umami:mypassword@localhost:5432/umami DATABASE_URL=postgresql://username:password@localhost:5432/umami # ============================================ # OPTIONAL CONFIGURATION # ============================================ # Base Path # If you want to host Umami under a subdirectory (e.g., /analytics) # Leave empty for root path deployment # BASE_PATH=/analytics # Tracker Script Customization # Comma-separated list of alternative names for the tracking script # Useful for avoiding ad blockers # TRACKER_SCRIPT_NAME=custom-script.js,analytics.js # Tracker Script URL # External URL for the tracker script if hosted separately # TRACKER_SCRIPT_URL=https://example.com/script.js # Collection API Endpoint # Custom endpoint for collecting analytics data # COLLECT_API_ENDPOINT=/api/collect # CORS Configuration # Maximum age for CORS preflight requests (in seconds) # CORS_MAX_AGE=86400 # Localization # Default locale for the application # DEFAULT_LOCALE=en-US # Security # Force SSL/HTTPS connections # FORCE_SSL=1 # Frame Ancestors # Allowed URLs that can embed Umami in an iframe (space-separated) # ALLOWED_FRAME_URLS=https://example.com https://another.com # Cloud Mode (Umami Cloud only) # Enable cloud mode features # CLOUD_MODE=1 # CLOUD_URL=https://cloud.umami.is # CLICKHOUSE_URL=https://clickhouse.example.com # REDIS_URL=redis://localhost:6379 # Database Type Override # Skip database checks if using alternative database setup # DATABASE_TYPE=custom # Skip Checks (Development only) # Skip database checks during development # SKIP_DB_CHECK=1 # SKIP_DB_MIGRATION=1 # ============================================ # NOTES # ============================================ # 1. Never commit the .env file to version control # 2. After first build, change the default admin password (admin/umami) # 3. Ensure PostgreSQL is running before starting the application # 4. For production, always use strong passwords and enable FORCE_SSL