WebUI could not connect to Ollama #1589

Closed
opened 2025-11-11 14:47:55 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @okynnor on GitHub (Jul 23, 2024).

Bug Report

Description

After upgrading my docker container for WebUI, it is able to connect to Ollama at another machine via API

Bug Summary:
It was working until we upgraded WebUI to the latest version v0.3.10
(latest)

Steps to Reproduce:
Ran a docker container update to update the latest version.

To ensure that my Mac's firewall is not on, it checked and it is OFF
I when to the host machine that's running the Docker with WebUI, to ensure that I can ping it, and yes, I can ping the MacBooks PRO with M1Pro without issues.
I also tried to ping the host machine that's running the WebUI, that also replies to pings.
I notice that the docker logs (prior to attached) that Ollama is looking for ssl, which seems new. I changed the docker compose to connect via https rather than http.
That still didn't work.

Expected Behavior:
It should connect to the Ollama API that's residing in an M1Pro.
from the M1Pro, from the MacOS terminal, Ollama responds to chat queries without issues.

Actual Behavior:
I go to the settings >> Admin > Connections to make sure and indeed, I get this error "WebUI could not connect to Ollama

Environment

  • **Open WebUI Version:**v0.3.10

  • Ollama (if applicable): v0.2.7

  • Operating System: macOS Sonoma 14.5

  • Browser (if applicable): N/A

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:
attached in this issue
open-webui-open-webui-1_logs-2.txt

Screenshots (if applicable):
[Attach any relevant screenshots to help illustrate the issue]

Installation Method

[Describe the method you used to install the project, e.g., manual installation, Docker, package manager, etc.]

Additional Information

[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @okynnor on GitHub (Jul 23, 2024). # Bug Report ## Description After upgrading my docker container for WebUI, it is able to connect to Ollama at another machine via API **Bug Summary:** It was working until we upgraded WebUI to the latest version v0.3.10 [(latest)](https://github.com/open-webui/open-webui/releases/tag/v0.3.10) **Steps to Reproduce:** Ran a docker container update to update the latest version. To ensure that my Mac's firewall is not on, it checked and it is OFF I when to the host machine that's running the Docker with WebUI, to ensure that I can ping it, and yes, I can ping the MacBooks PRO with M1Pro without issues. I also tried to ping the host machine that's running the WebUI, that also replies to pings. I notice that the docker logs (prior to attached) that Ollama is looking for ssl, which seems new. I changed the docker compose to connect via https rather than http. That still didn't work. **Expected Behavior:** It should connect to the Ollama API that's residing in an M1Pro. from the M1Pro, from the MacOS terminal, Ollama responds to chat queries without issues. **Actual Behavior:** I go to the settings >> Admin > Connections to make sure and indeed, I get this error "WebUI could not connect to Ollama ## Environment - **Open WebUI Version:**v0.3.10 - **Ollama (if applicable):** v0.2.7 - **Operating System:** macOS Sonoma 14.5 - **Browser (if applicable):** N/A ## Reproduction Details **Confirmation:** - [ ] I have read and followed all the instructions provided in the README.md. - [ ] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [ ] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** [Include relevant browser console logs, if applicable] **Docker Container Logs:** attached in this issue [open-webui-open-webui-1_logs-2.txt](https://github.com/user-attachments/files/16352855/open-webui-open-webui-1_logs-2.txt) **Screenshots (if applicable):** [Attach any relevant screenshots to help illustrate the issue] ## Installation Method [Describe the method you used to install the project, e.g., manual installation, Docker, package manager, etc.] ## Additional Information [Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.] ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@justinh-rahb commented on GitHub (Jul 23, 2024):

Ensure that Ollama is being run with OLLAMA_HOST=0.0.0.0

@justinh-rahb commented on GitHub (Jul 23, 2024): Ensure that Ollama is being run with `OLLAMA_HOST=0.0.0.0`
Author
Owner

@okynnor commented on GitHub (Jul 23, 2024):

Thanks! That was the right solution.
For everyone else's convenience, on MacOS Terminal, type:

launchctl setenv OLLAMA_HOST "0.0.0.0"

and restart Ollama server

@okynnor commented on GitHub (Jul 23, 2024): Thanks! That was the right solution. For everyone else's convenience, on MacOS Terminal, type: `launchctl setenv OLLAMA_HOST "0.0.0.0"` and restart Ollama server
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#1589