Open WebUI
Open WebUI (formerly Ollama WebUI) is a feature-rich web frontend for large language models. It provides a ChatGPT-like conversational experience with support for connecting to Ollama and OpenAI-compatible APIs. Features include multi-user management, conversation history, model switching, RAG document Q&A, and more, making it ideal for deploying a private AI chat platform for teams or enterprises.
Features
Section titled “Features”- Modern ChatGPT-like interface
- Multi-model switching (Ollama, OpenAI, vLLM, etc.)
- Multi-user management and access control
- Conversation history saving and search
- RAG (Retrieval-Augmented Generation) document Q&A
- Model customization and Modelfile management
- Markdown rendering and code highlighting
- Voice input and TTS support
System Requirements
Section titled “System Requirements”- CentOS Stream 9 & 10 / AlmaLinux 9 & 10 / Rocky Linux 9 & 10
- Docker or Podman
- A deployed Ollama service or other OpenAI-compatible API (see Ollama Local LLM)
Deploy with Docker
Section titled “Deploy with Docker”Install Docker
Section titled “Install Docker”If Docker is not yet installed:
sudo dnf install -y dnf-plugins-coresudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.reposudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-pluginsudo systemctl enable --now dockersudo usermod -aG docker $(whoami)Log out and back in for the group change to take effect.
Deploy Open WebUI (Connecting to Local Ollama)
Section titled “Deploy Open WebUI (Connecting to Local Ollama)”If Ollama is running on the same machine:
docker run -d \ --name open-webui \ --restart always \ -p 3000:8080 \ -v open-webui-data:/app/backend/data \ --add-host=host.docker.internal:host-gateway \ -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \ ghcr.io/open-webui/open-webui:mainVisit http://your-server-ip:3000 to open the interface.
Deploy Open WebUI (Connecting to Remote Ollama)
Section titled “Deploy Open WebUI (Connecting to Remote Ollama)”If Ollama is running on another server:
docker run -d \ --name open-webui \ --restart always \ -p 3000:8080 \ -v open-webui-data:/app/backend/data \ -e OLLAMA_BASE_URL=http://192.168.1.100:11434 \ ghcr.io/open-webui/open-webui:mainConnect to an OpenAI-Compatible API (e.g., vLLM)
Section titled “Connect to an OpenAI-Compatible API (e.g., vLLM)”If using vLLM or another OpenAI API-compatible backend:
docker run -d \ --name open-webui \ --restart always \ -p 3000:8080 \ -v open-webui-data:/app/backend/data \ -e OPENAI_API_BASE_URL=http://192.168.1.100:8000/v1 \ -e OPENAI_API_KEY=not-needed \ ghcr.io/open-webui/open-webui:mainUsing Docker Compose
Section titled “Using Docker Compose”Create a docker-compose.yml file to deploy both Ollama and Open WebUI together:
mkdir -p /opt/open-webui && cd /opt/open-webui
cat > docker-compose.yml <<'EOF'services: ollama: image: ollama/ollama:latest container_name: ollama restart: always volumes: - ollama-data:/root/.ollama ports: - "11434:11434" # If you have a GPU, uncomment the following configuration # deploy: # resources: # reservations: # devices: # - driver: nvidia # count: all # capabilities: [gpu]
open-webui: image: ghcr.io/open-webui/open-webui:main container_name: open-webui restart: always depends_on: - ollama ports: - "3000:8080" volumes: - open-webui-data:/app/backend/data environment: - OLLAMA_BASE_URL=http://ollama:11434
volumes: ollama-data: open-webui-data:EOFStart the services:
docker compose up -dPull models in the Ollama container:
docker exec -it ollama ollama pull qwen2.5docker exec -it ollama ollama pull llama3.1Deploy with Podman
Section titled “Deploy with Podman”EL9 systems come with Podman pre-installed, so Docker is not required.
Basic Deployment
Section titled “Basic Deployment”podman run -d \ --name open-webui \ --restart always \ -p 3000:8080 \ -v open-webui-data:/app/backend/data \ --network=host \ -e OLLAMA_BASE_URL=http://localhost:11434 \ ghcr.io/open-webui/open-webui:mainManaging Podman Containers with systemd
Section titled “Managing Podman Containers with systemd”# Generate a systemd service filemkdir -p ~/.config/systemd/userpodman generate systemd --name open-webui --new > ~/.config/systemd/user/open-webui.service
# Enable auto-start (user-level service)systemctl --user daemon-reloadsystemctl --user enable open-webui.service
# Enable lingering so the service runs even when the user is not logged insudo loginctl enable-linger $(whoami)Initial Configuration
Section titled “Initial Configuration”Create an Admin Account
Section titled “Create an Admin Account”When accessing Open WebUI for the first time, you need to register the first account. The first registered account will automatically become the administrator.
- Open your browser and go to
http://your-server-ip:3000 - Click “Sign up” to register
- Fill in your username, email, and password
- You will be automatically logged in after registration
Admin Settings
Section titled “Admin Settings”After logging in, click the avatar in the bottom-left corner to access settings.
User Management: Administrators can do the following in the Admin Panel:
- View and manage all users
- Set user registration policy (open registration / requires approval / registration closed)
- Change user roles (admin / regular user)
Admin Panel > Settings > General > Enable New Sign UpsModel Management:
- Select which models are visible to users
- Set the default model
- Create custom models (based on Modelfile)
Connection Settings
Section titled “Connection Settings”Configure backend connections in the admin settings:
Ollama Connection:
Admin Panel > Settings > Connections > Ollama APIURL: http://host.docker.internal:11434OpenAI API Connection:
Admin Panel > Settings > Connections > OpenAI APIURL: http://your-vllm-server:8000/v1API Key: your-api-keyGeneral Configuration
Section titled “General Configuration”Environment Variables
Section titled “Environment Variables”Open WebUI supports configuration through environment variables. Here are commonly used ones:
| Environment Variable | Description | Default |
|---|---|---|
OLLAMA_BASE_URL | Ollama API URL | http://localhost:11434 |
OPENAI_API_BASE_URL | OpenAI-compatible API URL | - |
OPENAI_API_KEY | OpenAI API key | - |
WEBUI_AUTH | Enable authentication | true |
WEBUI_SECRET_KEY | JWT secret key | Auto-generated |
DEFAULT_MODELS | Default selected model | - |
ENABLE_SIGNUP | Allow registration | true |
ENABLE_RAG_WEB_SEARCH | Enable RAG web search | false |
Data Persistence
Section titled “Data Persistence”Open WebUI stores data in the /app/backend/data directory inside the container. Persist this data using Docker Volumes:
# View volume informationdocker volume inspect open-webui-data
# Backup datadocker run --rm \ -v open-webui-data:/data \ -v $(pwd):/backup \ alpine tar czf /backup/open-webui-backup.tar.gz -C /data .
# Restore datadocker run --rm \ -v open-webui-data:/data \ -v $(pwd):/backup \ alpine tar xzf /backup/open-webui-backup.tar.gz -C /dataUpdating Open WebUI
Section titled “Updating Open WebUI”# Docker methoddocker pull ghcr.io/open-webui/open-webui:maindocker stop open-webuidocker rm open-webui# Re-run the docker run command (data is persisted via the volume)
# Docker Compose methodcd /opt/open-webuidocker compose pulldocker compose up -dFirewall Configuration
Section titled “Firewall Configuration”sudo firewall-cmd --permanent --add-port=3000/tcpsudo firewall-cmd --reloadCannot Connect to Ollama
Section titled “Cannot Connect to Ollama”Verify that the Ollama listening address is correct:
# Check if Ollama is listeningcurl http://localhost:11434/api/tags
# If the Docker container cannot access the host's Ollama,# make sure Ollama is listening on 0.0.0.0sudo systemctl edit ollama[Service]Environment="OLLAMA_HOST=0.0.0.0"sudo systemctl daemon-reloadsudo systemctl restart ollamaContainer Fails to Start
Section titled “Container Fails to Start”# View container logsdocker logs open-webui
# Common cause: port conflict# Change the portdocker run -d --name open-webui -p 8080:8080 ...Forgot Admin Password
Section titled “Forgot Admin Password”# Enter the container to resetdocker exec -it open-webui bash
# Run the reset command inside the container (specific command depends on the version)# Or delete the volume and reinitialize (this will lose all data)docker stop open-webuidocker rm open-webuidocker volume rm open-webui-data# Recreate the container