Objective
What you're building
A real chat UI at localhost:3000, talking to your Ollama models over Docker's internal network — no more curl commands, an actual interface you'd hand to someone non-technical.
The docker-compose.yml that survives the whole course
services:
open-webui:
image: ghcr.io/open-webui/open-webui:main
ports:
- "3000:8080"
environment:
- OLLAMA_BASE_URL=http://host.docker.internal:11434
volumes:
- open-webui-data:/app/backend/data
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
volumes:
open-webui-data:
host.docker.internal matters here: Open WebUI runs inside a Docker container, but Ollama (from Lesson 2) runs directly on your machine, not in a container -- containers can't reach localhost on the host by default, host.docker.internal is Docker's mechanism for a container to reach services running on the host machine. The extra_hosts line makes this resolve correctly on Linux too (Mac/Windows Docker Desktop handles it automatically, Linux needs the explicit mapping).
This is the file every remaining lesson in this course adds to, never replaces
Lesson 4 adds a Qdrant service to this same file. Lesson 6 finalizes it. Treat docker-compose.yml as the accumulating deliverable of the whole course, not a per-lesson throwaway -- if you find yourself creating a second compose file for Qdrant, stop and add it as a new services: entry in this one instead.
Connect and verify all 3 models
Open localhost:3000, create a local admin account (stored only in the open-webui-data volume, never leaves your machine), and confirm all 3 models from Lesson 2 appear in the model selector. Test each with a different prompt — this isn't redundant with Lesson 2's CLI/API tests, it verifies the UI's connection to Ollama specifically, which is a separate thing that can break even when Ollama itself works fine.
You launch Open WebUI, but the model dropdown is empty even though ollama list on your host machine shows all 3 models installed and ollama run qwen3:8b works fine from your terminal. What's the most likely cause?
Ollama itself is fine (proven by the working CLI test) -- the empty dropdown means Open WebUI's container can't reach it, which is almost always the container-to-host networking configuration (OLLAMA_BASE_URL + host.docker.internal + the extra_hosts mapping on Linux) rather than anything wrong with Ollama or the models themselves. This is the Docker equivalent of Lesson 1 (Course 04)'s message-passing confusion -- two separate contexts that need an explicit bridge, not implicit sharing.
Custom system prompt
Configure a default persona in Open WebUI's model settings (a system prompt applied to every conversation) — this is a genuinely useful, low-effort customization: "always cite sources when referencing my documents" pays off directly once Lesson 4 adds RAG.
What you're building today
docker-compose.yml: the Open WebUI service, correctly networked to your host's Ollama instance, with a persistent volume for chat history and a configured default system prompt — verified by chatting with all 3 models through the actual UI, not just the CLI.