From 36d2a589d21d37092fdf4aa7e70555f51412b4b8 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 29 Dec 2023 09:05:43 -0800 Subject: [PATCH 1/3] doc: clarity --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bde67525..c40b88f5 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Also check our sibling project, [OllamaHub](https://ollamahub.com/), where you c - πŸ” **Role-Based Access Control (RBAC)**: Ensure secure access with restricted permissions; only authorized individuals can access your Ollama, and exclusive model creation/pulling rights are reserved for administrators. -- πŸ”’ **Backend Reverse Proxy Support**: Strengthen security by enabling direct communication between Ollama Web UI backend and Ollama, eliminating the need to expose Ollama over LAN. +- πŸ”’ **Backend Reverse Proxy Support**: Bolster security through direct communication between Ollama Web UI backend and Ollama. This key feature eliminates the need to expose Ollama over LAN. Requests made to the '/ollama/api' route from the web UI are seamlessly redirected to Ollama from the backend, enhancing overall system security. - 🌟 **Continuous Updates**: We are committed to improving Ollama Web UI with regular updates and new features. From ec87a5e795e5de6cf63714a8cc62233663293f61 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 29 Dec 2023 09:29:12 -0800 Subject: [PATCH 2/3] doc: troubleshooting update --- TROUBLESHOOTING.md | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 59f7049b..339c230f 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -1,30 +1,32 @@ # Ollama Web UI Troubleshooting Guide +## Understanding the Ollama WebUI Architecture + +The Ollama WebUI system is designed to streamline interactions between the client (your browser) and the Ollama API. At the heart of this design is a backend reverse proxy, enhancing security and resolving CORS issues. + +- **How it Works**: When you make a request (like `/ollama/api/tags`) from the Ollama WebUI, it doesn’t go directly to the Ollama API. Instead, it first reaches the Ollama WebUI backend. The backend then forwards this request to the Ollama API via the route you define in the `OLLAMA_API_BASE_URL` environment variable. For instance, a request to `/ollama/api/tags` in the WebUI is equivalent to `OLLAMA_API_BASE_URL/tags` in the backend. + +- **Security Benefits**: This design prevents direct exposure of the Ollama API to the frontend, safeguarding against potential CORS (Cross-Origin Resource Sharing) issues and unauthorized access. Requiring authentication to access the Ollama API further enhances this security layer. + ## Ollama WebUI: Server Connection Error -If you're running ollama-webui and have chosen to install webui and ollama separately, you might encounter connection issues. This is often due to the docker container being unable to reach the Ollama server at 127.0.0.1:11434(host.docker.internal:11434). To resolve this, you can use the `--network=host` flag in the docker command. When done so port would be changed from 3000 to 8080, and the link would be: http://localhost:8080. +If you're experiencing connection issues, it’s often due to the WebUI docker container not being able to reach the Ollama server at 127.0.0.1:11434 (host.docker.internal:11434) inside the container . Use the `--network=host` flag in your docker command to resolve this. Note that the port changes from 3000 to 8080, resulting in the link: `http://localhost:8080`. -Here's an example of the command you should run: +**Example Docker Command**: ```bash docker run -d --network=host -v ollama-webui:/app/backend/data -e OLLAMA_API_BASE_URL=http://127.0.0.1:11434/api --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main ``` -## Connection Errors +### General Connection Errors -Make sure you have the **latest version of Ollama** installed before proceeding with the installation. You can find the latest version of Ollama at [https://ollama.ai/](https://ollama.ai/). +**Ensure Ollama Version is Up-to-Date**: Always start by checking that you have the latest version of Ollama. Visit [Ollama's official site](https://ollama.ai/) for the latest updates. -If you encounter difficulties connecting to the Ollama server, please follow these steps to diagnose and resolve the issue: +**Troubleshooting Steps**: -**1. Check Ollama URL Format** +1. **Verify Ollama URL Format**: + - When running the Web UI container, ensure the `OLLAMA_API_BASE_URL` is correctly set, including the `/api` suffix. (e.g., `http://192.168.1.1:11434/api` for different host setups). + - In the Ollama WebUI, navigate to "Settings" > "General". + - Confirm that the Ollama Server URL is correctly set to `/ollama/api`, including the `/api` suffix. -Ensure that the Ollama URL is correctly formatted in the application settings. Follow these steps: - -- If your Ollama runs in a different host than Web UI make sure Ollama host address is provided when running Web UI container via `OLLAMA_API_BASE_URL` environment variable. [(e.g. OLLAMA_API_BASE_URL=http://192.168.1.1:11434/api)](https://github.com/ollama-webui/ollama-webui#accessing-external-ollama-on-a-different-server) -- Go to "Settings" within the Ollama WebUI. -- Navigate to the "General" section. -- Verify that the Ollama Server URL is set to: `/ollama/api`. - -It is crucial to include the `/api` at the end of the URL to ensure that the Ollama Web UI can communicate with the server. - -By following these troubleshooting steps, you should be able to identify and resolve connection issues with your Ollama server configuration. If you require further assistance or have additional questions, please don't hesitate to reach out or refer to our documentation for comprehensive guidance. +By following these enhanced troubleshooting steps, connection issues should be effectively resolved. For further assistance or queries, feel free to reach out to us on our community Discord. From 28a3d599553007e42f709b8162e2a3b9f80b284b Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 29 Dec 2023 09:29:54 -0800 Subject: [PATCH 3/3] feat: update troubleshooting messages --- src/lib/components/chat/SettingsModal.svelte | 9 ++++++--- src/routes/(app)/+layout.svelte | 11 +++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index 18aa6eca..5dd57c78 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -997,12 +997,12 @@
-
Ollama Server URL
+
Ollama API URL
@@ -1028,7 +1028,10 @@