How to Install Open WebUI with Docker on Linux

How to Install Open WebUI with Docker on Linux

Tested on: Ubuntu 24.04 LTS, Debian 12 — Docker 27.x — Last updated: June 2026

Open WebUI is a self-hosted ChatGPT-like interface for local LLMs. It connects to your local Ollama instance and runs entirely in your browser — no data leaves your machine. This guide installs it with Docker in under five minutes.

Prerequisites

  • Docker installed and running (docker --version to verify)
  • Ollama running locally on port 11434 (see our Ollama installation guide)
  • At least one model pulled: ollama pull llama3.2:3b

Step 1 — Install Docker (if not installed)

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker jm
# Log out and back in to apply group changes

Step 2 — Run Open WebUI with Docker

One command starts Open WebUI and connects it to your local Ollama:

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

Open http://localhost:3000 in your browser. On first launch, create an admin account.

Step 3 — Connect to Ollama

Open WebUI auto-detects Ollama at http://host.docker.internal:11434. If models do not appear, go to Settings → Connections and set the Ollama API URL to:

http://host.docker.internal:11434

Step 4 — Install with Docker Compose (recommended)

For a more maintainable setup, use Docker Compose. Create docker-compose.yml:

services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: open-webui
    restart: always
    ports:
      - 3000:8080
    extra_hosts:
      - host.docker.internal:host-gateway
    volumes:
      - open-webui:/app/backend/data

volumes:
  open-webui:
docker compose up -d

Managing the Container

# Check status
docker ps | grep open-webui

# View logs
docker logs open-webui -f

# Update to latest version
docker pull ghcr.io/open-webui/open-webui:main
docker compose up -d --force-recreate

# Stop
docker compose down

Troubleshooting

No models appear in the interface

Ollama is not reachable from inside the container. Verify Ollama is running and confirm the connection URL in Settings → Connections. Also check that the container started with --add-host=host.docker.internal:host-gateway.

Port 3000 already in use

# Use a different port
docker run -d -p 8080:8080 ...

Container exits immediately

docker logs open-webui --tail 50

The most common cause is a volume permission issue. Remove the volume and recreate: docker volume rm open-webui then run again.

What to Do Next

You now have a private, self-hosted ChatGPT running entirely on your machine. From Open WebUI you can manage multiple models, create custom system prompts, use document RAG, and connect to remote APIs like Claude or OpenAI if needed — without your data ever leaving your machine by default.


Go up