Installing the ollama plugin without internet gives me an internal server error #13718

Closed
opened 2026-02-21 19:13:32 -05:00 by yindo · 1 comment
Owner

Originally created by @bandit1111 on GitHub (May 8, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • 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).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.3.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image The local installation selected when installing the plug-in can be installed on the However, an internal server error will appear after the installation is successful

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @bandit1111 on GitHub (May 8, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [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] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.3.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/ba6d0876-d70d-485b-938a-4023dcd86eb8) The local installation selected when installing the plug-in can be installed on the However, an internal server error will appear after the installation is successful ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:13:32 -05:00
yindo closed this issue 2026-02-21 19:13:32 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 8, 2025):

Hello @bandit1111! I'm Dosu, your friendly bot here to help you with bugs, questions, and becoming a contributor. While you're waiting for a human maintainer, feel free to share more details about your issue!

To resolve the internal server error when installing the Ollama plugin without internet on a self-hosted Dify version 1.3.1 using Docker, ensure that the Ollama service is accessible from the Docker container. The error often occurs because the service is not accessible, as localhost typically refers to the container itself rather than the host machine or other containers.

Here are the steps to fix this issue:

  1. Replace localhost with host.docker.internal in your service configuration to allow the Docker container to access the host machine's services. Use the following URL format:

    http://host.docker.internal:11434
    
  2. If you are running Ollama on macOS, you may need to set environment variables using launchctl:

    launchctl setenv OLLAMA_HOST "0.0.0.0"
    

    Then, restart the Ollama application.

  3. For Linux, if Ollama is run as a systemd service, set the environment variable using systemctl:

    • Edit the systemd service:

      systemctl edit ollama.service
      
    • Add the following under the [Service] section:

      [Service]
      Environment="OLLAMA_HOST=0.0.0.0"
      
    • Save, exit, reload systemd, and restart Ollama:

      systemctl daemon-reload
      systemctl restart ollama
      

These steps should enable the Docker container to establish a connection with the Ollama service running on the host machine [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (May 8, 2025): <!-- Greeting --> Hello @bandit1111! I'm [Dosu](https://dosu.dev), your friendly bot here to help you with bugs, questions, and becoming a contributor. While you're waiting for a human maintainer, feel free to share more details about your issue! <!-- Answer --> To resolve the internal server error when installing the Ollama plugin without internet on a self-hosted Dify version 1.3.1 using Docker, ensure that the Ollama service is accessible from the Docker container. The error often occurs because the service is not accessible, as `localhost` typically refers to the container itself rather than the host machine or other containers. Here are the steps to fix this issue: 1. Replace `localhost` with `host.docker.internal` in your service configuration to allow the Docker container to access the host machine's services. Use the following URL format: ```bash http://host.docker.internal:11434 ``` 2. If you are running Ollama on macOS, you may need to set environment variables using `launchctl`: ```bash launchctl setenv OLLAMA_HOST "0.0.0.0" ``` Then, restart the Ollama application. 3. For Linux, if Ollama is run as a systemd service, set the environment variable using `systemctl`: - Edit the systemd service: ```bash systemctl edit ollama.service ``` - Add the following under the `[Service]` section: ```ini [Service] Environment="OLLAMA_HOST=0.0.0.0" ``` - Save, exit, reload `systemd`, and restart Ollama: ```bash systemctl daemon-reload systemctl restart ollama ``` These steps should enable the Docker container to establish a connection with the Ollama service running on the host machine <sup>[[1]](https://github.com/crazywoola/dify-docs-mintlify/blob/main/ja-jp/development/models-integration/ollama.mdx)</sup><sup>[[2]](https://github.com/crazywoola/dify-docs-mintlify/blob/main/en/learn-more/use-cases/private-ai-ollama-deepseek-dify.mdx)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/88d1b54d-5c8f-4c1b-b7f2-f31ded550d8b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/88d1b54d-5c8f-4c1b-b7f2-f31ded550d8b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/88d1b54d-5c8f-4c1b-b7f2-f31ded550d8b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/88d1b54d-5c8f-4c1b-b7f2-f31ded550d8b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/88d1b54d-5c8f-4c1b-b7f2-f31ded550d8b?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/88d1b54d-5c8f-4c1b-b7f2-f31ded550d8b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/88d1b54d-5c8f-4c1b-b7f2-f31ded550d8b?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13718