Skip to content

Configuration reference

Settings can be supplied via a .env file or the process environment.

VariableDefaultPurpose
DATABASE_URLsqlite:///./db/quoptuna_app.dbSQLModel application database URL; use postgresql+psycopg://... for Supabase
OPTUNA_DATABASE_URLemptyPostgreSQL/Supabase URL for Optuna studies; falls back to local SQLite when empty
OPTUNA_DB_SCHEMAoptunaPostgreSQL schema used for Optuna tables
UPLOAD_DIR./uploadsDirectory for uploaded datasets
MAX_UPLOAD_SIZE100 MBMaximum upload size
DEFAULT_N_TRIALS100Default number of Optuna trials
DEFAULT_TIMEOUT3600 sDefault run timeout
CORS_ORIGINSComma-separated list of allowed origins
APP_BASE_URLhttp://localhost:8000Base URL for generated links

Analysis images and uploaded datasets use local files by default. Set ARTIFACT_STORAGE=s3 to use AWS S3, Supabase Storage’s S3-compatible endpoint, MinIO, or another compatible provider.

VariableDefaultPurpose
ARTIFACT_STORAGElocallocal or s3
ARTIFACT_ROOTdb/analysisLocal artifact directory
S3_ENDPOINT_URLemptyS3-compatible endpoint; empty for AWS S3
S3_BUCKETemptyBucket name
S3_REGIONemptyProvider region
S3_ACCESS_KEY_IDemptyS3 access key; keep server-side only
S3_SECRET_ACCESS_KEYemptyS3 secret; keep server-side only
S3_PREFIXquoptunaObject-key prefix
S3_SIGNED_URL_TTL900Signed URL lifetime in seconds
DATABASE_URL=postgresql+psycopg://USER:PASSWORD@HOST:5432/postgres
OPTUNA_DATABASE_URL=postgresql+psycopg://USER:PASSWORD@HOST:5432/postgres
OPTUNA_DB_SCHEMA=optuna
ARTIFACT_STORAGE=s3
S3_ENDPOINT_URL=https://YOUR-S3-ENDPOINT
S3_BUCKET=YOUR-BUCKET
S3_REGION=YOUR-REGION
S3_ACCESS_KEY_ID=YOUR-ACCESS-KEY
S3_SECRET_ACCESS_KEY=YOUR-SECRET-KEY
S3_PREFIX=quoptuna

Never commit this file with real credentials. The backend uses these credentials; the browser should never receive them.

Set the API key for your chosen report provider. All default to empty.

VariableDefaultPurpose
OPENAI_API_KEYemptyOpenAI provider key
ANTHROPIC_API_KEYemptyAnthropic provider key
GOOGLE_API_KEYemptyGoogle provider key

Authentication is enforced only when all of these are set. When unset, /api/v1/* is open (good for local/dev). Sessions are stored in encrypted, httponly cookies.

VariablePurpose
AUTH0_DOMAINAuth0 tenant domain
AUTH0_CLIENT_IDAuth0 application client id
AUTH0_CLIENT_SECRETAuth0 application client secret
AUTH0_SECRET64-char hex session secret (openssl rand -hex 32)
VariableDefaultPurpose
QUOPTUNA_JAX_X64onSet 0 for float32 — roughly halves simulator memory/compute
QUOPTUNA_OVR_N_JOBSoffThread count for multiclass OvR sub-fits
QUOPTUNA_LOG_FILEdb/logs/quoptuna.logOverride the rotating log path