# ============================================================================ # ROA2WEB Telegram Bot - Environment Configuration Template # ============================================================================ # Copy this file to .env and fill in your actual values # IMPORTANT: Never commit .env file to git! # ============================================================================ # TELEGRAM BOT CONFIGURATION (REQUIRED) # ============================================================================ # Obtain bot token from @BotFather on Telegram # Used by app/main.py to authenticate the bot TELEGRAM_BOT_TOKEN=your_bot_token_here # ============================================================================ # BACKEND API CONFIGURATION (REQUIRED) # ============================================================================ # Backend API URL for data retrieval # Used by app/api/client.py and app/main.py # Development: http://localhost:8001 # Docker: http://roa-backend:8000 BACKEND_URL=http://localhost:8001 # ============================================================================ # EMAIL AUTHENTICATION (SMTP) CONFIGURATION (REQUIRED for email 2FA) # ============================================================================ # Required for email-based 2FA authentication flow # Users can login with email + password instead of web app linking # Used by app/utils/email_service.py # SMTP Server Configuration SMTP_HOST=mail.romfast.ro SMTP_PORT=587 SMTP_USER=ups@romfast.ro SMTP_PASSWORD=your_smtp_password_here SMTP_FROM_EMAIL=ups@romfast.ro SMTP_FROM_NAME=ROA2WEB SMTP_USE_TLS=true # Email Retry Settings (used by app/utils/email_service.py) EMAIL_MAX_RETRIES=3 EMAIL_RETRY_DELAY=2.0 # ============================================================================ # SESSION SECURITY (REQUIRED) # ============================================================================ # Must match backend AUTH_SESSION_SECRET for email login flow # Used by app/auth/email_auth.py for session token validation # Generate with: python3 -c "import secrets; print(secrets.token_urlsafe(32))" AUTH_SESSION_SECRET=your-secure-random-secret-here-min-32-chars # ============================================================================ # INTERNAL API CONFIGURATION (OPTIONAL - has defaults) # ============================================================================ # Internal API port for backend to call telegram-bot (save auth codes) # Used by app/main.py to start internal FastAPI server # Default: 8002 INTERNAL_API_PORT=8002 # Enable internal API documentation (development only) # Used by app/internal_api.py # Default: false ENABLE_DOCS=false # Show detailed error messages in API responses (development only) # Used by app/internal_api.py # Default: false DEBUG=false