🚀 Getting Started
How to Install 🚀
-
Admin Creation: The first account created on Open WebUI gains Administrator privileges, controlling user management and system settings.
-
User Registrations: Subsequent sign-ups start with Pending status, requiring Administrator approval for access.
-
Privacy and Data Security: All your data, including login details, is locally stored on your device. Open WebUI ensures strict confidentiality and no external requests for enhanced privacy and security.
Quick Start with Docker 🐳 (Recommended)
Disabling Login for Single User
If you want to disable login for a single-user setup, set WEBUI_AUTH
to False
. This will bypass the login page.
You cannot switch between single-user mode and multi-account mode after this change.
When using Docker to install Open WebUI, make sure to include the -v open-webui:/app/backend/data
in your Docker command. This step is crucial as it ensures your database is properly mounted and prevents any loss of data.
Before You Begin
Installing Docker
For Windows and Mac Users:
- Download Docker Desktop from Docker's official website.
- Follow the installation instructions provided on the website. After installation, open Docker Desktop to ensure it's running properly.
For Ubuntu Users:
-
Open your terminal.
-
Set up Docker's apt repository:
- Update your package index:
sudo apt-get update
- Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install ca-certificates curl
- Create a directory for the Docker apt keyring:
sudo install -m 0755 -d /etc/apt/keyrings
- Add Docker's official GPG key:
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc - Add the Docker repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Update your package index:
If you're using an Ubuntu derivative distro, such as Linux Mint, you might need to use UBUNTU_CODENAME
instead of VERSION_CODENAME
.
-
Install Docker Engine:
- Update your package index again:
sudo apt-get update
- Install Docker Engine, CLI, and containerd:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
- Update your package index again:
-
Verify the Docker installation:
- Use the following command to run a test image:
This command downloads a test image and runs it in a container. If successful, it prints an informational message confirming that Docker is installed and working correctly.
sudo docker run hello-world
- Use the following command to run a test image:
Other Linux Distributions:
- For other Linux distributions, please refer to the official Docker documentation for installation instructions specific to your distro.
Ensure You Have the Latest Version of Ollama:
- Download the latest version from https://ollama.com/.
Verify Ollama Installation:
- After installing Ollama, verify its functionality by accessing http://127.0.0.1:11434/ in your web browser. Note that the port number might be different based on your installation.
Data Storage in Docker
This tutorial uses Docker named volumes to guarantee the persistance of your data. This might make it difficult to know exactly where your data is stored in your machine if this is your first time using Docker. Alternatively, you can replace the volume name with a absolute path on your host machine to link your container data to a folder in your computer using a bind mount.
Example: change -v open-webui:/app/backend/data
to -v /path/to/folder:/app/backend/data
Ensure you have the proper access rights to the folder on your host machine.
Visit the Docker documentation to understand more about volumes and bind mounts.
Installation with Default Configuration
-
If Ollama is on your computer, use this 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
-
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: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
-
To run Open WebUI with Nvidia GPU support, use this command:
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
This will result in a faster Bundled Ollama, faster Speech-To-Text and faster RAG embeddings if using SentenceTransformers.
Installation for OpenAI API Usage Only
-
If you're only using OpenAI API, use this command:
docker run -d -p 3000:8080 -e OPENAI_API_KEY=your_secret_key -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Installing Open WebUI with Bundled Ollama Support
This installation method uses a single container image that bundles Open WebUI with Ollama, allowing for a streamlined setup via a single command. Choose the appropriate command based on your hardware setup:
-
With GPU Support: Utilize GPU resources by running the following command:
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
-
For CPU Only: If you're not using a GPU, use this command instead:
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 facilitate a built-in, hassle-free installation of both Open WebUI and Ollama, ensuring that you can get everything up and running swiftly.
After installation, you can access Open WebUI at http://localhost:3000. Enjoy! 😄
Manual Installation
Installation with pip
(Beta)
For users who prefer to use Python's package manager pip
, Open WebUI offers a installation method. Python 3.11 is required for this method.
-
Install Open WebUI: Open your terminal and run the following command:
pip install open-webui
-
Start Open WebUI: Once installed, start the server using:
open-webui serve
This method installs all necessary dependencies and starts Open WebUI, allowing for a simple and efficient setup. After installation, you can access Open WebUI at http://localhost:8080. Enjoy! 😄
Install from Open WebUI GitHub Repo
Open WebUI consists of two primary components: the frontend and the backend (which serves as a reverse proxy, handling static frontend files, and additional features). Both need to be running concurrently for the development environment.
Requirements 📦
Build and Install 🛠️
Run the following commands to install:
For Linux/macOS:
git clone https://github.com/open-webui/open-webui.git
cd open-webui/
# Copying required .env file
cp -RPp .env.example .env
# Building Frontend Using Node
npm install
npm run build
cd ./backend
# Optional: To install using Conda as your development environment, follow these instructions:
# Create and activate a Conda environment
conda create --name open-webui-env python=3.11
conda activate open-webui-env
# Install dependencies
pip install -r requirements.txt -U
# Start the application
bash start.sh
For Windows:
git clone https://github.com/open-webui/open-webui.git
cd open-webui
copy .env.example .env
npm install
npm run build
cd .\backend
# Optional: To install using Conda as your development environment, follow these instructions:
# Create and activate a Conda environment
conda create --name open-webui-env python=3.11
conda activate open-webui-env
pip install -r requirements.txt -U
start.bat
You should have Open WebUI up and running at http://localhost:8080/. Enjoy! 😄
Docker Compose
Using Docker Compose
-
If you don't have Ollama yet, use Docker Compose for easy installation. Run this command:
docker compose up -d --build
-
For Nvidia GPU Support: Use an additional Docker Compose file:
docker compose -f docker-compose.yaml -f docker-compose.gpu.yaml up -d --build
-
For AMD GPU Support: Some AMD GPUs require setting an environment variable for proper functionality:
HSA_OVERRIDE_GFX_VERSION=11.0.0 docker compose -f docker-compose.yaml -f docker-compose.amdgpu.yaml up -d --build
AMD GPU Support with HSA_OVERRIDE_GFX_VERSION
For AMD GPU users encountering compatibility issues, setting the
HSA_OVERRIDE_GFX_VERSION
environment variable is crucial. This variable instructs the ROCm platform to emulate a specific GPU architecture, ensuring compatibility with various AMD GPUs not officially supported. Depending on your GPU model, adjust theHSA_OVERRIDE_GFX_VERSION
as follows:- For RDNA1 & RDNA2 GPUs (e.g., RX 6700, RX 680M): Use
HSA_OVERRIDE_GFX_VERSION=10.3.0
. - For RDNA3 GPUs: Set
HSA_OVERRIDE_GFX_VERSION=11.0.0
. - For older GCN (Graphics Core Next) GPUs: The version to use varies. GCN 4th gen and earlier might require different settings, such as
ROC_ENABLE_PRE_VEGA=1
for GCN4, orHSA_OVERRIDE_GFX_VERSION=9.0.0
for Vega (GCN5.0) emulation.
Ensure to replace
<version>
with the appropriate version number based on your GPU model and the guidelines above. For a detailed list of compatible versions and more in-depth instructions, refer to the ROCm documentation and the openSUSE Wiki on AMD GPGPU.Example command for RDNA1 & RDNA2 GPUs:
HSA_OVERRIDE_GFX_VERSION=10.3.0 docker compose -f docker-compose.yaml -f docker-compose.amdgpu.yaml up -d --build
- For RDNA1 & RDNA2 GPUs (e.g., RX 6700, RX 680M): Use
-
To Expose Ollama API: Use another Docker Compose file:
docker compose -f docker-compose.yaml -f docker-compose.api.yaml up -d --build
Using run-compose.sh
Script (Linux or Docker-Enabled WSL2 on Windows)
-
Give execute permission to the script:
chmod +x run-compose.sh
-
For CPU-only container:
./run-compose.sh
-
For GPU support (read the note about GPU compatibility):
./run-compose.sh --enable-gpu
-
To build the latest local version, add
--build
:./run-compose.sh --enable-gpu --build
Installing with Podman
Rootless (Podman) local-only Open WebUI with Systemd service and auto-update
Consult the Docker documentation because much of the configuration and syntax is interchangeable with Podman. See also rootless_tutorial. This example requires the slirp4netns network backend to facilitate server listen and Ollama communication over localhost only.
Rootless container execution with Podman (and Docker/ContainerD) does not support AppArmor confinment. This may increase the attack vector due to requirement of user namespace. Caution should be exercised and judement (in contrast to the root daemon) rendered based on threat model.
-
Pull the latest image:
podman pull ghcr.io/open-webui/open-webui:main
-
Create a new container using desired configuration:
note-p 127.0.0.1:3000:8080
ensures that we listen only on localhost,--network slirp4netns:allow_host_loopback=true
permits the container to access Ollama when it also listens strictly on localhost.--add-host=ollama.local:10.0.2.2 --env 'OLLAMA_BASE_URL=http://ollama.local:11434'
adds a hosts record to the container and configures open-webui to use the friendly hostname.10.0.2.2
is the default slirp4netns address used for localhost mapping.--env 'ANONYMIZED_TELEMETRY=False'
isn't necessary since Chroma telemetry has been disabled in the code but is included as an example.podman create -p 127.0.0.1:3000:8080 --network slirp4netns:allow_host_loopback=true --add-host=ollama.local:10.0.2.2 --env 'OLLAMA_BASE_URL=http://ollama.local:11434' --env 'ANONYMIZED_TELEMETRY=False' -v open-webui:/app/backend/data --label io.containers.autoupdate=registry --name open-webui ghcr.io/open-webui/open-webui:main
notePodman 5.0 has updated the default rootless network backend to use the more performant pasta. While
slirp4netns:allow_host_loopback=true
still achieves the same local-only intention, it's now recommended use a simple TCP forward instead like:--network=pasta:-T,11434 --add-host=ollama.local:127.0.0.1
. Full example:podman create -p 127.0.0.1:3000:8080 --network=pasta:-T,11434 --add-host=ollama.local:127.0.0.1 --env 'OLLAMA_BASE_URL=http://ollama.local:11434' --env 'ANONYMIZED_TELEMETRY=False' -v open-webui:/app/backend/data --label io.containers.autoupdate=registry --name open-webui ghcr.io/open-webui/open-webui:main
-
Prepare for systemd user service:
mkdir -p ~/.config/systemd/user/
-
Generate user service with Podman:
podman generate systemd --new open-webui > ~/.config/systemd/user/open-webui.service
-
Reload systemd configuration:
systemctl --user daemon-reload
-
Enable and validate new service:
systemctl --user enable open-webui.service
systemctl --user start open-webui.service
systemctl --user status open-webui.service -
Enable and validate Podman auto-update:
systemctl --user enable podman-auto-update.timer
systemctl --user enable podman-auto-update.service
systemctl --user status podman-auto-update.timerDry run with the following command (omit
--dry-run
to force an update):podman auto-update --dry-run
This process is compatible with Windows 11 WSL deployments when using Ollama within the WSL environment or using the Ollama Windows Preview. When using the native Ollama Windows Preview version, one additional step is required: enable mirrored networking mode.
Enabling Windows 11 mirrored networking
- Populate
%UserProfile%\.wslconfig
with:[wsl2]
networkingMode=mirrored - Restart WSL:
wsl --shutdown
Alternative Installation Methods
For other ways to install, like using Kustomize or Helm, check out INSTALLATION. Join our Open WebUI Discord community for more help and information.
Updating your Docker Installation
For detailed instructions on manually updating your local Docker installation of Open WebUI, including steps for those not using Watchtower and updates via Docker Compose, please refer to our dedicated guide: UPDATING.
For a quick update with Watchtower, use the command below. Remember to replace open-webui
with your actual container name if it differs.
docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui
In the last part of the command, replace open-webui
with your container name if it is different.
After updating Open WebUI, you might need to refresh your browser cache to see the changes.