# Cloud (paid / managed-keys) mode — env template for openshorts.app. # Copy to .env and fill in. Only needed when running with docker-compose.cloud.yml. # Self-hosters running plain BYOK do NOT need any of this. BILLING_ENABLED=true # Postgres (docker-compose.cloud.yml provisions the `db` service) POSTGRES_PASSWORD=change-me DATABASE_URL=postgresql+asyncpg://openshorts:change-me@db:5432/openshorts # Auth JWT_SECRET=generate-a-long-random-string FRONTEND_URL=https://openshorts.app ALLOWED_ORIGINS=https://openshorts.app # Email — magic link + admin alerts, via SMTP (e.g. Namecheap Private Email). # Quote the password if it contains $ or * so dotenv keeps it literal. SMTP_HOST=mail.privateemail.com SMTP_PORT=465 SMTP_USER=info@yourdomain.com SMTP_PASSWORD='your-mailbox-password' EMAIL_FROM=OpenShorts # Operational alerts (proxy out of credits / high failure rate) are emailed here. ADMIN_EMAIL=you@example.com # Telegram admin alerts (optional) — instant pings for purchases, cancellations, # proxy-out-of-credits and high failure rate. Create a bot with @BotFather to get # the token, then message your bot and read the chat id from: # https://api.telegram.org/bot/getUpdates TELEGRAM_BOT_TOKEN= TELEGRAM_CHAT_ID= # Google OAuth (optional; magic link works without it) GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= # Stripe (test keys shown; use live keys in production). # Prices are resolved by lookup_key (starter_monthly, topup_60, ...) at runtime, # so no price IDs are needed here. Create the prices with those lookup_keys. STRIPE_SECRET_KEY=sk_test_... STRIPE_WEBHOOK_SECRET=whsec_... # Managed provider keys (server-owned; only handed to entitled paid users) MANAGED_GEMINI_API_KEY= MANAGED_UPLOAD_POST_API_KEY= OPENSHORTS_LOGO_URL=https://openshorts.app/logo.png # Residential proxy for YouTube downloads (avoids datacenter-IP bans on the # hosted server). Recommended: DataImpulse (~$1/GB PAYG). Downloads are capped # to 720p when this is set, to control bandwidth cost. Empty = direct download. PROXY_URL= # Cloudflare R2 (S3-compatible) — durable storage for users' generated videos. # Create an R2 bucket + an "Object Read & Write" API token scoped to it. R2_ENDPOINT=https://.r2.cloudflarestorage.com R2_BUCKET=openshorts-videos R2_ACCESS_KEY_ID= R2_SECRET_ACCESS_KEY= # PO-token provider for 720p/1080p YouTube downloads. # The bgutil provider is baked into the backend image in *script mode* # (BGUTIL_SCRIPT_PATH is set inside the Dockerfile) — no sidecar, nothing to set here. # Only if you run bgutil as an external HTTP service, point at it instead: # BGUTIL_BASE_URL=http://bgutil:4416