connection-error.mdx 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ---
  2. sidebar_position: 0
  3. title: "🚧 Server Connectivity Issues"
  4. ---
  5. We're here to help you get everything set up and running smoothly. Below, you'll find step-by-step instructions tailored for different scenarios to solve common connection issues with Ollama and external servers like Hugging Face.
  6. ## 🌟 Connection to Ollama Server
  7. ### 🚀 Accessing Ollama from Open WebUI
  8. Struggling to connect to Ollama from Open WebUI? It could be because Ollama isn’t listening on a network interface that allows external connections. Let’s sort that out:
  9. 1. **Configure Ollama to Listen Broadly** 🎧:
  10. Set `OLLAMA_HOST` to `0.0.0.0` to make Ollama listen on all network interfaces.
  11. 2. **Update Environment Variables**:
  12. Ensure that the `OLLAMA_HOST` is accurately set within your deployment environment.
  13. 3. **Restart Ollama**🔄:
  14. A restart is needed for the changes to take effect.
  15. 💡 After setting up, verify that Ollama is accessible by visiting the WebUI interface.
  16. For more detailed instructions on configuring Ollama, please refer to the [Ollama's Official Documentation](https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-linux).
  17. ### 🐳 Docker Connection Error
  18. If you're seeing a connection error when trying to access Ollama, it might be because the WebUI docker container can't talk to the Ollama server running on your host. Let’s fix that:
  19. 1. **Adjust the Network Settings** 🛠️:
  20. Use the `--network=host` flag in your Docker command. This links your container directly to your host’s network.
  21. 2. **Change the Port**:
  22. Remember that the internal port changes from 3000 to 8080.
  23. **Example Docker Command**:
  24. ```bash
  25. docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main
  26. ```
  27. 🔗 After running the above, your WebUI should be available at `http://localhost:8080`.
  28. ## 🔒 SSL Connection Issue with Hugging Face
  29. Encountered an SSL error? It could be an issue with the Hugging Face server. Here's what to do:
  30. 1. **Check Hugging Face Server Status**:
  31. Verify if there's a known outage or issue on their end.
  32. 2. **Switch Endpoint**:
  33. If Hugging Face is down, switch the endpoint in your Docker command.
  34. **Example Docker Command for Connected Issues**:
  35. ```bash
  36. docker run -d -p 3000:8080 -e HF_ENDPOINT=https://hf-mirror.com/ --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
  37. ```
  38. ## 🍏 Podman on MacOS
  39. Running on MacOS with Podman? Here’s how to ensure connectivity:
  40. 1. **Enable Host Loopback**:
  41. Use `--network slirp4netns:allow_host_loopback=true` in your command.
  42. 2. **Set OLLAMA_BASE_URL**:
  43. Ensure it points to `http://host.containers.internal:11434`.
  44. **Example Podman Command**:
  45. ```bash
  46. podman run -d --network slirp4netns:allow_host_loopback=true -p 3000:8080 -e OLLAMA_BASE_URL=http://host.containers.internal:11434 -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
  47. ```