Skip to content

Configuration Reference

OpenCodeHub is configured exclusively via environment variables.

VariableDescriptionRequiredDefault
SITE_URLPublic URL of the instanceYeshttp://localhost:3000
PORTPort to listen onNo3000
NODE_ENVdevelopment or productionNodevelopment
VariableDescriptionGenerate With
JWT_SECRETSigns auth tokensopenssl rand -hex 32
SESSION_SECRETSigns session cookiesopenssl rand -hex 32
INTERNAL_HOOK_SECRETSecures git hooksopenssl rand -hex 32
VariableDescriptionExample
DATABASE_DRIVERpostgres, mysql, sqlite, libsqlpostgres
DATABASE_URLConnection stringpostgresql://user:pass@host:5432/db
DATABASE_AUTH_TOKENAuth token (Turso/LibSQL only)
VariableDescriptionDefault
STORAGE_TYPElocal, s3, gdrive, azurelocal
STORAGE_PATHPath for local storage./data
STORAGE_BUCKETBucket name (S3/GCP)
STORAGE_REGIONAWS Regionus-east-1
STORAGE_ENDPOINTCustom S3 endpoint
S3_ACCESS_KEYAWS Access Key
S3_SECRET_KEYAWS Secret Key
VariableDescription
AI_PROVIDERopenai or anthropic
OPENAI_API_KEYOpenAI API Key
ANTHROPIC_API_KEYAnthropic API Key
VariableDescription
SMTP_HOSTHostname (e.g. smtp.gmail.com)
SMTP_PORTPort (e.g. 587)
SMTP_USERUsername
SMTP_PASSWORDPassword
SMTP_FROMFrom address