RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Fredoline Eruo
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /How-to
  5. /How to configure Open WebUI with Ollama backend
HOW-TO · SET

How to configure Open WebUI with Ollama backend

intermediate·10 min·By Fredoline Eruo
Target environment
Ubuntu 24.04 · Ollama 0.4.xWindows 11 · Ollama 0.4.xmacOS 15 · Ollama 0.4.x
PREREQUISITES

Open WebUI and Ollama both running in Docker

What this does

Links the Open WebUI container to the Ollama API endpoint so chat requests route through the UI to local model inference. After this guide all prompt submissions in the WebUI reach Ollama and return generated responses.

Steps

  1. Verify the Ollama API endpoint is reachable from the Open WebUI container.

    docker exec open-webui curl -s http://host.docker.internal:11434/api/tags
    

    Expected output: JSON object containing a models array.

  2. Set the OLLAMA_BASE_URL environment variable explicitly.

    # Update compose.yaml if needed and restart
    docker compose -f ~/open-webui/compose.yaml up -d
    

    Expected output: Container open-webui Running after the update.

  3. Enable model caching through the UI settings panel.

    • Navigate to Settings > General
    • Set Default Model to a model visible in Ollama
    • Enable Keep Alive to a non-zero value (e.g., 300 seconds)
  4. Test end-to-end from the WebUI. Submit a simple prompt and confirm a response returns.

Verification

curl -s http://localhost:8080/ollama/api/tags | python3 -m json.tool
# Expected: List of model names visible to Open WebUI

Common failures

  • Connection refused in Open WebUI — OLLAMA_BASE_URL resolves to a host Ollama is not binding on. Set OLLAMA_HOST=0.0.0.0 in Ollama and restart.
  • Empty models list in WebUI — Network isolation. Add both containers to the same Docker network.
  • Model returns "error: loading model" — The model file may be corrupted. Re-pull with docker exec ollama ollama pull <model-name>.
  • Slow first response — Set Keep Alive to 300 in Settings > General.
  • WebUI shows 403 Forbidden — Add OLLAMA_API_BASE_URL=http://host.docker.internal:11434 and restart.

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

  • How to install Open WebUI with Docker
  • How to manage models in Open WebUI
  • Course Ollama Deep Dive
RELATED GUIDES
SET
How to manage models in Open WebUI
SET
How to install Open WebUI with Docker
← All how-to guidesCourses →