Skip to main content

Parameters

ParameterDescription
MODEExecution mode
PORTAPI server port
BETTER_AUTH_SECRETAuthentication secret key
BETTER_AUTH_URLBase URL of the instance
CORS_ORIGINAllowed origin for external apps
API_SECRETSecret for signed URLs
DB_PATHCustom SQLite database path
PUBLIC_RATE_LIMIT_MAXMax requests per window
PUBLIC_RATE_LIMIT_WINDOW_MSRate limit window (ms)
MAX_FILE_SIZE_MBMaximum upload file size in MB

Parameter reference

MODE
string
default:"fullstack"
Execution mode.
ValueBehavior
fullstackAPI + web dashboard (default)
apiAPI only — auto-generates an API key on first startup, printed once to the container logs
PORT
integer
default:"3000"
Port the API server listens on.3000 (default) · 8080
BETTER_AUTH_SECRET
string
required
Secret used by Better Auth to sign sessions and tokens. Must be at least 32 characters.
openssl rand -base64 32
Set this explicitly in production. Never commit it to version control.
BETTER_AUTH_URL
string
default:"http://localhost:3000"
Public base URL of your Openinary instance. Used for auth callbacks and CORS.http://localhost:3000 · https://media.example.com
CORS_ORIGIN
string
Allowed origin when Openinary is called from a separate frontend. Only set this in production — by default localhost:3001 (Next.js dev) is allowed automatically.https://yourapp.com
Avoid *. Set the exact origin of your frontend.
API_SECRET
string
Secret used to sign and verify signed URLs. Required if you use the /authenticated/* route. Minimum 16 characters.
openssl rand -hex 32
Never expose this in client-side code.
DB_PATH
string
default:"/data/auth.db"
Custom path for the SQLite database. Only needed when mounting to a non-standard location./data/auth.db · /mnt/volume/openinary.db

Upload

MAX_FILE_SIZE_MB
integer
default:"50"
Maximum allowed file size for uploads, in megabytes.50 (default) · 500 · 2048
Useful for self-hosted setups where users need to upload large video files. Set it in your .env file or Docker environment — no image rebuild required.

Rate limiting

Rate limiting applies to all public routes (/t/*, /download/*, /health, etc.).
PUBLIC_RATE_LIMIT_MAX
integer
default:"100"
Maximum requests per window.100 (default) · 200 (high traffic) · 50 (strict)
PUBLIC_RATE_LIMIT_WINDOW_MS
integer
default:"60000"
Window duration in milliseconds.
ValueDuration
600001 minute (default)
3000005 minutes
36000001 hour

Storage

Connect S3-compatible cloud storage.

Signed URLs

Use API_SECRET to sign transformation URLs.