Repo LLM Apps

open-webui/open-webui

Self-hosted, extensible AI platform with a web UI for Ollama and OpenAI-compatible APIs, runnable offline, with RAG, RBAC, plugins and voice.

  • 159k GitHub stars
  • Python
  • ⚖️ NOASSERTION
  • 🎯 Beginner

Last verified: repo last pushed

pip install open-webui
open-webui/open-webui preview image

What it is

Open WebUI is a self-hosted AI platform built to run entirely offline. It provides a provider-agnostic interface for local models via Ollama and cloud models via OpenAI-compatible APIs. It includes RAG, web search, image generation, plugins, agents, voice/video calls, and role-based access control. It can be installed via pip, Docker, or Kubernetes.

Who it's for

  • Developers and teams who want a self-hosted chat interface for Ollama or OpenAI-compatible models
  • Administrators who need RBAC, user groups, LDAP/SSO and observability for multi-user deployments
  • Users who want local RAG, web search and agent/plugin capabilities in one UI

Requirements

Requirements

  • Python 3.11 for the pip installation
  • Docker for the container-based installation methods
  • Nvidia CUDA container toolkit on a Linux/WSL system to enable CUDA with the :cuda image
  • Ollama on your machine or another server (unless using the bundled :ollama image or OpenAI API only)
  • Include -v open-webui:/app/backend/data in Docker commands to avoid losing the database

Setup

  1. Install via pip

    Install Open WebUI with pip (Python 3.11 recommended in the source to avoid compatibility issues).

    bash
    pip install open-webui
  2. Run the pip-installed server

    Start the server, then open http://localhost:8080.

    bash
    open-webui serve
  3. Docker: Ollama on your computer

    Run the default container, then access Open WebUI at http://localhost:3000.

    bash
    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
  4. Docker: Nvidia GPU support

    Use the :cuda image with GPU access.

    bash
    docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda
  5. Docker: bundled Ollama (CPU only)

    A single image bundling Open WebUI with Ollama; a GPU variant using --gpus=all is also documented.

    bash
    docker run -d -p 3000:8080 -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama

Examples

Connect to Ollama on another server

bash
bash
docker run -d -p 3000:8080 -e OLLAMA_BASE_URL=https://example.com -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

What it does: Sets OLLAMA_BASE_URL to point the container at a remote Ollama server.

OpenAI API only

bash
bash
docker run -d -p 3000:8080 -e OPENAI_API_KEY=your_secret_key -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

What it does: Runs Open WebUI using an OpenAI API key instead of Ollama.

Fix server connection error with host networking

bash
bash
docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main

What it does: Troubleshooting command when the container cannot reach Ollama; the port changes to 8080 (http://localhost:8080).

Offline mode

bash
bash
export HF_HUB_OFFLINE=1

What it does: Prevents attempts to download models from the internet in offline environments.

Pros & cons

Pros

  • Pro:Works with Ollama and any OpenAI-compatible API, so local and cloud providers can be mixed
  • Pro:Broad feature set including RAG with 9 vector databases, web search, image generation and voice/video calls
  • Pro:Granular RBAC, LDAP/SSO/SCIM and OpenTelemetry support for team and enterprise deployments
  • Pro:Multiple install paths (pip, Docker, Kubernetes) with bundled-Ollama and CUDA images

Cons

  • Con:Docker installs require mounting -v open-webui:/app/backend/data or data may be lost
  • Con:Docker environments may need extra configuration; connection issues with Ollama may require --network=host
  • Con:Licensing is mixed, with an Open WebUI License that requires preserving the "Open WebUI" branding

Images