Skip to content

fix: connect Open WebUI to local Ollama on WendyOS#67

Merged
konstantinbe merged 2 commits into
mainfrom
kb.fix-llm-open-webui-localhost
Jul 1, 2026
Merged

fix: connect Open WebUI to local Ollama on WendyOS#67
konstantinbe merged 2 commits into
mainfrom
kb.fix-llm-open-webui-localhost

Conversation

@konstantinbe

Copy link
Copy Markdown
Contributor

Why

The LLM template has two different networking environments to support. In plain Docker Compose, http://ollama:11434 is correct because Compose creates service-name DNS. On WendyOS, that Compose DNS name is not available to the Open WebUI process, so the template already had a Wendy-specific rewrite path.

The previous rewrite used the device mDNS name, for example http://wendyos-curious-meteor.local:11434. That works from a developer machine and the Thor host advertises it correctly via Avahi, but it is the wrong dependency for an app container. The Open WebUI container does not reliably have the NSS/mDNS pieces required to resolve .local names. On the Thor used for validation, the host could resolve and advertise wendyos-curious-meteor.local, while the Open WebUI container had hosts: files dns, no libnss_mdns, and failed to resolve the same name.

Ollama is already published on the device network stack. From the Open WebUI container, 127.0.0.1:11434 reached Ollama consistently, while the .local hostname did not. Loopback is therefore the more stable in-app route: it avoids depending on mDNS inside arbitrary app images, and it still keeps local Docker Compose behavior unchanged.

This also handles apps that were started with the older .local rewrite by normalizing either the Compose default URL or the previous Wendy device URL to localhost when WENDY_DEVICE_HOSTNAME is present.

Tests

  • bash -n python/llm/open-webui/entrypoint.sh
  • Inspected the running Thor over SSH:
    • avahi-daemon was active and advertising _wendyos._udp.
    • avahi-resolve-host-name wendyos-curious-meteor.local resolved on the host.
    • inside thor-llm_open-webui, .local resolution failed.
    • inside thor-llm_open-webui, curl http://127.0.0.1:11434/api/tags returned the Ollama model list.
  • Confirmed Open WebUI and Ollama were running and the larger gemma4:26b model appeared and could be used for chat after configuring the connection away from .local.

WendyOS discovery relies on mDNS at the host level, but app containers do
not reliably have the NSS modules or Avahi tooling needed to resolve
.local names themselves. Since Ollama publishes its API on the shared
device network stack, loopback is the stable route for Open WebUI while
keeping Docker Compose service-name DNS for local development.

Co-Authored-By: ChatGPT <noreply@openai.com>
@konstantinbe konstantinbe self-assigned this Jul 1, 2026
Comment thread python/llm/open-webui/entrypoint.sh Outdated
The Wendy runtime exposes the device hostname through WENDY_HOSTNAME.
Using that convention ensures the WendyOS-only Ollama URL rewrite runs
when the app is deployed on device.

Co-Authored-By: ChatGPT <noreply@openai.com>
@konstantinbe konstantinbe marked this pull request as draft July 1, 2026 21:46
@konstantinbe konstantinbe marked this pull request as ready for review July 1, 2026 21:51
@konstantinbe konstantinbe merged commit 334f63c into main Jul 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants