Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

Latest commit

 

History

History
102 lines (79 loc) · 3.22 KB

File metadata and controls

102 lines (79 loc) · 3.22 KB
title Server
description Configure server settings, authentication, and rate limiting

Parameter Reference

Quick reference for all available server configuration parameters:

Parameter Description
MODE Execution mode
PORT API server port
BETTER_AUTH_SECRET Authentication secret key
BETTER_AUTH_URL Base URL for authentication
PUBLIC_RATE_LIMIT_MAX Maximum requests per window
PUBLIC_RATE_LIMIT_WINDOW_MS Rate limit time window

Server Configuration

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.

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

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.

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

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.

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