Ollama With Open WebUI
Give Ollama a ChatGPT-style browser interface with Open WebUI, running locally in Docker.
TL;DR
- Run Open WebUI with
docker runfor a chat UI. - It auto-detects Ollama at
localhost:11434on the same host. - Open the UI in a browser at
localhost:3000.
Install With Docker
docker runStart Open WebUI in a container.
docker run -d -p 3000:8080 \
--name open-webui \
ghcr.io/open-webui/open-webui:mainPersist DataMount a volume for chats and accounts.
-v open-webui:/app/backend/dataConnect To Ollama
Same HostIt auto-detects a local Ollama instance.
# Auto-connects to localhost:11434host.docker.internalReach host Ollama from inside Docker.
-e OLLAMA_BASE_URL=\
http://host.docker.internal:11434Pick A ModelChoose a pulled model in the UI dropdown.
# Select a model top-left, then chatKey Features
Multi-Model ChatSwitch between pulled models per conversation.
# Dropdown lists all local modelsChat HistoryConversations are saved for later.
# Stored in the mounted data volumeDocument UploadUpload files for retrieval-augmented chat.
# Attach docs for RAG in the chat boxImage InputSend images to vision models.
# Works with llava and other vision modelspip Alternative
InstallInstall Open WebUI as a Python package.
pip install open-webuiServeRun the server on port 8080.
open-webui serveTips
- Mount a volume at
/app/backend/dataso your chats, accounts, and settings survive Open WebUI container restarts. - If Ollama runs on the host and the UI in Docker, set
OLLAMA_BASE_URLtohttp://host.docker.internal:11434.
Warnings
- The first account you create in Open WebUI becomes the admin; create it right away, on a trusted network only.
- A container cannot reach host
localhost; usehost.docker.internalor the host IP so the UI finds Ollama.
In Practice
Run Open WebUI in Docker, let it auto-detect local Ollama, and start chatting with a model in your browser.
- Open WebUI needs a running Ollama to talk to.
- The container serves the UI on port 3000 from internal 8080.
- The data volume keeps your account and chats across restarts.
- The UI auto-detects local models, so you pick one and chat.
# 1. Make sure Ollama is running
ollama serve
# 2. Start Open WebUI in Docker
docker run -d -p 3000:8080 \
-v open-webui:/app/backend/data \
--name open-webui \
ghcr.io/open-webui/open-webui:main
# 3. Open the UI and create an account
# http://localhost:3000
# 4. See which models you can pick
ollama listFAQ
Open WebUI is a free, self-hosted web interface that wraps Ollama in a polished, ChatGPT-style chat. It adds conversation history, multi-model switching, document upload, and image input, all running locally.
On the same host it auto-detects Ollama at localhost:11434. If the UI runs in Docker and Ollama on the host, set OLLAMA_BASE_URL to http://host.docker.internal:11434 so the container can reach it.
The container listens on 8080 internally; the usual Docker command maps it to 3000, so you open http://localhost:3000. The pip install runs the server directly on 8080.
Yes. You can attach documents in the chat box and Open WebUI retrieves from them to answer, giving you local retrieval-augmented chat without writing any pipeline code yourself.