-
Notifications
You must be signed in to change notification settings - Fork 0
OpenWebUI Setup Guide (WSL2 Docker)
OpenWebUI is a web interface for interacting with local LLMs such as Llama, Qwen, DeepSeek, Phi, and others.
It connects to Ollama through a simple API endpoint and provides chat, RAG, knowledge bases, file uploads, and model management.
- Windows 11
- WSL2 with Ubuntu
- Docker installed inside WSL2
- Ollama running in Docker
- Both containers on the same Docker network
- Basic familiarity with Docker Compose
If you do not already have a shared network for your containers, create one.
docker network create mediaserver
If you already have one, skip this step.
Below is a generic working example of an OpenWebUI service.
services:
openwebui:
container_name: openwebui.<HOST_NAME>
hostname: openwebui.<HOST_NAME>.lan
image: ghcr.io/open-webui/open-webui:latest
environment:
TZ: <TZ>
WEBUI_AUTH: "false"
OLLAMA_API_BASE_URL: "http://ollama.<HOST_NAME>:11434"
networks:
- mediaserver
ports:
- "<OPENWEBUI_PORT>:8080"
volumes:
- <DOCKERDIR>/openwebui:/app/backend/data
restart: always
security_opt:
- no-new-privileges:true
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "homepage.group=AI"
- "homepage.name=OpenWebUI"
- "homepage.icon=openwebui.png"
- "homepage.href=https://openwebui.<DOMAIN_NAME>/"
- "homepage.description=Local AI chat interface"
Start OpenWebUI.
docker compose up -d
Check that the container is running.
docker ps
Open your browser and go to:
http://<HOST_NAME>:<OPENWEBUI_PORT>
If WEBUI_AUTH is disabled, you will be logged in automatically.
OpenWebUI connects to Ollama using the API endpoint defined in the environment variable.
Example endpoint
http://ollama.<HOST_NAME>:11434
Test connectivity from inside the OpenWebUI container.
docker exec -it openwebui.<HOST_NAME> curl http://ollama.<HOST_NAME>:11434/api/tags
If you see your model list, the connection is working.
Inside the OpenWebUI interface:
- Open Settings
- Select Models
- Ensure Ollama is listed as a provider
- Select your default model (example: llama3.1:8b)
- Test a prompt to confirm GPU inference through Ollama
OpenWebUI supports RAG through its built‑in knowledge base system.
To add a knowledge source:
- Go to Knowledge
- Click Add Source
- Choose URL, File, or Text
- Allow OpenWebUI to embed the content
- Ask questions referencing the new knowledge
This requires Ollama to support embeddings.
Backup the OpenWebUI data directory.
<DOCKERDIR>/openwebui
This contains chat history, knowledge bases, and settings.
Copy the directory into a new OpenWebUI container volume and restart the stack.
Verify the endpoint.
curl http://ollama.<HOST_NAME>:11434/api/tags
Ensure both containers are on the same Docker network.
Check the environment variable.
OLLAMA_API_BASE_URL="http://ollama.<HOST_NAME>:11434"
Ensure Ollama has embeddings enabled and the model supports them.
Check logs.
docker logs openwebui.<HOST_NAME>
- OpenWebUI requires Ollama for model execution
- Both containers must share a Docker network
- Disable WEBUI_AUTH only on trusted networks
- Knowledge bases require embedding‑capable models
- GPU inference happens inside Ollama, not OpenWebUI