Open WebUI (Formerly Ollama WebUI)

The Open WebUI is designed to interact with the Ollama API through a specific route. When a request is made from the WebUI to Ollama, it is not directly sent to the Ollama API. Initially, the request is sent to the Open WebUI backend via /ollama route. From there, the backend is responsible for forwarding the request to the Ollama API. This forwarding is accomplished by using the route specified in the OLLAMA_BASE_URL environment variable. Therefore, a request made to /ollama in the WebUI is effectively the same as making a request to OLLAMA_BASE_URL in the backend. For instance, a request to /ollama/api/tags in the WebUI is equivalent to OLLAMA_BASE_URL/api/tags in the backend.

setup on Windows

Download the Docker desktop and install:
https://docs.docker.com/desktop/install/windows-install/

If Ollama is on your computer, use this command:

1
docker run -d -p 3000:8080 --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

If Ollama is on a Different Server, use this command:
To connect to Ollama on another server, change the OLLAMA_BASE_URL to the server’s URL:

1
docker run -d -p 3000:8080 -e OLLAMA_BASE_URL=https://example.com -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

Server Connection Error
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.

1
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

open-webui docker install cmd

docker desktop

After installation, you can access Open WebUI at http://localhost:3000.
open-webui sign in

Sign up an account:
open-webui sign up

Log in with the tester account:
open-webui

A simple example:
example

Check the settings:
open-webui Settings

Addtional features

Retrieval Augmented Generation (RAG):
https://docs.openwebui.com/tutorial/rag
https://github.com/open-webui/open-webui/blob/main/backend/apps/rag/main.py

reference

https://github.com/open-webui/open-webui
https://docs.openwebui.com/