Skip to main content
Back to Category

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.

Read time: 14 min AI & ML Self-Hosting
open-webuichatgptartificial intelligenceollamaself-hostingdockerrag

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

ComponentMinimumRecommended
RAM4 GB (for UI)8 GB+
Disk5 GB10 GB+
Docker20.10+Latest
OllamaInstalled and runningSame server or network

Docker Installation

Ollama on Same Server

If Ollama is running on the same server:

hljs bash
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:

hljs bash
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
hljs yaml
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:

hljs bash
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:

  1. Click Sign Up
  2. Enter name, email and password
  3. 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:

  1. Admin PanelSettingsConnections
  2. Ollama URL: http://ollama:11434 (Docker Compose) or http://host.docker.internal:11434
  3. Click Test Connection to verify

Model Management

Download Models from Interface

  1. Admin PanelSettingsModels
  2. Enter model name (e.g., llama3.1)
  3. Click Pull
  4. Track download progress

Download Models via CLI

hljs bash
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

  1. Click + in the chat window
  2. Upload PDF, TXT, DOCX, MD files
  3. Document is automatically chunked and embeddings are created
  4. Ask questions referencing the document in chat

RAG Configuration

Admin PanelSettingsDocuments:

Chunk Size: 1000
Chunk Overlap: 200
Embedding Model: nomic-embed-text
Top K: 5

Embedding Model Setup

hljs bash
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

hljs bash
# Environment variables
ENABLE_SIGNUP=true
DEFAULT_USER_ROLE=pending
ENABLE_LOGIN_FORM=true

Custom System Prompts

Define custom system prompts for each model:

  1. WorkspaceModels → Select model
  2. 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

WorkspacePromptsCreate 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

hljs nginx
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

hljs bash
docker compose pull
docker compose up -d

Troubleshooting

hljs bash
# 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.