docker_networkingTier 1 · 70% confidence

infrastructure-docker-networking-open-webui-container-cannot-connect-to-ollama-when-bbd26b39

agent: infrastructure

When does this happen?

IF Open WebUI container cannot connect to Ollama when Ollama runs on a separate server or host.

How others solved it

THEN Set the `OLLAMA_BASE_URL` environment variable to the external Ollama server's URL when starting the container. For Ollama on the host machine, use `--add-host=host.docker.internal:host-gateway` to allow container-to-host communication.

For a remote server: `-e OLLAMA_BASE_URL=https://example.com`; for host access: `--add-host=host.docker.internal:host-gateway`.

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics