HOW-TO · SET

How to install Open WebUI with Docker

intermediate15 minBy Eruo Fredoline
Target environment
Ubuntu 24.04 · Ollama 0.4.xWindows 11 · Ollama 0.4.xmacOS 15 · Ollama 0.4.x
PREREQUISITES

Docker and Docker Compose installed

What this does

Deploys the Open WebUI browser interface as a Docker container connected to the local Ollama backend. After this guide the interface is reachable at http://localhost:8080 and responsive to model queries.

Steps

  1. Create the project directory and compose file.

    mkdir -p ~/open-webui && cd ~/open-webui
    

    Create a compose.yaml with:

    services:
      open-webui:
        image: ghcr.io/open-webui/open-webui:main
        container_name: open-webui
        ports:
          - "8080:8080"
        environment:
          - OLLAMA_BASE_URL=http://host.docker.internal:11434
        volumes:
          - ./data:/app/backend/data
        restart: unless-stopped
    
  2. Start the container stack.

    docker compose up -d
    

    Expected output: Pull progress followed by Container open-webui Running.

  3. Wait for startup and confirm the container is healthy.

    sleep 30 && docker compose ps
    

    Expected output: open-webui showing status Up.

  4. Open the interface in a browser.

    http://localhost:8080
    

    Expected result: Login page rendered with admin account setup prompt.

Verification

curl -s -o /dev/null -w "%{http_code}" http://localhost:8080
# Expected: 200

Common failures

  • 503 Service Unavailable on browser load — Open WebUI is still initializing. Wait 60 seconds and refresh.
  • Connection refused to OllamaOLLAMA_BASE_URL uses a domain Ollama cannot route. On Linux use --add-host=host.docker.internal:host-gateway.
  • Image pull fails — Use ghcr.io/open-webui/open-webui:latest or pin a specific version tag.
  • Permission denied writing to ./data/ — Run sudo chown -R 1000:1000 ~/open-webui/data.
  • Container restarts repeatedly — Check logs with docker compose logs for Connection refused errors.

Operator checkpoint

Before treating this as solved, write down the local runtime, model or package version, hardware/backend if relevant, and the verification output. This keeps the guide useful as a Will-It-Run style decision instead of a one-off command transcript.

Related guides

RELATED GUIDES