Skip to main content

Overview

This guide covers advanced configuration options for customizing your TTS 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

string
required
Your Smallest.ai license key for validation and usage reporting

API Server Configuration

integer
default:"7100"
Port for the API server to listen on
string
default:"http://license-proxy:3369"
Internal URL for license proxy communication
string
default:"http://lightning-tts:8876"
Internal URL for Lightning TTS communication

Lightning TTS Configuration

integer
default:"8876"
Port for Lightning TTS to listen on
string
default:"redis://redis:6379"
Redis connection URL for caching and state managementFor external Redis:
With password:
string
default:"0"
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:
docker-compose.yml
For multiple GPUs per container:
docker-compose.yml

Memory Limits

Set memory limits to prevent resource exhaustion:
docker-compose.yml

CPU Limits

Control CPU allocation:
docker-compose.yml

External Services

External Redis

Use an external Redis instance instead of the embedded one:
docker-compose.yml
Remove the Redis service from docker-compose.yml.

Custom Network

Use a custom Docker network:
docker-compose.yml

Performance Tuning

Voice Configuration

Configure voice parameters:
docker-compose.yml

Batch Processing

Optimize for batch processing:
docker-compose.yml

Model Precision

Control model precision for performance:
docker-compose.yml
Options: fp32, fp16, int8

Volume Mounts

Persistent Model Cache

Cache models to avoid re-downloading:
docker-compose.yml

Log Persistence

Persist logs for debugging:
docker-compose.yml

Health Checks

Add health checks for better monitoring:
docker-compose.yml

Security Configuration

Read-Only Root Filesystem

Enhance security with read-only root filesystem:
docker-compose.yml

Non-Root User

Run containers as non-root:
docker-compose.yml

Environment File Example

Complete .env file example:
.env

What’s Next?

TTS Services Overview

Learn about each TTS service component

TTS Troubleshooting

Debug configuration issues