Open WebUI and Ollama
Ollama runs open models on your own hardware, and Open WebUI is the chat interface in front of it. Together they are the most deployed local LLM stack, and a good one to run through Kaio: the images move fast, the models are large, and the GPU is easy to lose in a typo.
1. Write the Compose file
Section titled “1. Write the Compose file”services: ollama: image: docker.io/ollama/ollama:${OLLAMA_TAG:-latest} restart: unless-stopped volumes: - ollama:/root/.ollama deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu]
open-webui: image: ghcr.io/open-webui/open-webui:${OPEN_WEBUI_TAG:-main} restart: unless-stopped environment: - OLLAMA_BASE_URL=http://ollama:11434 - WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY} ports: - "127.0.0.1:3080:8080" volumes: - open-webui:/app/backend/data depends_on: - ollama
volumes: ollama: open-webui:- Ollama is not published at all: Open WebUI reaches it on the stack’s
network as
http://ollama:11434, and nothing else on the host can. - The
deploy.resources.reservations.devicesblock hands the NVIDIA GPUs to Ollama. It needs the NVIDIA Container Toolkit on the host; without a GPU, delete the block and Ollama runs on the CPU. open-webuiholds the users, chats and settings,ollamathe models.
2. Write its variables
Section titled “2. Write its variables”OLLAMA_TAG=latestOPEN_WEBUI_TAG=mainWEBUI_SECRET_KEY=generate-with-openssl-rand-hex-32WEBUI_SECRET_KEY signs the sessions. Set it once and keep it: without a fixed
key, every recreated container logs everyone out, and an update recreates it.
Kaio flags it as a secret and keeps it in
every version, so a rollback does not log anyone out either.
3. Deploy it and pull a model
Section titled “3. Deploy it and pull a model”kaio-cli stack deploy llm ./compose.yml --env-file .envkaio-cli container lskaio-cli container shell <ollama-container>ollama pull llama3.2The UI answers on http://localhost:3080. The first account created there is
the administrator.
Check the GPU reached the container before blaming the model for being slow:
kaio-cli stack logs llm --tail 100Ollama logs the compute devices it found when it starts.
4. Keep up with the images
Section titled “4. Keep up with the images”main and latest are moving tags, and both projects release often:
kaio-cli stack check-update llm # compares digests, pulls nothingkaio-cli stack update llmkaio-cli stack scan llmcheck-update asks the registry whether the digest behind each tag moved,
without downloading the image: worth it here, where the images run to
gigabytes. To stop following them, pin both tags with stack env set and
stack apply, and a later stack rollback takes you back to the pinned pair.
Moving it
Section titled “Moving it”kaio-cli stack copy llm --to gpu-02 --with-volumes --dry-runThe plan lists each volume with its size before anything is sent. The
ollama volume holds every model pulled, often tens of gigabytes: copying only
open-webui and pulling the models again on the other side is often faster.
The destination needs its own GPU and toolkit; the copy carries the Compose
file that asks for them, not the hardware.
Kaio, built by Régis Gaidot