Self-host Kokoro TTS with Levelrail
A CPU text-to-speech server with an OpenAI-compatible /v1/audio/speech API, built on the Kokoro model. Apache-2.0 licensed. The image is about 3 GB and there is no login, so keep it on a private network or behind an auth proxy.
- Authorremsky
- LicenceApache-2.0
- Memory1.5 GiB
- Archarm64
- Services1
How to self-host Kokoro TTS
-
Pull the images
One image is pulled on your server.
Show images
ghcr.io/remsky/kokoro-fastapi-cpu:v0.9.2
-
Create the app
One service starts in a single Compose app, on port 8880.
-
Fill in the secrets
1 setting is preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
Kokoro TTS requirements
- Memory
- About 1.5 GiB
- Architectures
- amd64 image published, arm64 image published
- Ports
- 8880
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- Apache-2.0, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Kokoro TTS. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the Kokoro TTS docs page.
Deploy Kokoro TTS your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy Kokoro TTS from the CLI
levelrail-cli templates install kokoro-fastapi --name my-kokoro-fastapi Deploy Kokoro TTS with the API
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
https://levelrail.example.com/api/v1/service-templates/kokoro-fastapi/install \
-d '{
"name": "my-kokoro-fastapi"
}' Kokoro TTS configuration
Kokoro TTS services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| kokoro | ghcr.io/remsky/kokoro-fastapi-cpu:v0.9.2 | 8880 | none |
Kokoro TTS environment variables
| Variable | Service | Value |
|---|---|---|
| TZ | kokoro | Preset by the template |
Ports and volumes
- Ports
- 8880
- Volumes
- none
Kokoro TTS FAQ
How much memory does Kokoro TTS need?
The catalog lists about 1.5 GiB of memory for Kokoro TTS.
Does Kokoro TTS run on arm64?
For Kokoro TTS, an arm64 image is published; amd64 is image published.
What licence is Kokoro TTS under?
Kokoro TTS is licensed under Apache-2.0, which is permissive, with few conditions on reuse.
Does Kokoro TTS need configuration before it starts?
No. The template fills in its own defaults.
Which ports does Kokoro TTS use?
Kokoro TTS listens on port 8880 inside the stack.
Can I deploy Kokoro TTS on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Kokoro TTS, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image ghcr.io/remsky/kokoro-fastapi-cpu:v0.9.2 is what you deploy there.