How to install Open WebUI with Docker
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
Create the project directory and compose file.
mkdir -p ~/open-webui && cd ~/open-webuiCreate a
compose.yamlwith: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-stoppedStart the container stack.
docker compose up -dExpected output: Pull progress followed by
Container open-webui Running.Wait for startup and confirm the container is healthy.
sleep 30 && docker compose psExpected output:
open-webuishowing statusUp.Open the interface in a browser.
http://localhost:8080Expected 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 Unavailableon browser load — Open WebUI is still initializing. Wait 60 seconds and refresh.- Connection refused to Ollama —
OLLAMA_BASE_URLuses 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:latestor pin a specific version tag. - Permission denied writing to
./data/— Runsudo chown -R 1000:1000 ~/open-webui/data. - Container restarts repeatedly — Check logs with
docker compose logsforConnection refusederrors.
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.