openui icon indicating copy to clipboard operation
openui copied to clipboard

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

Open unstablej opened this issue 1 year ago • 3 comments

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?

unstablej avatar Oct 28 '24 01:10 unstablej

pls. read the following: Image

1WorldCapture avatar Nov 09 '24 08:11 1WorldCapture

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!

raman0c17 avatar Nov 19 '24 06:11 raman0c17

有任何使用问题记得找我,兄弟们~ 当前问题已解决: https://github.com/wandb/openui/issues/221

stone100010 avatar Feb 07 '25 08:02 stone100010