Open WebUI
Open WebUI (formerly Ollama WebUI) provides a ChatGPT-like web interface for interacting with local LLMs via Ollama Help. It offers a familiar chat experience with additional features like document upload, image generation, and multi-user support.
Why Open WebUI?
Familiar Interface: ChatGPT-like experience for local models
Document Support: Upload and chat with PDFs, text files
Multi-User: Separate accounts and chat histories
Model Switching: Easily switch between different models
Customization: Themes, prompts, and settings
Privacy: All data stays on your server
Features
Chat Interface
- Clean, modern UI similar to ChatGPT
- Markdown rendering
- Code syntax highlighting
- Conversation history
- Search through chats
Document Processing (RAG)
- Upload PDFs, DOCX, TXT files
- Chat with document contents
- Extract and cite information
- Multiple document support
Model Management
- Switch models mid-conversation
- Compare responses from different models
- Set default models per user
- Model-specific settings
User Management
- Multiple user accounts
- Role-based access (admin/user)
- Per-user chat history
- Shared or private models
Customization
- Custom system prompts
- Temperature and parameter controls
- Dark/light themes
- Custom model names and descriptions
Installation with Docker
Basic Setup
Requires Ollama Help running first.
version: '3.8'
services:
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
ports:
- "3000:8080"
volumes:
- open-webui-data:/app/backend/data
environment:
- OLLAMA_BASE_URL=http://ollama:11434
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
volumes:
open-webui-data:
Complete Stack (Ollama + Open WebUI)
version: '3.8'
services:
ollama:
image: ollama/ollama:latest
container_name: ollama
ports:
- "11434:11434"
volumes:
- ollama-data:/root/.ollama
restart: unless-stopped
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
ports:
- "3000:8080"
volumes:
- open-webui-data:/app/backend/data
environment:
- OLLAMA_BASE_URL=http://ollama:11434
depends_on:
- ollama
restart: unless-stopped
volumes:
ollama-data:
open-webui-data:
With GPU Support
version: '3.8'
services:
ollama:
image: ollama/ollama:latest
container_name: ollama
runtime: nvidia
ports:
- "11434:11434"
volumes:
- ollama-data:/root/.ollama
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
restart: unless-stopped
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
ports:
- "3000:8080"
volumes:
- open-webui-data:/app/backend/data
environment:
- OLLAMA_BASE_URL=http://ollama:11434
depends_on:
- ollama
restart: unless-stopped
volumes:
ollama-data:
open-webui-data:
Start the services:
docker compose up -d
Access at: http://your-server:3000
Initial Setup
First-Time Configuration
- Access Web Interface: Navigate to
http://your-server:3000 - Create Admin Account: First user becomes admin
- Pull Models: Download models via Ollama
- Configure Settings: Adjust preferences
User Management
Create Users (Admin only):
- Settings → Admin Panel → Users
- Click "Add User"
- Set username, password, role
- User receives login credentials
User Roles:
- Admin: Full access, user management, settings
- User: Chat access, personal settings only
Model Configuration
Add Models:
- Settings → Models
- Pull models via Ollama first
- Models appear automatically in Open WebUI
- Set display names and descriptions
Model Settings:
- Default model for new chats
- Temperature (creativity level)
- Max tokens (response length)
- System prompts
Using Open WebUI
Basic Chat
- Select model from dropdown
- Type message in input box
- Press Enter or click Send
- View response with markdown formatting
Document Chat (RAG)
- Click document icon
- Upload PDF, DOCX, or TXT file
- Ask questions about the document
- Model cites relevant sections
Supported formats:
- Microsoft Word (DOCX)
- Plain text (TXT)
- Markdown (MD)
Advanced Features
System Prompts:
You are a helpful coding assistant. Always provide code examples and explain your reasoning.
Temperature Control:
- 0.0: Deterministic, focused
- 0.7: Balanced (default)
- 1.0+: Creative, varied
Model Comparison:
- Select multiple models
- Send same prompt to all
- Compare responses side-by-side
Configuration Options
Environment Variables
environment:
# Ollama connection
- OLLAMA_BASE_URL=http://ollama:11434
# Authentication
- WEBUI_SECRET_KEY=your-secret-key-here
# Features
- ENABLE_SIGNUP=false # Disable public signup
- DEFAULT_USER_ROLE=user # Default role for new users
# Limits
- MAX_UPLOAD_SIZE=100 # MB
- CHUNK_SIZE=1500 # For document processing
# Database
- DATABASE_URL=postgresql://user:pass@db:5432/openwebui
Custom Prompts
Create reusable prompts:
- Settings → Prompts
- Click "Add Prompt"
- Name and description
- Prompt template with variables
Example:
Explain {{topic}} to a {{level}} audience in {{language}}.
Themes
Built-in themes:
- Light mode
- Dark mode
- System (follows OS)
Custom CSS: Admin can add custom styling
Remote Access
Via Tailscale (Recommended)
- Install Tailscale on server and clients
- Access via Tailscale IP:
http://100.x.x.x:3000 - No port forwarding required
- Encrypted connection
Via Reverse Proxy
Use NGINX for HTTPS and custom domain:
server {
listen 443 ssl http2;
server_name llm.yourdomain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
# Increased timeouts for LLM responses
proxy_read_timeout 600s;
proxy_connect_timeout 150s;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Disable buffering for streaming
proxy_buffering off;
}
}
Performance Optimization
Database
For better performance with many users:
services:
postgres:
image: postgres:15
container_name: openwebui-db
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=openwebui
- POSTGRES_USER=openwebui
- POSTGRES_PASSWORD=secure_password
restart: unless-stopped
open-webui:
# ... other config ...
environment:
- DATABASE_URL=postgresql://openwebui:secure_password@postgres:5432/openwebui
depends_on:
- postgres
- ollama
volumes:
postgres-data:
Caching
Enable response caching:
environment:
- ENABLE_RESPONSE_CACHE=true
- CACHE_TTL=3600 # 1 hour
Resource Limits
services:
open-webui:
# ... other config ...
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
Troubleshooting
Can't Connect to Ollama
Check Ollama is running:
curl http://localhost:11434/api/tags
Verify network:
docker exec open-webui curl http://ollama:11434/api/tags
Check environment variable:
docker exec open-webui env | grep OLLAMA
Slow Response Times
Causes:
- Large model on CPU
- Insufficient VRAM
- High concurrent users
Solutions:
- Use smaller/quantized models
- Enable GPU acceleration
- Limit concurrent requests
- Increase timeouts
Document Upload Fails
Check file size limit:
environment:
- MAX_UPLOAD_SIZE=100 # Increase if needed
Check disk space:
docker exec open-webui df -h
Login Issues
Reset admin password:
docker exec -it open-webui python manage.py changepassword admin
Backup & Restore
Backup Data
# Stop Open WebUI
docker stop open-webui
# Backup data volume
docker run --rm \
-v open-webui-data:/data \
-v $(pwd):/backup \
alpine tar czf /backup/open-webui-backup.tar.gz /data
# Start Open WebUI
docker start open-webui
Restore Data
# Stop Open WebUI
docker stop open-webui
# Restore data volume
docker run --rm \
-v open-webui-data:/data \
-v $(pwd):/backup \
alpine tar xzf /backup/open-webui-backup.tar.gz -C /
# Start Open WebUI
docker start open-webui
Best Practices
Security:
- Disable public signup in production
- Use strong passwords
- Enable HTTPS via reverse proxy
- Restrict access via firewall
Performance:
- Use PostgreSQL for multi-user setups
- Enable caching for repeated queries
- Monitor resource usage
- Limit concurrent users if needed
Maintenance:
- Regular backups of data volume
- Update images periodically
- Monitor logs for errors
- Clean old chat histories
User Experience:
- Set appropriate default models
- Create useful system prompts
- Configure reasonable timeouts
- Provide user documentation
Alternatives
Ollama CLI: Command-line interface, no web UI
LM Studio: Desktop app, good for Windows/Mac
Text Generation WebUI: More features, more complex
LibreChat: Multi-provider support (OpenAI, Ollama, etc.)
Related Topics:
- Ollama Help - Local LLM server
- Self-Hosting a Home Server - Complete homelab guide
- Docker - Container platform
- NGINX - Reverse proxy