CoolFace
Apppublic

Leon4gr45/builder

sourceHugging Facemitupdated 2d agoView on Hugging Face
0likes
.env.example98 linesDownload Raw Back to root
1# OSW Studio Local Development Environment2# Copy this file to .env and update with your values3 4# ============================================================================5# Server Mode (SQLite + Publishing)6# ============================================================================7# Enable Server mode for SQLite persistence and static site publishing8NEXT_PUBLIC_SERVER_MODE=false9 10# Session secret (generate with: openssl rand -base64 32)11SESSION_SECRET=your_session_secret_here12 13# Admin password — BOOTSTRAP ONLY14# Used for initial setup when no user accounts exist.15# Once the first user account is created, this is ignored.16# For new installs, you can skip this — the first visitor to /admin17# will be prompted to create the admin account via the registration page.18ADMIN_PASSWORD=your_secure_password_here19 20# Secure cookies (default: true in production)21# Uncomment and set to "false" only when running without HTTPS (e.g., VPS before SSL)22# SECURE_COOKIES=false23 24# Analytics secret for token signing (generate with: openssl rand -base64 32)25# IMPORTANT: Use a strong random value in production to secure analytics tracking26ANALYTICS_SECRET=your_analytics_secret_here27 28# Secrets encryption key (generate with: openssl rand -base64 32)29# Must be a base64-encoded 32-byte key for AES-256 encryption30# Required to enable encrypted secrets storage for edge functions31SECRETS_ENCRYPTION_KEY=your_secrets_encryption_key_here32 33# ============================================================================34# Multitenancy & Workspaces35# ============================================================================36# Control whether public user registration is allowed (default: closed)37# Set to "open" to allow new users to self-register via /admin/register38# Note: registration is ALWAYS allowed when no users exist (initial setup)39# REGISTRATION_MODE=open40# NEXT_PUBLIC_REGISTRATION_MODE=open41 42# Machine-to-machine API key for automating admin operations (optional)43# When set, requests with header "x-instance-api-key: <key>" bypass session auth44# on admin endpoints. Generate with: openssl rand -base64 3245# INSTANCE_API_KEY=your_instance_api_key_here46 47# Unique identifier for this instance (shown in admin dashboard, optional)48# INSTANCE_ID=my-production-instance49 50# ============================================================================51# Usage52# ============================================================================53# Browser Mode (IndexedDB) — Default:54#   - Don't set NEXT_PUBLIC_SERVER_MODE or leave .env file absent55#   - Run: npm run dev56#   - Access at: http://localhost:300057#   - All data stored in the browser58#59# Server Mode (SQLite + Workspaces + Publishing):60#   1. Copy this file to .env61#   2. Set NEXT_PUBLIC_SERVER_MODE=true62#   3. Generate and set SESSION_SECRET, ANALYTICS_SECRET, SECRETS_ENCRYPTION_KEY63#   4. Run: npm run dev64#   5. Visit http://localhost:3000/admin — create admin account on first visit65#   6. Workspaces, projects, and deployments are stored in data/ directory66#   7. Published sites served at http://localhost:3000/deployments/{id}/67 68# ============================================================================69# Default Provider70# ============================================================================71# Override the default AI provider (default: openrouter)72# NEXT_PUBLIC_DEFAULT_PROVIDER=openrouter73 74# ============================================================================75# Telemetry (Anonymous Usage Analytics)76# ============================================================================77# Telemetry is enabled by default and can be toggled in Settings UI.78# Set to "false" to disable telemetry at the environment level.79# NEXT_PUBLIC_TELEMETRY_ENABLED=false80 81# Analytics endpoint and auth token (defaults to https://stats.oswstudio.com/collect)82# NEXT_PUBLIC_ANALYTICS_ENDPOINT=https://stats.oswstudio.com/collect83# NEXT_PUBLIC_ANALYTICS_TOKEN=your_analytics_token_here84 85# Enable debug logging of telemetry events in the browser console86# NEXT_PUBLIC_TELEMETRY_DEBUG=true87 88# Enable debug logging for server-side generation (SSE events, task lifecycle)89# SERVER_GEN_DEBUG=true90 91# ============================================================================92# Gateway integration (optional — for managed multi-instance deployments)93# ============================================================================94WEBHOOK_URL=                       # Webhook destination URL (e.g., https://oswstudio.com)95WEBHOOK_SECRET=                    # HMAC-SHA256 signing secret for webhooks96INSTANCE_ID=                       # Instance identifier sent in webhook headers97NEXT_PUBLIC_GATEWAY_URL=           # Gateway URL for auth redirect and "Switch workspace" link98