Skip to main content
Unmute uses environment variables to configure service URLs, API keys, and other settings. This reference documents all available environment variables.

Core Service URLs

These variables configure connections between Unmute services.
string
default:"ws://localhost:8090"
WebSocket URL for the speech-to-text service.Supports both ws:// and http:// protocols (automatically converted to WebSocket).Docker Compose default: ws://stt:8080
string
default:"ws://localhost:8089"
WebSocket URL for the text-to-speech service.Supports both ws:// and http:// protocols (automatically converted to WebSocket).Docker Compose default: ws://tts:8080
string
default:"http://localhost:8091"
HTTP URL for the LLM service (OpenAI-compatible API).Docker Compose default: http://llm:8000
string
default:"null"
Override the LLM model name.If not set, the backend uses the default model from the LLM server. Required when using external LLM providers.Example with Ollama:
Example with OpenAI:
string
default:"null"
API key for authenticating with the LLM service.Not required for the default vLLM setup, but necessary for external providers like OpenAI, Anthropic, or Mistral.Example:
string
default:"http://localhost:8092"
HTTP URL for the optional voice cloning service.Voice cloning allows users to upload custom voice samples. This service is optional.
string
default:"null"
Redis connection URL for distributed caching.If not set, an in-memory dictionary cache is used instead. Redis is recommended for production deployments with multiple backend instances.Example:

External API Keys

string
required
Hugging Face access token for downloading gated models.Required for:
  • LLM models (Mistral, Llama, Gemma)
  • Speech-to-text models
  • Text-to-speech models
Format: Starts with hf_Set in your shell before running Docker Compose:
See the Hugging Face Setup guide for details.
string
default:"null"
API key for NewsAPI.org.Used by the “Dev (news)” character voice to fetch recent news articles from The Verge. Optional feature.Example:
string
default:"null"
Cloudflare Calls API key ID for TURN server configuration.Used with TURN_KEY_API_TOKEN to generate ICE servers for WebRTC connections. Optional for most deployments.
string
default:"null"
Cloudflare Calls API token for TURN server configuration.Works with TURN_KEY_ID. See Cloudflare Calls documentation for setup.

File Storage

path
default:"voices/donation"
Directory for storing voice donation submissions.Relative to the repository root. Used by the voice donation feature.Default: {repo_root}/voices/donation
path
default:"null"
Directory for saving conversation recordings.If not set, recordings are disabled. When enabled, each conversation is saved with audio and event data for debugging.Example:

Development Variables

string
default:"null"
API key for Freesound.org.Only needed if you’re downloading new voice samples from Freesound for character voices. Not required for running Unmute.
string
default:"null"
OpenAI API key.Only used in example scripts (example_websocket_client.py). Not required for running Unmute.

Configuration Examples

Default Docker Compose Setup

Using External OpenAI API

Replace the local vLLM service with OpenAI:

Using Ollama Locally

Connect to Ollama running on your host machine:

Production Setup with Redis

Dockerless Environment

For dockerless deployment, set these in your shell:

Validation

To verify your environment variables are set correctly:
1

Check Required Variables

Should output your token starting with hf_.
2

Test Service Health

After starting Unmute, check the health endpoint:
Expected response:
3

Check Docker Environment

View environment variables in a running container:

Security Best Practices

Never commit API keys or tokens to version control. Always use environment variables.
  • Store sensitive variables in .env files (add to .gitignore)
  • Use separate tokens for development and production
  • Rotate API keys periodically
  • Use read-only Hugging Face tokens for production
  • Consider using secret management tools (AWS Secrets Manager, HashiCorp Vault) for production deployments