step by step how to set up Ollama with Dify on a Mac? #1395

Closed
opened 2026-02-21 17:33:10 -05:00 by yindo · 0 comments
Owner

Originally created by @LLMR-boringtao on GitHub (Mar 15, 2024).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Pleas do not modify this template :) and fill in all the required fields.

Provide a description of the help you need

I already done the following steps:

  1. installed Ollama successfully. running Ollama run llama2 and on localhost:11434, I can see: Ollama is running
  2. set up OLLAMA_HOST and from echo $OLLAMA_HOST, I can see: 0.0.0.0:11434
  3. in Dify setting, I input: llama2 as model name and http://0.0.0.0:11434 as base url.

I got the following error:
An error occurred during credentials validation: HTTPConnectionPool(host='0.0.0.0', port=11434): Max retries exceeded with url: /api/chat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffff98b81ff0>: Failed to establish a new connection: [Errno 111] Connection refused'))

I disable firewall setting on Mac
I also try: 127.0.0.1 and localhost and OLLAMA_HOST, none of them works. Can anyone help? Thanks!

Originally created by @LLMR-boringtao on GitHub (Mar 15, 2024). ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Pleas do not modify this template :) and fill in all the required fields. ### Provide a description of the help you need I already done the following steps: 1. installed Ollama successfully. running Ollama run llama2 and on localhost:11434, I can see: **Ollama is running** 2. set up OLLAMA_HOST and from echo $OLLAMA_HOST, I can see: **0.0.0.0:11434** 3. in Dify setting, I input: **llama2** as model name and **http://0.0.0.0:11434** as base url. I got the following error: An error occurred during credentials validation: HTTPConnectionPool(host='0.0.0.0', port=11434): Max retries exceeded with url: /api/chat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffff98b81ff0>: Failed to establish a new connection: [Errno 111] Connection refused')) I disable firewall setting on Mac I also try: 127.0.0.1 and localhost and OLLAMA_HOST, none of them works. Can anyone help? Thanks!
yindo closed this issue 2026-02-21 17:33:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1395