# DigiServer v2 Production Environment Configuration # Copy to .env and update with your production values # IMPORTANT: Never commit this file to git # Server Configuration # --------------------------------------------------------------------------- # Deploy-time TLS bootstrap. Copy this file to `.env` and set these two before # `docker compose up`. Both must be present for HTTPS to be configured at # startup; if either is missing the app stays on the plain-HTTP fallback and you # can enable HTTPS later from Admin → HTTPS Configuration (no restart needed). # --------------------------------------------------------------------------- # Hostname shown in the UI and used in the Caddy site block. HOSTNAME_INTERNAL=digiserver # The host's LAN IP as reachable by the players/browsers. # Replace 192.168.1.100 with THIS server's actual LAN IP. It is used for the # Caddy site blocks and the certificate, so a wrong value breaks HTTPS. # Find it with: ip -4 route get 1.1.1.1 | grep -oP 'src \K[\d.]+' HOST_IP=192.168.1.100 # Public domain for Let's Encrypt. LEAVE EMPTY for an intranet/internal name # (e.g. "digiserver" or "signage.corp.local") — a non-public name cannot pass an # ACME challenge, so an empty DOMAIN selects Caddy's internal CA instead. DOMAIN= # Email for ACME/Let's Encrypt notifications (unused by the internal CA). SSL_EMAIL=admin@example.com # Published ports. Caddy listens on 80/443 inside the container; these control # which host ports they are mapped to. Port 80 is always answered — the site # responds whether clients use the IP or the hostname. HTTP_PORT=80 HTTPS_PORT=443 # "true" → also serve plain HTTP alongside HTTPS. Required for players whose # trust store lacks the internal CA (i.e. verify_ssl is not disabled). # "false" → serve TLS only and redirect HTTP to https://:. HTTPS_HTTP_FALLBACK=true # After configuring HTTPS, probe it and automatically fall back to plain HTTP if # it does not come up — so a bad certificate can never make the site unreachable. # Set "false" to trust the configuration without probing. HTTPS_VERIFY=true # Flask Configuration FLASK_ENV=production FLASK_APP=app.app:create_app # Security - MUST BE SET IN PRODUCTION # Generate with: python -c "import secrets; print(secrets.token_urlsafe(32))" SECRET_KEY=change-me-to-a-strong-random-secret-key-at-least-32-characters # Admin User Configuration ADMIN_USERNAME=admin ADMIN_PASSWORD=change-me-to-a-strong-password ADMIN_EMAIL=admin@your-domain.com # Database Configuration (optional - defaults to SQLite) # For PostgreSQL: postgresql://user:pass@host:5432/database # For SQLite: sqlite:////data/instance/dashboard.db # DATABASE_URL= PREFERRED_URL_SCHEME=https # Logging LOG_LEVEL=INFO # Features (optional) ENABLE_LIBREOFFICE=true MAX_UPLOAD_SIZE=500000000 # 500MB # Cache Configuration (optional) CACHE_TYPE=simple CACHE_DEFAULT_TIMEOUT=300 # Session Configuration SESSION_COOKIE_SECURE=true SESSION_COOKIE_HTTPONLY=true SESSION_COOKIE_SAMESITE=Lax # Proxy Configuration (configured in app.py) # IMPORTANT: Set this to your actual network range or specific proxy IP # Examples: # - 192.168.0.0/24 (local network with /24 subnet) # - 10.0.0.0/8 (AWS or similar cloud) # - 172.16.0.0/12 (Docker networks) # For multiple IPs: 192.168.0.121,10.0.1.50 TRUSTED_PROXIES=192.168.0.0/24