System setup
This page runs SERMAS on one machine from the released container images. To work on SERMAS itself, see Developing SERMAS at the end.
What you need
- Linux (Ubuntu or Debian; WSL has been reported to work)
- Docker with the compose plugin
- The docker bridge at
172.17.0.1(the default): the services reach each other through the docker host - An OpenAI-compatible LLM endpoint and key: OpenAI itself, or your own gateway or model server (LiteLLM, vLLM, Ollama...). See LLMs.
- For voice, speech-to-text and text-to-speech: an NVIDIA GPU runs both locally (Whisper and Kokoro); otherwise Google or Azure credentials. See STT and TTS. Text chat works without them.
Get the deployment files
git clone https://github.com/sermas-eu/sermas-toolkit-api
cd sermas-toolkit-api
cp config/api/.env.example config/api/.env
cp config/kiosk/.env.example config/kiosk/.env
Configure the LLM
In config/api/.env set the endpoint, the key and the model:
# empty means api.openai.com
OPENAI_BASEURL=
OPENAI_API_KEY=...
OPENAI_MODEL=gpt-4o
Embeddings (for the knowledge base) use the same endpoint unless
OPENAI_EMBEDDINGS_BASEURL and OPENAI_EMBEDDINGS_MODEL say otherwise. Every option is
listed in API variables.
Change AUTH_KEYCLOAK_KIOSK_CLIENT_SECRET in config/api/.env and
PRIVATE_AUTH_CLIENT_SECRET in config/kiosk/.env to the same new value.
Local speech (optional, NVIDIA GPU)
Add COMPOSE_PROFILES=speech to a .env file next to docker-compose.yaml, and
uncomment the speech block in config/api/.env:
STT_SERVICE=whisper
WHISPER_URL=http://172.17.0.1:9100
TTS_SERVICE=openai
TTS_OPENAI_BASEURL=http://172.17.0.1:8880/v1
TTS_OPENAI_MODEL=kokoro
TTS_OPENAI_VOICE=af_heart
The first start downloads the speech models.
Start
docker compose up -d
The first start pulls the images and lets the API create its Keycloak realm; it takes a few minutes. Then open:
- the kiosk: http://localhost:8080
- the API documentation: http://localhost:8080/api/swagger
Use localhost, not the machine's address: the browser allows the microphone and the
camera only on a secure origin, and http://localhost is one. To serve other machines,
see Deployment.
Users
An administrator (role platform-admin) is created at start from ADMIN_USER and
ADMIN_PASSWORD (admin / admin by default; change them). More users are created at
start from config/api/users.json. Keycloak's own administrator is
ADMIN_SERVICE_ACCOUNT_USERNAME / ADMIN_SERVICE_ACCOUNT_PASSWORD, which must match
the Keycloak container's bootstrap admin.
Every logged-in user can create applications and manages the ones they own. Next: create an application.
Developing SERMAS
sermas-dev is the development workspace: it
holds every component as a git submodule, builds the images from source, and runs the
API and the kiosk from source with hot reload (task dev:start). It also carries the
end-to-end tests and a demo application (task dev:demo). Its README describes the
setup.