Skip to content

Configuration

There is no environment file. Every application setting has a default that is written for the compose layout, so the stack starts with no configuration at all. The compose file names only what a container cannot work out for itself: the credentials the database and the object store share with the app, the layout of the services, and a few per-service overrides.

Add it to the x-oc-env block near the top of docker-compose.yml. The api and both kinds of worker share that block, so a setting added there reaches all of them:

x-oc-env: &oc-env
POSTGRES_USER: ${POSTGRES_USER:-opencaptions}
# … the lines that are already there …
REGISTRATION_ENABLED: "false"

A setting is a name in capitals, the same as the lower-case name in config.py and in the tables below. Values that are not text go in quotes ("false", "4"). Then apply it with docker compose up -d.

Keeping a setting in the compose file, rather than in a hidden file, keeps it visible in a diff and impossible for a forgotten file to override. Do not add a separate environment: block to the api service: it would replace the shared one instead of adding to it.

Two settings are not application settings. They choose which services run, so they are given on the command line: COMPOSE_PROFILES=gpu and OC_CPU_TRANSCRIBERS. See GPU acceleration and Scaling.

SettingDefault
REGISTRATION_ENABLEDtrueWhether anyone can create an account. Turn it off once yours exist.
HOSTED_MODEfalsetrue when you run it for other people: the API then withholds host details (health, models, device) and refuses a per-job choice of provider or model.
SESSION_COOKIE_SECUREfalseSet true behind HTTPS.
PUBLIC_BASE_URLemptyThe address people use. Password-reset links are built from it.
CORS_ORIGINShttp://localhost:5173Where the page is served from, if not that address.
AUTH_THROTTLE_MAX_ATTEMPTS5Sign-in attempts per account within AUTH_THROTTLE_WINDOW_S (15 minutes).
AUTH_IP_THROTTLE_MAX_ATTEMPTS50Attempts per source address within AUTH_IP_THROTTLE_WINDOW_S (5 minutes). Loose on purpose, so an office behind one address is never locked out.

Password reset by email turns on when a host is set. See Accounts.

SettingDefault
SMTP_HOSTemptyThe mail server. Empty means no reset by email.
SMTP_PORT587
SMTP_USERNAME, SMTP_PASSWORDempty
SMTP_FROMthe usernameThe sender address.
SMTP_USE_TLStrue
SettingDefault
TRANSCRIPTION_PROVIDERlocallocal, openai or opencaptions. The default selected in the app.
WHISPER_MODELlarge-v3-turboThe default Whisper model.
WHISPER_DEVICEautoauto, cpu, cuda or cuda:0.
WHISPER_COMPUTE_TYPEint8
ASR_THREADS0Threads for the models that are not Whisper. 0 uses every core available.
OPENAI_API_KEYemptyNeeded for the openai provider.
TRANSCRIPTION_REMOTE_URL, TRANSCRIPTION_REMOTE_KEYemptyAnother OpenCaptions server and an API key from it, for the opencaptions provider.
INSTANCE_NAMEOpenCaptionsThe name this server gives other apps that connect to it.
TRANSCRIPTION_RESULT_TTL_H24Hours a finished transcript is kept for a client to fetch.
TRANSCRIPTION_MAX_CONCURRENT2Transcription jobs one user may have running at once through the transcription API.

The WHISPER_* tuning settings (voice filter, hallucination guard, second look) are explained in Speech models and providers.

SettingDefault
MAX_UPLOAD_SIZE_MB2048The largest video accepted. The web container’s nginx also caps uploads at 2 GB: to go higher, build the web image from source with a larger client_max_body_size in apps/web/nginx.conf.
MAX_VIDEO_DURATION_S3600The longest video accepted, in seconds.
SSRF_ALLOWED_HOSTSemptyHosts the server may fetch from even though they resolve to private addresses. See Security.

The defaults match the compose file’s own services (postgres, redis, garage, engine), so you normally leave these alone. To use an S3 store you already have, set the S3 endpoint and credentials (an empty endpoint means AWS S3), and to use an external database or Redis, set POSTGRES_HOST, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB and REDIS_URL.

SettingDefault
POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DBopencaptionsThe database credentials. See Security.
ENGINE_TOKENa development tokenWhat the render server requires of the API. Change it on any exposed host.
LOG_LEVELINFO

The single source of truth for every setting and its default is apps/api/app/core/config.py. A check in the repository keeps the compose file’s copies of shared values equal to each other and to that file.