Configuration
Overview
This guide covers advanced configuration options for customizing your Docker deployment. Learn how to optimize resources, configure external services, and tune performance.
Environment Variables
All configuration is managed through environment variables in the .env file.
Core Configuration
Your Smallest.ai license key for validation and usage reporting
Download URL for the Lightning ASR model (provided by Smallest.ai)
API Server Configuration
Port for the API server to listen on
Internal URL for license proxy communication
Internal URL for Lightning ASR communication
Lightning ASR Configuration
Port for Lightning ASR to listen on
Redis connection URL for caching and state management
For external Redis:
With password:
GPU device ID to use (for multi-GPU systems)
Resource Configuration
GPU Allocation
For systems with multiple GPUs, you can specify which GPU to use:
For multiple GPUs per container:
Memory Limits
Set memory limits for containers:
CPU Allocation
Reserve CPU cores for each service:
Redis Configuration
Using External Redis
To use an external Redis instance instead of the embedded one:
Redis Persistence
Enable data persistence for Redis:
Redis with Authentication
Add password protection:
Update .env:
Scaling Configuration
Multiple ASR Workers
Run multiple Lightning ASR containers for higher throughput:
This configuration requires multiple GPUs in your system and will distribute load across workers.
Network Configuration
Custom Network Settings
Configure custom network with specific subnet:
Expose on Specific Interface
Bind to specific host IP:
Use Host Network
For maximum performance (loses network isolation):
Host network mode bypasses Docker networking and directly uses host network stack. Use only if necessary.
Logging Configuration
Custom Log Drivers
Use JSON file logging with rotation:
Syslog Integration
Send logs to syslog:
Centralized Logging
Forward logs to external logging service:
Volume Configuration
Persistent Model Storage
Avoid re-downloading models on container restart:
Custom Model Location
Use a specific host directory:
Health Checks
Custom Health Check Intervals
Adjust health check timing:
API Server Health Check
Add health check for API server:
Security Configuration
Run as Non-Root User
Add user specification:
Read-Only Filesystem
Increase security with read-only root filesystem:
Resource Limits
Prevent resource exhaustion:
Example: Production Configuration
Here’s a complete production-ready configuration:

