Ollama Open Webui
Open WebUI is a user-friendly AI interface (supporting Ollama, OpenAI API, etc.).
Open WebUI supports multiple language model runners (such as Ollama and OpenAI-compatible APIs) and includes a built-in inference engine for Retrieval-Augmented Generation (RAG), making it a powerful AI deployment solution.
Open WebUI allows you to customize the OpenAI API URL and connect with LMStudio, GroqCloud, Mistral, OpenRouter, and more.
Administrators of Open WebUI can create detailed user roles and permissions, ensuring a secure user environment while providing a customized user experience.
Open WebUI supports desktops, laptops, and mobile devices, and offers Progressive Web Applications (PWAs) on mobile devices, supporting offline access.
!(#)
**Open Source Address:** https://github.com/open-webui/open-webui
**Official Documentation:** https://docs.openwebui.com/
* * *
## Installation
Open WebUI provides various installation methods, including installation via Python pip, Docker, Docker Compose, Kustomize, Helm, and more.
### Quick Start Using Docker
If Ollama is already installed on your computer, use the following command:
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
To run Open WebUI with Nvidia GPU support:
docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda
### Bundled Installation of Open WebUI and Ollama
This installation method uses a single container image that bundles Open WebUI with Ollama, allowing easy setup with just one command.
Choose the appropriate command based on your hardware configuration.
Enable GPU support:
docker run -d -p 3000:8080 --gpus=all -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama
Use CPU only:
docker run -d -p 3000:8080 -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama
Both commands simplify the installation process, enabling seamless operation of Open WebUI and Ollama.
After installation, you can access Open WebUI by visiting **http://localhost:3000**.
!(#)
### Updating Open WebUI
**Manual Update**
Manually update the Docker container using Watchtower:
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui
**Automatic Update**
Automatically update the container every 5 minutes:
docker run -d --name watchtower --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --interval 300 open-webui
**Note:** If your container name differs, replace "open-webui" with your actual container name.
* * *
## Manual Installation
There are two main methods for installing Open WebUI: using the uv runtime manager or Python's pip.
Using uv is recommended because it simplifies environment management and reduces potential conflicts.
### Installing with uv (Recommended)
**macOS/Linux:**
curl -LsSf https://astral.sh/uv/install.sh | sh
**Windows:**
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
### Running Open WebUI
After installing UV, running Open WebUI becomes straightforward.
Use the following command, ensuring that the DATA_DIR environment variable is set to avoid data loss.
**macOS/Linux:**
DATA_DIR=~/.open-webui uvx --python 3.11 open-webui@latest serve
**Windows:**
$env:DATA_DIR="C:open-webuidata"; uvx --python 3.11 open-webui@latest serve
### Installing via pip
Open WebUI can also be installed using Python's package installer pip. Before starting the installation, make sure you're using Python 3.11 to avoid potential compatibility issues.
Open your terminal and run the following command to install Open WebUI:
pip install open-webui
Once installed, you can start Open WebUI with the following command:
open-webui serve
After startup, the Open WebUI server will run at http://localhost:8080, which you can access through your browser to use Open WebUI.
YouTip