Open WebUI Setup: ChatGPT-Like Interface for Local AI
Open WebUI installation with Docker, Ollama integration, user management, RAG (document querying), model management, custom prompts and multi-user support.
Table of Contents
Open WebUI Setup: ChatGPT-Like Interface for Local AI
Open WebUI (formerly Ollama WebUI) is an open-source project that provides a modern ChatGPT-like web interface for your local LLM models. Integrated with Ollama, you can chat with your AI models through the browser, upload documents and query your documents with RAG (Retrieval-Augmented Generation).
What is Open WebUI?
Open WebUI is a comprehensive web interface designed for self-hosted AI experience. Key features:
- ChatGPT-Like Interface: Modern, user-friendly chat experience
- Ollama Integration: Direct connection with local LLM models
- RAG Pipeline: Document upload and document-based querying
- Multi-User: User management and role-based access
- Model Management: Download, delete and configure models from the interface
- Custom Prompts: System prompt templates and sharing
- Chat History: Record and search all conversations
- Markdown Support: Code blocks, tables and rich text formatting
System Requirements
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 4 GB (for UI) | 8 GB+ |
| Disk | 5 GB | 10 GB+ |
| Docker | 20.10+ | Latest |
| Ollama | Installed and running | Same server or network |
Docker Installation
Ollama on Same Server
If Ollama is running on the same server:
docker run -d \
--name open-webui \
-p 3000:8080 \
--add-host=host.docker.internal:host-gateway \
-e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
-v open-webui:/app/backend/data \
--restart unless-stopped \
ghcr.io/open-webui/open-webui:main
Bundled with Ollama (Single Container)
To run Ollama and Open WebUI in a single container:
docker run -d \
--name open-webui \
-p 3000:8080 \
--gpus all \
-v ollama:/root/.ollama \
-v open-webui:/app/backend/data \
--restart unless-stopped \
ghcr.io/open-webui/open-webui:ollama
Docker Compose (Recommended)
version: '3.8'
services:
ollama:
image: ollama/ollama
container_name: ollama
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
restart: unless-stopped
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
ports:
- "3000:8080"
environment:
- OLLAMA_BASE_URL=http://ollama:11434
- WEBUI_SECRET_KEY=your-strong-secret-key-here
- ENABLE_SIGNUP=true
- DEFAULT_USER_ROLE=pending
volumes:
- open-webui_data:/app/backend/data
depends_on:
- ollama
restart: unless-stopped
volumes:
ollama_data:
open-webui_data:
Start:
docker compose up -d
Initial Configuration
Navigate to http://SERVER_IP:3000 in your browser.
Creating Admin Account
The first user to register automatically becomes admin:
- Click Sign Up
- Enter name, email and password
- First user gets admin role
Create the first user immediately. Otherwise someone else could become admin. After registration, set ENABLE_SIGNUP=false to disable new registrations.
Ollama Connection
Verify Ollama connection from admin panel:
- Admin Panel → Settings → Connections
- Ollama URL:
http://ollama:11434(Docker Compose) orhttp://host.docker.internal:11434 - Click Test Connection to verify
Model Management
Download Models from Interface
- Admin Panel → Settings → Models
- Enter model name (e.g.,
llama3.1) - Click Pull
- Track download progress
Download Models via CLI
docker exec -it ollama ollama pull llama3.1
docker exec -it ollama ollama pull mistral
docker exec -it ollama ollama pull codellama
RAG (Retrieval-Augmented Generation)
Open WebUI supports document upload and document-based querying:
Uploading Documents
- Click + in the chat window
- Upload PDF, TXT, DOCX, MD files
- Document is automatically chunked and embeddings are created
- Ask questions referencing the document in chat
RAG Configuration
Admin Panel → Settings → Documents:
Chunk Size: 1000
Chunk Overlap: 200
Embedding Model: nomic-embed-text
Top K: 5
Embedding Model Setup
docker exec -it ollama ollama pull nomic-embed-text
User Management
Roles
- Admin: Full access (settings, users, models)
- User: Chat and document upload
- Pending: User awaiting approval
User Settings
# Environment variables
ENABLE_SIGNUP=true
DEFAULT_USER_ROLE=pending
ENABLE_LOGIN_FORM=true
Custom System Prompts
Define custom system prompts for each model:
- Workspace → Models → Select model
- Write in System Prompt field:
You are a REXE Technology technical support assistant.
You specialize in server management, Docker, Linux and networking.
Include code examples.
Explain step by step.
Prompt Templates
Workspace → Prompts → Create Prompt:
Title: Linux Troubleshooting
Command: /linux-fix
Content: "Analyze the following Linux issue and suggest a solution:
1. List possible causes
2. Provide diagnostic commands
3. Write step-by-step solution
4. Add prevention tips
Issue: {{prompt}}"
Nginx Reverse Proxy
server {
listen 80;
server_name ai.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name ai.example.com;
ssl_certificate /etc/letsencrypt/live/ai.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ai.example.com/privkey.pem;
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;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
client_max_body_size 100M;
}
Updating
docker compose pull
docker compose up -d
Troubleshooting
# Open WebUI logs
docker logs open-webui
# Ollama connection test
docker exec open-webui curl -s http://ollama:11434/api/tags
# Container status
docker ps | grep -E 'open-webui|ollama'
With REXE VPS servers, you can set up your own ChatGPT alternative using Open WebUI. Your data stays completely under your control.
Related Articles
Ollama Installation: Local LLM Running Guide
Ollama installation, running local LLM models (Llama 3, Mistral, Gemma), API usage, model management, GPU acceleration and Docker deployment.
GPU Server AI Model Deployment: NVIDIA CUDA Guide
NVIDIA driver installation, CUDA toolkit, nvidia-container-toolkit, model serving with vLLM, GPU monitoring and AI model deployment with Docker guide.
Stable Diffusion Setup: Self-Hosted Image Generation
Stable Diffusion installation, AUTOMATIC1111 and ComfyUI interfaces, model downloading, LoRA training, ControlNet usage and Docker self-hosted image generation guide.