Troubleshooting
Common issues and their solutions. If your problem is not listed here, [open an issue](https://github.com/mahimailabs/voicegateway/issues) or check the [FAQ](/reference/faq).
Troubleshooting
Common issues and their solutions. If your problem is not listed here, open an issue or check the FAQ.
"No voicegw.yaml found"
Error: ConfigError: No voicegw.yaml found
Cause: VoiceGateway cannot find a configuration file.
Fix: VoiceGateway searches for config in this order:
./voicegw.yaml(current working directory)~/.config/voicegateway/voicegw.yaml/etc/voicegateway/voicegw.yaml
Generate a starter config:
voicegw initOr set an explicit path:
export VOICEGW_CONFIG=/path/to/voicegw.yaml
voicegw serve"Provider not configured"
Error: ValueError: Unknown provider 'xyz'. Available: anthropic, assemblyai, cartesia, deepgram, elevenlabs, groq, kokoro, ollama, openai, piper, whisper
Cause: The provider name in your model ID does not match any registered provider, or the provider is not listed in your voicegw.yaml.
Fix:
- Check spelling. Provider names are lowercase:
openai,deepgram,anthropic, etc. - Ensure the provider is in your config file:
voicegw.yaml providers: openai: api_key: ${OPENAI_API_KEY} - If using a new provider, install the extra:
pip install voicegateway[openai]
"Budget exceeded"
Error: BudgetExceededError: Project 'my-app' has exceeded its daily budget of $10.00
Cause: The project's daily spending has hit the configured daily_budget and budget_action is set to block.
Fix:
- Increase the budget in
voicegw.yaml:voicegw.yaml projects: my-app: daily_budget: 50.00 - Switch to warn mode to log warnings instead of blocking:
voicegw.yaml projects: my-app: budget_action: warn - Check the dashboard at
http://localhost:8080(the daemon's serve port) to see where costs are accumulating - Budgets reset daily at midnight UTC
"Connection refused localhost:11434"
Error: ConnectionRefusedError: [Errno 111] Connection refused when using Ollama
Cause: Ollama is not running or is listening on a different address.
Fix:
- Start Ollama:
Shell ollama serve - Verify it is running:
Shell curl http://localhost:11434/api/tags - If Ollama is on a different host or port, update your config:
voicegw.yaml providers: ollama: base_url: http://your-host:11434 - If using Docker Compose with the
localprofile: The Ollama container needs time to download models on first start.Shell docker compose --profile local up -d
"Failed to decrypt" / Cryptography errors
Error: cryptography.fernet.InvalidToken or Failed to decrypt API key
Cause: The encryption key has changed or the stored encrypted value is corrupted.
Fix:
- VoiceGateway uses the
cryptographypackage for key encryption. If you rotated or lost the encryption key, re-set your API keys invoicegw.yamlusing plain${ENV_VAR}references - Ensure
cryptography>=43.0is installed:Shell pip install --upgrade cryptography - If using encrypted storage, check that the
VOICEGW_SECRETenvironment variable is set to the same value used when keys were stored. (Seesrc/voicegateway/core/crypto.pyfor the canonical secret-resolution order: env var, then~/.config/voicegateway/.secret, then auto-generated.)
Docker dashboard crashes on startup
Error: Dashboard container exits immediately or returns 502.
Cause: Usually a port conflict, missing config mount, or the frontend build is missing.
Fix:
- Check logs:
Shell docker compose logs dashboard - Ensure the config file is mounted in your
docker-compose.yml: Then restart:docker-compose.yml services: voicegateway: volumes: - ./voicegw.yaml:/app/voicegw.yaml:roShell docker compose up -d - Check port availability (default: 8080, the daemon's serve port):
Shell lsof -i :8080 - Rebuild the frontend if running from source:
Shell cd src/dashboard/frontend && npm run build - Ensure all dashboard dependencies are installed:
Shell pip install voicegateway[dashboard]
"MCP tool not found"
Error: Coding agent reports the tool is not available or returns an empty tool list.
Cause: The MCP server is not running, the transport configuration is wrong, or the agent is not connected.
Fix:
- Verify the MCP server is running:
Shell voicegw mcp --transport stdio - For HTTP/SSE transport, check the endpoint:
Shell curl http://localhost:8090/sse - Check your agent's MCP configuration. For Claude Code, add to
~/.claude/config.json:JSON { "mcpServers": { "voicegateway": { "command": "voicegw", "args": ["mcp", "--transport", "stdio"] } } } - If using HTTP transport with auth, ensure
VOICEGW_MCP_TOKENmatches between server and client - Restart the MCP server and the coding agent
asyncio event loop errors
Error: RuntimeError: There is no current event loop in thread 'MainThread' or RuntimeError: This event loop is already running
Cause: Mixing synchronous and asynchronous code, or running in an environment that manages its own event loop (Jupyter, some web frameworks).
Fix:
- The
voicegateway.inference.STT/LLM/TTSfactories are synchronous and handle event loop bridging internally on first construction (loading the merged config). This usually works fine inside a running event loop (Jupyter, FastAPI handlers, etc.): If you see "already running event loop" errors during the first factory call (rare), isolate the setup in a separate thread or applyagent.py from voicegateway import inference stt = inference.STT("deepgram/nova-3")nest_asyncio(see below). - If running in a script (not an async framework), use
asyncio.run():Python import asyncio asyncio.run(main()) - In Jupyter notebooks, use
nest_asyncio:Python import nest_asyncio nest_asyncio.apply() - If running tests, ensure
asyncio_mode = "auto"is set inpyproject.toml
"livekit plugin missing" / ModuleNotFoundError
Error: ModuleNotFoundError: No module named 'livekit.plugins.deepgram'
Cause: The provider's LiveKit plugin SDK is not installed.
Fix:
Install the specific provider extra:
pip install voicegateway[deepgram]Or install all cloud providers:
pip install voicegateway[cloud]Available extras: openai, deepgram, anthropic, groq, cartesia, elevenlabs, assemblyai, whisper, kokoro, piper.
Check what is installed:
pip list | grep livekit"Configuration validation failed"
Error: ConfigError: Configuration validation failed: ...
Cause: The voicegw.yaml file has structural errors, missing required fields, or invalid values.
Fix:
- Check YAML syntax: use a YAML linter or
python -c "import yaml; yaml.safe_load(open('voicegw.yaml'))" - Required sections:
providers,models(withstt,llm,ttssub-keys) - Environment variable references: ensure
${VAR_NAME}variables are actually set:Shell echo $OPENAI_API_KEY # Should not be empty - Compare against the example config:
Shell voicegw init --diff - Common mistakes:
- Using tabs instead of spaces (YAML requires spaces)
- Missing colon after a key
- Incorrect indentation level
- Referencing a provider in
modelsthat is not defined inproviders
Rate limiting errors
Error: RateLimitError: Provider 'openai' rate limit exceeded or HTTP 429 from the provider.
Cause: Too many requests to a provider in a short time.
Fix:
- Configure rate limits in
voicegw.yamlto stay under provider quotas:YAML rate_limiting: openai: requests_per_minute: 60 - Add fallback providers so requests can be routed elsewhere:
voicegw.yaml fallbacks: llm: - anthropic/claude-3.5-sonnet - groq/llama-3.1-70b-versatile - Check your provider dashboard for current usage and limits
Database locked errors
Error: sqlite3.OperationalError: database is locked
Cause: Multiple processes writing to the same SQLite database file.
Fix:
- Ensure only one VoiceGateway server instance writes to the database
- If running multiple instances, give each its own
db_path:voicegw.yaml cost_tracking: db_path: /data/voicegw-instance-1.db - Or use the
VOICEGW_DB_PATHenvironment variable:Shell VOICEGW_DB_PATH=/data/voicegw-1.db voicegw serve --port 8080 - The dashboard reads the database (read-only) and should not cause locks
Related pages
Reconcile File Formats
Schemas the voicegw reconcile command expects when reading provider usage exports.
Replay storage costs
VoiceGateway's conversation replay captures every STT chunk, LLM token, TTS frame, and conversation-state snapshot for every session. This page surfaces the on-disk storage cost so the trade-off betwe