Skip to content

Environment Variables

All SessionFS server environment variables use the SFS_ prefix.

VariableDescriptionDefault
SFS_DATABASE_URLPostgreSQL connection URLsqlite+aiosqlite:///./sessionfs.db
SFS_DATABASE_ECHOLog all SQL queriesfalse
SFS_DATABASE_POOL_SIZEConnection pool size20
SFS_DATABASE_MAX_OVERFLOWExtra connections beyond pool_size40
SFS_DATABASE_POOL_TIMEOUTSeconds to wait for a connection60
SFS_DATABASE_POOL_RECYCLERecycle connections after N seconds1800

Note: Pool settings are ignored for SQLite. For asyncpg connections, use the postgresql+asyncpg:// driver prefix. If you pass postgresql://, SessionFS will auto-convert it. SSL parameters like ?sslmode=require are handled internally — asyncpg uses a proper SSL context instead of URL parameters.

VariableDescriptionDefault
SFS_EMAIL_PROVIDEREmail provider: resend, smtp, none, or autoauto
SFS_EMAIL_FROMFrom address for all emailsnoreply@sessionfs.dev
SFS_RESEND_API_KEYResend API key (when provider is resend or auto)
SFS_SMTP_HOSTSMTP server hostname
SFS_SMTP_PORTSMTP server port587
SFS_SMTP_USERNAMESMTP auth username
SFS_SMTP_PASSWORDSMTP auth password
SFS_SMTP_TLSUse STARTTLS (port 587)true
SFS_SMTP_SSLUse implicit SSL (port 465)false

Auto-detection: When SFS_EMAIL_PROVIDER=auto (default), SessionFS checks:

  1. If SFS_RESEND_API_KEY is set → uses Resend
  2. If SFS_SMTP_HOST is set → uses SMTP
  3. Otherwise → logs emails without sending (no crash)
VariableDescriptionDefault
SFS_VERIFICATION_SECRETSecret for email verification JWTs AND Fernet encryption of stored API keys/tokens. Rotating this invalidates all stored judge keys and GitLab tokens.dev-verification-secret
SFS_REQUIRE_EMAIL_VERIFICATIONRequire email verification on signuptrue
VariableDescriptionDefault
SFS_BLOB_STORE_TYPEStorage backend: local, s3, or gcslocal
SFS_BLOB_STORE_LOCAL_PATHPath for local blob storage./data/blobs
SFS_S3_BUCKETS3 bucket name (no slashes — use SFS_S3_PREFIX for key prefixes)
SFS_S3_REGIONAWS regionus-east-1
SFS_S3_PREFIXOptional key prefix for all S3 objects (e.g. sessionfs/)
SFS_S3_ENDPOINT_URLCustom S3 endpoint (for MinIO)
SFS_GCS_BUCKETGCS bucket name
VariableDescriptionDefault
SFS_HOSTListen address0.0.0.0
SFS_PORTListen port8000
SFS_LOG_LEVELLog level: DEBUG, INFO, WARNING, ERRORINFO
SFS_CORS_ORIGINSAllowed CORS origins (comma-separated)
SFS_RATE_LIMIT_PER_MINUTEAPI rate limit per API key per minute. Set to 0 to disable120
SFS_SMTP_VERIFY_SSLVerify SSL certificates for SMTP. Set to false for self-signed certstrue
SFS_JUDGE_BASE_URLCustom OpenAI-compatible endpoint for LLM Judge (LiteLLM, vLLM, Ollama, etc.)
SFS_DASHBOARD_DIRPath to dashboard static files./static
VariableDescriptionDefault
SFS_MAX_SYNC_BYTES_FREEMax sync payload for free tier52428800 (50 MB)
SFS_MAX_SYNC_BYTES_PAIDMax sync payload for paid tier314572800 (300 MB)
SFS_MAX_SYNC_MEMBER_BYTES_FREEPer-member archive cap for free / starter (returned as 413 SyncTooLargeError)10485760 (10 MB)
SFS_MAX_SYNC_MEMBER_BYTES_PAIDPer-member archive cap for pro / team / enterprise52428800 (50 MB)
SFS_RETENTION_DAYS_FREECloud retention for free tier14
VariableDescriptionDefault
SFS_GITHUB_APP_IDGitHub App ID
SFS_GITHUB_PRIVATE_KEYGitHub App private key (PEM contents)
SFS_GITHUB_WEBHOOK_SECRETWebhook HMAC-SHA256 secret
VariableDescriptionDefault
SFS_GITLAB_WEBHOOK_SECRETGitLab webhook token for MR events
VariableDescriptionDefault
SFS_STRIPE_SECRET_KEYStripe API secret key
SFS_STRIPE_WEBHOOK_SECRETStripe webhook signing secret
SFS_STRIPE_PRICE_STARTERStripe Price ID for Starter tier
SFS_STRIPE_PRICE_PROStripe Price ID for Pro tier
SFS_STRIPE_PRICE_TEAMStripe Price ID for Team tier
VariableDescriptionDefault
SFS_APP_URLDashboard URL for billing redirectshttps://app.sessionfs.dev
SFS_API_URLAPI URL for share links and internal referenceshttps://api.sessionfs.dev
VariableDescriptionDefault
SFS_DEFAULT_SYNC_MODEDefault autosync mode for new users: off, all, selectiveoff
SFS_DEFAULT_AUDIT_TRIGGERDefault auto-audit trigger for new users: manual, on_sync, on_prmanual
SFS_MAX_SYNC_BYTES_FREEStorage limit for free tier52428800 (50 MB)
SFS_MAX_SYNC_BYTES_PAIDStorage limit for paid tiers314572800 (300 MB)
SFS_RETENTION_DAYS_FREESession retention for free tier14