Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open-webui container not able to connect to the service running on the host machine #6987

Open
gunamata opened this issue Jun 4, 2024 · 3 comments

Comments

@gunamata
Copy link
Contributor

gunamata commented Jun 4, 2024

Actual Behavior

open-webui container not able to connect to the service running on the host machine

Steps to Reproduce

  • Download and Install ollama on the host machine
  • After installing ollama, pull a LLM model, for example, ollama pull moondream
  • Run the open-webui container
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui -e WEBUI_AUTH=False --restart always ghcr.io/open-webui/open-webui:main
  • Browse to http://localhost:3000 . This should bring up the open-webui interface.
  • In web UI, on the top left corner, expand the model selector dropdown. You should see the moondream model that you pulled above

Result

The open-webui container is not able to access the ollama service (running on port 11434) running on the host machine. I tried host.docker.internal as well but with no luck!

Expected Behavior

The open-webui container should be able to access the ollama service running on the host machine

Additional Information

I have Networking tunnel enabled.

Rancher Desktop Version

1.14

Rancher Desktop K8s Version

1.29.3

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Windows 10

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

No response

@gunamata
Copy link
Contributor Author

gunamata commented Jun 4, 2024

Removing --add-host=host.docker.internal:host-gateway in the command solves the problem. I am not sure if it's the flag --add-host or the value passed that's problematic. Any thoughts @Nino-K ?

@Nino-K
Copy link
Member

Nino-K commented Jun 4, 2024

I believe the host-gateway is specific to the docker desktop, that is why removing the flag simply works. If you replace the host-gateway with the internal IP address of the host machine, that should solve the problem.

@jandubois
Copy link
Member

We should see if we can add support for it. There are other open issues referencing gateway.docker.internal that I think will have the same root issue.

@gunamata gunamata added kind/enhancement New feature or request and removed kind/bug Something isn't working labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants