openreader/docs-site/docs/configure/tts-provider-guides/kokoro-fastapi.md
Richard R dae97b2afc docs(admin,config,tts): document admin panel for runtime TTS provider and feature config
Add a dedicated Admin Panel documentation page detailing management of shared TTS providers and site features via the admin UI. Update all TTS provider guides, environment variable references, and deployment docs to clarify the new runtime configuration model: environment variables serve as first-boot seeds only, with ongoing management handled through the admin interface. Revise sidebars and cross-links to include the new admin panel docs and clarify the distinction between legacy env-based and admin-managed configuration.
2026-05-12 22:39:37 -06:00

2 KiB

title
Kokoro-FastAPI

Run Kokoro-FastAPI locally and connect it to OpenReader using the Custom OpenAI-Like provider.

:::warning For Kokoro issues and support, use the upstream repository: remsky/Kokoro-FastAPI. :::

Run Kokoro

CPU:

docker run --name kokoro-tts \
  --restart unless-stopped \
  -d \
  -p 8880:8880 \
  -e ONNX_NUM_THREADS=8 \
  -e ONNX_INTER_OP_THREADS=4 \
  -e ONNX_EXECUTION_MODE=parallel \
  -e ONNX_OPTIMIZATION_LEVEL=all \
  -e ONNX_MEMORY_PATTERN=true \
  -e ONNX_ARENA_EXTEND_STRATEGY=kNextPowerOfTwo \
  -e API_LOG_LEVEL=DEBUG \
  ghcr.io/remsky/kokoro-fastapi-cpu:v0.2.4

GPU (NVIDIA):

docker run --name kokoro-tts \
  --restart unless-stopped \
  -d \
  --gpus all \
  --user 1001:1001 \
  -p 8880:8880 \
  -e USE_GPU=true \
  -e PYTHONUNBUFFERED=1 \
  -e API_LOG_LEVEL=DEBUG \
  ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.4

Connect to OpenReader

Recommended (auth + admin): Settings → Admin → Shared providers

  1. Add a shared provider with type custom-openai.
  2. Set base URL to your Kokoro endpoint (e.g. http://kokoro-tts:8880/v1).
  3. Leave API key blank unless required by your deployment.
  4. Set default model to Kokoro.

Legacy bootstrap seed (optional, first boot only):

API_BASE=http://kokoro-tts:8880/v1

Use kokoro-tts if that's the container name, or host.docker.internal if not.

Or in-app via Settings → TTS Provider:

  1. Set provider to Custom OpenAI-Like.
  2. Set API_BASE to your Kokoro endpoint (e.g. http://kokoro-tts:8880/v1).
  3. Leave API_KEY blank unless your deployment requires one.
  4. Choose model Kokoro.

See TTS Providers for admin-shared vs per-user behavior.

References