TL;DR — Quick Summary
Deploy Open WebUI for a ChatGPT-like experience with Ollama, OpenAI, or any OpenAI-compatible API. Covers Docker setup, RAG, multi-user RBAC, web search, and admin configuration.
What Is Open WebUI?
Open WebUI (formerly Ollama WebUI) is a feature-rich, self-hosted web interface that provides a ChatGPT-like experience for interacting with AI language models. It works with Ollama for local models, OpenAI for cloud models, or any OpenAI-compatible API — all from a single, polished interface.
Key features:
- ChatGPT-like UI — conversations, message editing, regeneration, branching
- Multiple model backends — Ollama, OpenAI, Anthropic, any compatible API
- RAG (Retrieval-Augmented Generation) — upload documents and chat with them
- Web search — augment responses with live web results
- Multi-user RBAC — admin/user roles, model access control, shared conversations
- Model presets — save system prompts, temperature, and parameters as reusable profiles
- Image generation — integrate with AUTOMATIC1111, ComfyUI, or OpenAI DALL-E
- Voice input/output — speech-to-text and text-to-speech support
- Markdown rendering — code blocks, tables, LaTeX math, Mermaid diagrams
- API access — programmatic access to conversations and models
Prerequisites
- Docker installed on your server or local machine.
- Ollama running locally or on a remote server (see Ollama setup guide).
- At least 1 GB RAM for Open WebUI itself (models use separate memory via Ollama).
- Optional: OpenAI API key if you want to use GPT-4/GPT-4o alongside local models.
Installation
Standard (Ollama on Same Machine)
docker run -d -p 3000:8080 \
--add-host=host.docker.internal:host-gateway \
-v open-webui:/app/backend/data \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main
The --add-host flag allows the container to reach Ollama on the host machine via host.docker.internal.
Ollama on a Remote Server
If Ollama runs on a different machine (e.g., a GPU server):
docker run -d -p 3000:8080 \
-e OLLAMA_BASE_URL=http://192.168.1.100:11434 \
-v open-webui:/app/backend/data \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main
Replace 192.168.1.100 with your Ollama server’s IP.
Docker Compose
services:
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
restart: always
ports:
- "3000:8080"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- open-webui:/app/backend/data
environment:
- OLLAMA_BASE_URL=http://host.docker.internal:11434
# Optional: OpenAI integration
# - OPENAI_API_BASE_URL=https://api.openai.com/v1
# - OPENAI_API_KEY=sk-your-key-here
volumes:
open-webui:
Initial Setup
First User = Admin
Open http://localhost:3000 and create an account. The first user automatically becomes the administrator. Subsequent users who sign up get the default “user” role.
Configure Connections
Navigate to Admin Panel → Settings → Connections:
| Backend | URL | Notes |
|---|---|---|
| Ollama | http://host.docker.internal:11434 | Auto-detected for local Ollama |
| OpenAI | https://api.openai.com/v1 | Requires API key |
| Custom | Any OpenAI-compatible URL | e.g., Anthropic, Groq, Together AI |
Manage User Registration
By default, anyone can create an account. To restrict registration:
- Go to Admin Panel → Settings → General.
- Toggle Enable New Sign Ups off.
- Now only the admin can create new accounts manually.
RAG — Chat with Your Documents
One of Open WebUI’s most powerful features is RAG (Retrieval-Augmented Generation). Upload documents and ask questions about them — the AI retrieves relevant passages and generates answers grounded in your data.
How to Use RAG
- In any conversation, click the paperclip icon (📎) or drag and drop a file.
- Supported formats: PDF, TXT, DOCX, XLSX, CSV, MD, HTML.
- Open WebUI automatically:
- Chunks the document into segments
- Creates embeddings using a local model (e.g.,
nomic-embed-textvia Ollama) - Stores embeddings in its built-in vector database (ChromaDB)
- Ask questions about the document — the AI cites relevant passages.
Document Collections
For persistent document libraries:
- Go to Workspace → Documents.
- Upload files to create a collection.
- Reference the collection in any conversation with
#collection-name.
Tip: For best RAG results, use
nomic-embed-textas the embedding model:ollama pull nomic-embed-text. Configure it in Admin Panel → Settings → Documents → Embedding Model.
Web Search Integration
Open WebUI can augment model responses with live web search results:
- Go to Admin Panel → Settings → Web Search.
- Enable web search and configure a search provider:
- SearXNG (self-hosted, recommended for privacy)
- Google PSE (requires API key)
- Brave Search (requires API key)
- DuckDuckGo (no key required)
- In conversations, toggle the web search icon (🌐) to include web results.
Model Presets (Custom System Prompts)
Create reusable model configurations:
- Go to Workspace → Models.
- Click Create a Model.
- Configure:
- Name: e.g., “DevOps Assistant”
- Base Model: Select from available Ollama/OpenAI models
- System Prompt: Custom instructions (e.g., “You are a senior DevOps engineer…”)
- Parameters: Temperature, top-p, max tokens
These presets appear as selectable “models” in the chat dropdown, making it easy to switch personas without retyping system prompts.
Admin Features
| Feature | Location | Description |
|---|---|---|
| User Management | Admin → Users | Create/delete users, assign roles |
| Model Access | Admin → Users → Permissions | Restrict which models each user can see |
| Default Model | Admin → Settings → Interface | Set the default model for new conversations |
| System Prompt | Admin → Settings → Interface | Set a global system prompt for all users |
| Rate Limiting | Admin → Settings → Interface | Limit messages per user per minute |
| Chat History | Admin → Settings → General | Enable/disable chat saving |
| Telemetry | Admin → Settings → General | Disable usage analytics |
Updating Open WebUI
# Pull the latest image
docker pull ghcr.io/open-webui/open-webui:main
# Stop and remove the old container (data is preserved in the volume)
docker stop open-webui && docker rm open-webui
# Re-run with the same command
docker run -d -p 3000:8080 \
--add-host=host.docker.internal:host-gateway \
-v open-webui:/app/backend/data \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main
Your conversations, users, and settings are preserved in the open-webui Docker volume.
Troubleshooting
”Could not connect to Ollama”
Cause: Open WebUI cannot reach the Ollama API.
Fix:
- Verify Ollama is running:
curl http://localhost:11434/api/tags. - If using Docker, ensure the
--add-host=host.docker.internal:host-gatewayflag is set. - If Ollama is on a remote server, set
OLLAMA_HOST=0.0.0.0on the Ollama server and restart it.
Models Not Appearing in Dropdown
Cause: Ollama has no models downloaded, or the connection URL is wrong.
Fix:
- Download at least one model:
ollama pull llama3.2. - Check the Ollama URL in Admin → Settings → Connections.
- Click the refresh icon next to the Ollama connection.
RAG Returns Irrelevant Results
Cause: The embedding model is not configured or is too small.
Fix:
- Pull a good embedding model:
ollama pull nomic-embed-text. - In Admin → Settings → Documents, set Embedding Model to
nomic-embed-text. - Re-upload your documents to re-index them with the new model.
Open WebUI vs. Other LLM Interfaces
| Feature | Open WebUI | ChatGPT | LM Studio | Text Gen WebUI |
|---|---|---|---|---|
| Self-Hosted | ✅ | ❌ | ❌ (desktop) | ✅ |
| Multi-User | ✅ RBAC | ❌ (per-account) | ❌ | ❌ |
| RAG | ✅ Built-in | ✅ (paid) | ❌ | ✅ (plugin) |
| Web Search | ✅ | ✅ (paid) | ❌ | ❌ |
| Ollama Support | ✅ | ❌ | ❌ | ❌ |
| OpenAI Support | ✅ | ✅ (native) | ✅ | ✅ |
| Model Presets | ✅ | ✅ (GPTs) | ❌ | ✅ |
| Image Gen | ✅ | ✅ (DALL-E) | ❌ | ✅ |
| Voice I/O | ✅ | ✅ | ❌ | ✅ |
| Cost | Free | $20/mo+ | Free | Free |
Summary
Open WebUI transforms your local Ollama setup (or any OpenAI-compatible API) into a full-featured, multi-user AI platform with RAG, web search, model presets, and admin controls. Deploy it in 30 seconds with Docker and give your team a private, cost-free ChatGPT alternative.