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

Couldn't connect to Ollama at http://127.0.0.1:11434 #215

Open
unstablej opened this issue Oct 28, 2024 · 2 comments
Open

Couldn't connect to Ollama at http://127.0.0.1:11434 #215

unstablej opened this issue Oct 28, 2024 · 2 comments

Comments

@unstablej
Copy link

Hi,

So no matter what I try I can't get openui running on docker to connect to Ollama thats running locally on my machine. I can verify that my ollama is running on my machine at port 11434 and I even have open webui running in a docker pulling models from it fine.

it keeps running into the following error: Couldn't connect to Ollama at http://127.0.0.1:11434

Anyone have any idea what's going on?

@1WorldCapture
Copy link

pls. read the following:
Image

@raman0c17
Copy link

Hi @unstablej,

The issue happens because 127.0.0.1 inside a Docker container refers to the container itself, not your host machine.

To fix this, set OLLAMA_HOST to http://host.docker.internal:11434 in your docker-compose.yaml.

This allows the container to access services running on your host machine.

I faced a similar problem, and this solution worked for me—hopefully, it works for you too!

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

No branches or pull requests

3 participants