Skip to content

Instantly share code, notes, and snippets.

@shirayu
Created June 30, 2024 10:14
Show Gist options
  • Select an option

  • Save shirayu/740a5ee716f8da1cef236a04d8e7627e to your computer and use it in GitHub Desktop.

Select an option

Save shirayu/740a5ee716f8da1cef236a04d8e7627e to your computer and use it in GitHub Desktop.
How to fix `Connection refused` by open-webui

Open WebUI (Formerly Ollama WebUI)

Error

$  docker logs open-webui 

...

ERROR:apps.ollama.main:Connection error: Cannot connect to host host.docker.internal:11434 ssl:default [Connection refused]

How I fixed

sudo systemctl edit ollama.service
# Add following lines before `### Edits below this comment will be discarded`


sudo systemctl restart ollama.service         

new lines

[Service]
Environment="OLLAMA_HOST=0.0.0.0"
Environment="OLLAMA_ORIGINS=192.168.0.*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment