Skip to main content

Parameter Reference

Quick reference for all available server configuration parameters:
ParameterDescription
MODEExecution mode
PORTAPI server port
BETTER_AUTH_SECRETAuthentication secret key
BETTER_AUTH_URLBase URL for authentication
PUBLIC_RATE_LIMIT_MAXMaximum requests per window
PUBLIC_RATE_LIMIT_WINDOW_MSRate limit time window

Server Configuration

MODE
string
default:"fullstack"
Set the execution mode for Openinary.Available modes:
  • fullstack - Full application with web interface (default)
  • api - API-only mode that automatically generates an API key on first startup
In API mode, the system generates an API key on first startup and displays it in the console. Save this key as it’s shown only once.
PORT
integer
default:"3000"
Set the port number on which the API server listens.Examples:
  • 3000 - Default development port
  • 8080 - Alternative port
  • 80 - Standard HTTP port (requires root privileges)

Authentication

BETTER_AUTH_SECRET
string
Secret key for Better Auth authentication system.Requirements:
  • Minimum 32 characters recommended
  • Should be cryptographically random
  • Auto-generated in Docker if not defined
Examples:
  • your-custom-secret-key-here-minimum-32-chars
  • Generate with: openssl rand -base64 32
In production, always set this manually. Auto-generated secrets in Docker should be replaced with a secure, persistent value.
BETTER_AUTH_URL
string
default:"http://localhost:3000"
Base URL of the Openinary instance used for authentication and CORS configuration.Examples:
  • http://localhost:3000 - Local development
  • https://api.example.com - Production API
  • https://openinary.example.com - Custom domain

Public Routes Rate Limiting

PUBLIC_RATE_LIMIT_MAX
integer
default:"100"
Maximum number of requests allowed per time window for public routes.Examples:
  • 100 - Default limit (100 requests per window)
  • 200 - Higher limit for high-traffic scenarios
  • 50 - Lower limit for stricter control
This applies to public routes like /t/* (transformations) and health endpoints.
PUBLIC_RATE_LIMIT_WINDOW_MS
integer
default:"60000"
Time window in milliseconds for rate limiting.Examples:
  • 60000 - 1 minute (default)
  • 300000 - 5 minutes
  • 1000 - 1 second (very strict)
Common configurations:
  • 60000 (1 min) - Standard rate limiting
  • 3600000 (1 hour) - Hourly limits