Ollama Open WebUI: Self-Hosted ChatGPT Alternative with RAG, Multi-User, and Model Management

TL;DR — Open WebUI: self-hosted ChatGPT alternative for Ollama. Open WebUI GitHub: "Extensible, feature-rich, user-friendly self-hosted AI platform. Operates entirely offline. Supports Ollama and OpenAI-compatible APIs. Built-in RAG with 9 vector databases, hybrid search (BM25 + vector), multi-user, arena A/B testing, model management, plugins." MarkAICode: "ChatGPT-class interface — file uploads, RAG, tool calling, image generation, multi-user auth, model library. 90k+ GitHub stars. Python/SvelteKit in Docker, SQLite (upgradeable to PostgreSQL), proxies to OLLAMA_BASE_URL." StackNix: "Private, offline ChatGPT on your computer. Free, MIT license, zero usage limits. Conversation history, model switching, file uploads, multi-user access." ML Journey: "ChatGPT-style interface, arena mode, RAG with document uploads, image generation, web search — all local, no cloud." Learn more with Ollama tutorial, Docker production, Nginx proxy, and model selection.

Open WebUI GitHub describes the platform: "Open WebUI is an extensible, feature-rich, and user-friendly self-hosted AI platform designed to operate entirely offline. It supports various LLM runners like Ollama and OpenAI-compatible APIs, with built-in inference engine for RAG, making it a powerful AI deployment solution."

MarkAICode adds context: "Open WebUI fills that gap. It is the most actively maintained open-source frontend for Ollama, with over 90k GitHub stars as of 2026. It runs as a separate Docker container that proxies requests to the Ollama API."

Open WebUI Architecture

flowchart TD subgraph Browser["Browser Client"] Chat["Chat Interface
http://localhost:3000
ChatGPT-style UI
conversation history"] end subgraph WebUI["Open WebUI Container"] App["Python/SvelteKit App
port 8080 (mapped 3000)
SQLite database
upgradeable to PostgreSQL"] Auth["Authentication
first account = admin
multi-user with roles
admin: manage all
user: chat only"] RAG["RAG Pipeline
9 vector databases
hybrid search BM25 + vector
reranking, full-context
nomic-embed-text default"] Models["Model Management
pull from UI
switch from dropdown
arena A/B testing
eject loaded models"] Features["Features
file uploads
image generation
web search
tool/function calling
plugins"] Volume["Persistent Volume
/app/backend/data
DB, uploads, config
survives restarts"] end subgraph Ollama["Ollama Server"] API["Ollama API
localhost:11434
OLLAMA_BASE_URL
model inference"] OllamaModels["Models
llama3.2, qwen2.5
deepseek-r1, phi4
nomic-embed-text"] end subgraph Docker["Docker Deployment"] Compose["Docker Compose
open-webui service
depends_on: ollama
restart: unless-stopped"] Bundled["Bundled Image
:ollama tag
single container
Ollama + WebUI"] GPU["GPU Image
:cuda tag
NVIDIA Container Toolkit
CUDA acceleration"] end Chat --> App App --> Auth App --> RAG App --> Models App --> Features App --> Volume App --> API RAG --> OllamaModels Models --> API Compose --> App Bundled --> App GPU --> App style WebUI fill:#4169E1,color:#fff style Ollama fill:#39FF14,color:#000 style Docker fill:#2D1B69,color:#fff

Feature Comparison

Feature Open WebUI Ollama Web UI (legacy) AnythingLLM
Active maintenance ✅ Weekly releases ❌ Archived ✅ Active
RAG built-in ✅ 9 vector DBs
Multi-user auth ✅ Free ✅ Paid tier
Tool/function calling Limited
Self-hosted, free ✅ MIT ✅ Community
Image generation ✅ AUTOMATIC1111
Arena A/B testing ✅ Built-in
Model management ✅ Pull from UI
Web search

Implementation

from dataclasses import dataclass
from typing import Optional
from enum import Enum

class InstallMethod(Enum):
    DOCKER = "docker"
    DOCKER_COMPOSE = "docker_compose"
    BUNDLED = "bundled"
    PIP = "pip"

@dataclass
class OllamaOpenWebUIGuide:
    """Ollama Open WebUI implementation guide."""

    def get_docker_install(self) -> str:
        """Docker installation commands."""
        return (
            "# === DOCKER (Ollama on host) ===\n"
            "docker run -d \\\n"
            "  -p 3000:8080 \\\n"
            "  --add-host=host.docker.\n"
            "    internal:host-gateway \\\n"
            "  -v open-webui:/app/\n"
            "    backend/data \\\n"
            "  --name open-webui \\\n"
            "  --restart always \\\n"
            "  ghcr.io/open-webui/\n"
            "    open-webui:main\n"
            "\n"
            "# === BUNDLED (Ollama + WebUI) ===\n"
            "# Single container with Ollama\n"
            "docker run -d \\\n"
            "  -p 3000:8080 \\\n"
            "  -v ollama:/root/.ollama \\\n"
            "  -v open-webui:/app/\n"
            "    backend/data \\\n"
            "  --name open-webui \\\n"
            "  --restart always \\\n"
            "  ghcr.io/open-webui/\n"
            "    open-webui:ollama\n"
            "\n"
            "# === GPU (CUDA) ===\n"
            "# Requires NVIDIA Container\n"
            "# Toolkit\n"
            "docker run -d \\\n"
            "  --gpus all \\\n"
            "  -p 3000:8080 \\\n"
            "  -v ollama:/root/.ollama \\\n"
            "  -v open-webui:/app/\n"
            "    backend/data \\\n"
            "  --name open-webui \\\n"
            "  --restart always \\\n"
            "  ghcr.io/open-webui/\n"
            "    open-webui:ollama\n"
            "\n"
            "# === ACCESS ===\n"
            "# http://localhost:3000\n"
            "# First account = admin\n"
            "# Create account on first\n"
            "#   visit (local only)"
        )

    def get_docker_compose(self) -> str:
        """Docker Compose with Ollama + Open WebUI."""
        return (
            "# docker-compose.yml\n"
            "version: '3.8'\n"
            "services:\n"
            "  ollama:\n"
            "    image: ollama/ollama:0.5.7\n"
            "    container_name: ollama\n"
            "    volumes:\n"
            "      - ollama_data:/root/.ollama\n"
            "    environment:\n"
            "      - OLLAMA_HOST=0.0.0.0:11434\n"
            "    restart: unless-stopped\n"
            "    healthcheck:\n"
            "      test: ['CMD-SHELL',\n"
            "        'curl -f '\n"
            "        'http://localhost:11434/ '\n"
            "        '|| exit 1']\n"
            "      interval: 30s\n"
            "      timeout: 10s\n"
            "      retries: 3\n"
            "    deploy:\n"
            "      resources:\n"
            "        reservations:\n"
            "          devices:\n"
            "            - driver: nvidia\n"
            "              count: all\n"
            "              capabilities: [gpu]\n"
            "  \n"
            "  open-webui:\n"
            "    image: ghcr.io/open-webui\n"
            "      /open-webui:main\n"
            "    container_name: open-webui\n"
            "    ports:\n"
            "      - '3000:8080'\n"
            "    volumes:\n"
            "      - webui_data:/app/\n"
            "        backend/data\n"
            "    environment:\n"
            "      - OLLAMA_BASE_URL=\n"
            "        http://ollama:11434\n"
            "      - WEBUI_SECRET_KEY=\n"
            "        change-this-random\n"
            "    depends_on:\n"
            "      ollama:\n"
            "        condition:\n"
            "          service_healthy\n"
            "    restart: unless-stopped\n"
            "\n"
            "volumes:\n"
            "  ollama_data:\n"
            "  webui_data:\n"
            "\n"
            "# === RUN ===\n"
            "# docker compose up -d\n"
            "# Access: localhost:3000"
        )

    def get_rag_setup(self) -> str:
        """RAG configuration."""
        return (
            "# === PULL EMBEDDING MODEL ===\n"
            "$ ollama pull nomic-embed-text\n"
            "\n"
            "# === CONFIGURE RAG ===\n"
            "# Admin Panel > Settings >\n"
            "#   Documents\n"
            "\n"
            "# Settings:\n"
            "# - Embedding model:\n"
            "#     nomic-embed-text (default)\n"
            "# - Chunk size: 1500 tokens\n"
            "#     (500 for dense PDFs)\n"
            "# - Top K: 5 (chunks retrieved)\n"
            "# - Hybrid search: BM25 + vector\n"
            "# - Reranking: enabled\n"
            "# - Full-context mode: optional\n"
            "\n"
            "# === USE RAG IN CHAT ===\n"
            "# 1. Click + icon in message bar\n"
            "# 2. Upload PDF, .txt, or URL\n"
            "# 3. Ask questions about doc\n"
            "# 4. Retrieval is automatic\n"
            "# 5. Documents never leave\n"
            "#    your machine\n"
            "\n"
            "# === # COMMAND ===\n"
            "# Type # in chat to pull\n"
            "# documents from your library\n"
            "\n"
            "# === VECTOR DATABASES ===\n"
            "# 9 supported:\n"
            "# ChromaDB (default), Qdrant,\n"
            "# Milvus, pgvector, Pinecone,\n"
            "# Weaviate, LanceDB, FAISS,\n"
            "# OpenSearch\n"
            "\n"
            "# === CONTENT EXTRACTION ===\n"
            "# Tika, Docling, Document\n"
            "# Intelligence, Mistral OCR,\n"
            "# PaddleOCR-vl, external loaders"
        )

    def get_multi_user_setup(self) -> str:
        """Multi-user configuration."""
        return (
            "# === FIRST ACCOUNT = ADMIN ===\n"
            "# On first visit to\n"
            "# http://localhost:3000\n"
            "# Create account:\n"
            "#   name, email, password\n"
            "# First account = admin\n"
            "#   automatically\n"
            "\n"
            "# === ADD USERS ===\n"
            "# Users register via\n"
            "#   sign-up page\n"
            "# Admin approves from\n"
            "#   Admin Panel\n"
            "\n"
            "# === ROLES ===\n"
            "# Admin:\n"
            "#   - Manage models\n"
            "#   - Manage users\n"
            "#   - Configure settings\n"
            "#   - Pull/delete models\n"
            "#   - View usage analytics\n"
            "# User:\n"
            "#   - Chat only\n"
            "#   - Upload documents\n"
            "#   - View own history\n"
            "\n"
            "# === ADMIN PANEL ===\n"
            "# Profile > Admin Panel\n"
            "# - Users: approve, suspend,\n"
            "#     delete accounts\n"
            "# - Models: pull, configure,\n"
            "#     eject loaded models\n"
            "# - Settings: RAG, web search,\n"
            "#     image generation\n"
            "# - Analytics: usage stats,\n"
            "#     message counts\n"
            "\n"
            "# === ENVIRONMENT ===\n"
            "# WEBUI_SECRET_KEY: random\n"
            "#   string for session security\n"
            "# All accounts local only —\n"
            "#   no external auth service"
        )

    def get_features_guide(self) -> dict:
        """Open WebUI features guide."""
        return {
            "chat": (
                "ChatGPT-style interface "
                "with conversation history "
                "sidebar. Switch models "
                "from dropdown without "
                "restarting."
            ),
            "arena": (
                "Arena mode: send same "
                "message to two models, "
                "compare responses side "
                "by side. Built-in A/B "
                "testing for model "
                "evaluation."
            ),
            "rag": (
                "Upload PDFs, text files, "
                "URLs. 9 vector databases, "
                "hybrid search BM25 + "
                "vector, reranking. "
                "nomic-embed-text default. "
                "Fully local."
            ),
            "model_management": (
                "Pull models directly from "
                "UI. Type model name in "
                "selector, auto-download. "
                "Eject loaded models from "
                "admin panel. Green "
                "'Loaded' indicator."
            ),
            "multi_user": (
                "Multi-user with role-based "
                "access. Admin manages all, "
                "users chat only. First "
                "account = admin. MIT "
                "license, free, no limits."
            ),
            "image_generation": (
                "AUTOMATIC1111 integration "
                "for image generation. "
                "Generate images from text "
                "prompts within chat."
            ),
            "web_search": (
                "Web search integration. "
                "Search and retrieve web "
                "content within chat for "
                "up-to-date answers."
            ),
            "tool_calling": (
                "Tool and function calling "
                "support. Extensibility via "
                "plugins. Add custom tools "
                "and functions."
            ),
            "analytics": (
                "Usage analytics and "
                "evaluation dashboards. "
                "Track message counts, "
                "model usage, user activity."
            ),
            "load_balancing": (
                "Multiple Ollama instances. "
                "Open WebUI distributes "
                "requests via random "
                "selection. Model IDs must "
                "match across instances."
            ),
        }

Ollama Open WebUI Checklist

  • [ ] Open WebUI: self-hosted, feature-rich web interface for Ollama — private ChatGPT alternative
  • [ ] Open source under MIT license — completely free, no paid tiers, no subscriptions, no usage limits
  • [ ] 90k+ GitHub stars as of 2026 — most actively maintained Ollama frontend
  • [ ] Runs as Python/SvelteKit app in Docker container, proxies to OLLAMA_BASE_URL
  • [ ] Stores conversations in SQLite (upgradeable to PostgreSQL), uploads in local volume
  • [ ] Docker install: docker run -d -p 3000:8080 -v open-webui:/app/backend/data ghcr.io/open-webui/open-webui:main
  • [ ] Docker: --add-host=host.docker.internal:host-gateway required on Linux for host Ollama
  • [ ] Bundled Ollama: use :ollama tag for single container with Ollama + WebUI
  • [ ] GPU: use :cuda tag with NVIDIA Container Toolkit for CUDA acceleration
  • [ ] Persistent volume: -v open-webui:/app/backend/data — prevents data loss, survives restarts
  • [ ] Access: http://localhost:3000 — first account created becomes admin automatically
  • [ ] restart: always or unless-stopped for auto-recovery
  • [ ] Docker Compose: open-webui service with depends_on ollama (condition: service_healthy)
  • [ ] Docker Compose: OLLAMA_BASE_URL=http://ollama:11434 for Docker network communication
  • [ ] Docker Compose: WEBUI_SECRET_KEY for session security
  • [ ] RAG: pull nomic-embed-text first — ollama pull nomic-embed-text
  • [ ] RAG: upload documents via + icon in chat — PDFs, text files, URLs
  • [ ] RAG: 9 vector databases (ChromaDB, Qdrant, Milvus, pgvector, Pinecone, Weaviate, etc.)
  • [ ] RAG: hybrid search (BM25 + vector) with reranking and full-context mode
  • [ ] RAG: chunk size 1500 tokens for technical docs, 500 for dense PDFs
  • [ ] RAG: Top K 5 (chunks retrieved per query) — safe default
  • [ ] RAG: # command to pull documents from library into chat
  • [ ] RAG: content extraction engines (Tika, Docling, Document Intelligence, Mistral OCR, PaddleOCR-vl)
  • [ ] RAG: fully local — documents never leave your machine
  • [ ] Multi-user: first account = admin, additional users register via sign-up
  • [ ] Multi-user: admin can approve, suspend, delete accounts from Admin Panel
  • [ ] Multi-user: roles — admin (manage all) vs user (chat only)
  • [ ] Multi-user: all accounts local — no external auth service
  • [ ] Model management: pull models directly from UI — type name, auto-download
  • [ ] Model management: switch models from dropdown without restarting
  • [ ] Model management: green "Loaded" indicator, Eject button to unload
  • [ ] Arena mode: send same message to two models, compare side by side — A/B testing
  • [ ] Image generation: AUTOMATIC1111 integration
  • [ ] Web search: search and retrieve web content within chat
  • [ ] Tool/function calling: extensibility via plugins
  • [ ] Usage analytics: admin dashboards track message counts, model usage, user activity
  • [ ] Load balancing: multiple Ollama instances, random selection, Model IDs must match
  • [ ] Admin Panel: manage models, users, settings, RAG, web search, analytics
  • [ ] Open WebUI vs alternatives: weekly releases, free multi-user, RAG, tool calling, image gen
  • [ ] Read Ollama tutorial for basics
  • [ ] Read Docker production for deployment
  • [ ] Read Nginx proxy for production security
  • [ ] Read model selection for choosing models
  • [ ] Test: Open WebUI accessible at localhost:3000
  • [ ] Test: first account created is admin
  • [ ] Test: model switching works from dropdown
  • [ ] Test: RAG — upload PDF, ask questions, get answers from document
  • [ ] Test: multi-user — second user registers, admin approves
  • [ ] Test: arena mode — compare two models side by side
  • [ ] Test: persistent volume — data survives container restart
  • [ ] Test: Docker Compose — both services start and connect
  • [ ] Document install method, OLLAMA_BASE_URL, RAG config, user roles, features enabled

FAQ

What is Open WebUI and how do you install it with Ollama?

Open WebUI is a self-hosted, feature-rich web interface for Ollama — a private ChatGPT alternative. Open WebUI GitHub: "Open WebUI is an extensible, feature-rich, and user-friendly self-hosted AI platform designed to operate entirely offline. Supports Ollama and OpenAI-compatible APIs, with built-in inference engine for RAG. Effortless setup via pip, uv, Docker, or Kubernetes." MarkAICode: "Open WebUI gives local models a ChatGPT-class interface — file uploads, RAG, tool calling, image generation, multi-user auth, model library — all on your machine. Most actively maintained open-source frontend for Ollama, 90k+ GitHub stars as of 2026." StackNix: "Self-hosted, feature-rich web interface for Ollama. Private, offline ChatGPT that runs on your computer. Free, private, zero usage limits. MIT license." Install: (1) Docker: 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. (2) Bundled Ollama: use :ollama tag. (3) Access: http://localhost:3000. (4) First account = admin.

How do you set up RAG with Open WebUI and Ollama?

Upload documents in chat, Open WebUI chunks and embeds them locally using nomic-embed-text. Open WebUI GitHub: "Local RAG Integration: Retrieval Augmented Generation backed by 9 vector databases and multiple content-extraction engines (Tika, Docling, Document Intelligence, Mistral OCR, PaddleOCR-vl). Supports hybrid search (BM25 + vector) with reranking and full-context mode. Load documents into chat or pull from library with # command." MarkAICode: "Enable RAG: embedding model defaults to nomic-embed-text. Pull it first: ollama pull nomic-embed-text. Chunk size 1500 tokens for technical docs, 500 for dense legal PDFs. Top K 5 is safe default. Upload PDF or .txt, ask questions — retrieval happens automatically." ML Journey: "Upload PDFs, text files, or web URLs directly in chat. Open WebUI chunks and embeds using local embedding model, retrieves relevant chunks. Fully local — documents never leave your machine." RAG: (1) Pull nomic-embed-text. (2) Upload document in chat (+ icon). (3) Ask questions — automatic retrieval. (4) Configure: chunk size, top K, embedding model in Admin Settings.

How do you configure multi-user access in Open WebUI?

First account becomes admin, additional users register via sign-up, admin approves from Admin Panel. Open WebUI GitHub: "Multi-user support with role-based permissions." StackNix: "Multi-user access with separate accounts and role-based permissions. First account becomes admin, can approve or manage other accounts. Open source under MIT license, completely free to self-host. No paid tiers, no subscriptions, no usage limits." ML Journey: "Multiple user accounts with role-based access — admins manage models and settings, regular users can only chat. Practical as shared local LLM server for small team or household. First account = admin. Additional users register via sign-up page, admin can approve, suspend, or delete from Admin Panel." Multi-user: (1) First account = admin automatically. (2) Users register via sign-up page. (3) Admin approves/suspends/deletes accounts. (4) Roles: admin (manage models, settings), user (chat only). (5) All local — no external auth service.

What features does Open WebUI provide for Ollama?

ChatGPT-class interface, RAG, multi-user, model management, arena A/B testing, image generation, web search, tool calling. Open WebUI GitHub: "Feature-rich: effortless setup, local RAG with 9 vector databases, usage analytics, evaluation with built-in arena A/B testing, multi-user support, model management, extensibility via plugins." MarkAICode: "ChatGPT-class interface — file uploads, RAG, tool calling, image generation, multi-user auth, model library. Runs as Python/SvelteKit app in Docker, stores conversations in SQLite (upgradeable to PostgreSQL), proxies inference to OLLAMA_BASE_URL." ML Journey: "ChatGPT-style interface, conversation history, model switching, file uploads, multimodal support, arena mode (compare two models side by side), image generation, web search — all without cloud dependency." Features: (1) ChatGPT-style chat with conversation history. (2) Model switching from dropdown. (3) Arena mode: compare two models side by side. (4) RAG: upload PDFs, text, URLs. (5) Multi-user with role-based access. (6) Model management: pull models from UI. (7) Image generation: AUTOMATIC1111 integration. (8) Web search integration. (9) Tool/function calling. (10) Admin Panel for models, settings, users.

How do you deploy Open WebUI with Docker Compose?

Use docker-compose with open-webui service, OLLAMA_BASE_URL, persistent volume, and restart policy. Open WebUI GitHub: "Docker: include -v open-webui:/app/backend/data to ensure database is properly mounted and prevent data loss. :ollama and :cuda tagged images for container deployments." MarkAICode: "Docker Compose: image ghcr.io/open-webui/open-webui:main, ports 3000:8080, volumes open-webui:/app/backend/data, environment OLLAMA_BASE_URL=http://host.docker.internal:11434, WEBUI_SECRET_KEY, extra_hosts for Linux." ML Journey: "Full Docker Compose stack combining Ollama with Open WebUI." Deploy: (1) docker-compose.yml with open-webui service. (2) image: ghcr.io/open-webui/open-webui:main. (3) ports: 3000:8080. (4) volumes: open-webui:/app/backend/data. (5) environment: OLLAMA_BASE_URL=http://ollama:11434. (6) depends_on: ollama (condition: service_healthy). (7) restart: unless-stopped. (8) Bundled: use :ollama tag for single container. (9) GPU: use :cuda tag with NVIDIA Container Toolkit.


Want a self-hosted AI company brain that does all of this out of the box?
Book a demo →