Build a Local AI Dev Environment · 35 min · Docker Compose · Open WebUI
Open WebUI — Your Local ChatGPT
The Docker Compose file you write today is the actual deliverable for the rest of this course -- every later lesson adds a service to it, never replaces it.
Hiring signal: Docker Compose for a real multi-service local stack -- not a toy single-container example -- is a genuinely reusable skill for running any self-hosted service, not just AI tools.
What you will learn
- Launch Open WebUI via Docker Compose, connected to your local Ollama instance
- Verify all 3 models are selectable and working inside the UI
- Configure a custom system prompt as a default persona
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.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers Connect and verify all 3 models, Custom system prompt, What you're building today — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.
Browse all courses · View pricing · DeVenture Academy