OpenWebUI + Ollama Deployment Guide (Ubuntu)¶
Overview¶
This guide documents the complete process for:
- Installing Docker Engine on Ubuntu
- Performing post-install configuration
- Deploying Ollama and Open WebUI using Docker Compose
- Managing and updating the deployment
This guide follows the official Docker documentation for Ubuntu installation and Linux post-install steps.
1. Install Docker Engine (Ubuntu)¶
Official documentation:
https://docs.docker.com/engine/install/ubuntu/
1.1 Set up Docker's apt repository.¶
# Add Docker's official GPG key:
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
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 repository to Apt sources:
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
1.2 Install the Docker packages.¶
The Docker service starts automatically after installation. To verify that Docker is running, use:
1.3 Verify Docker Installation¶
This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits.
If successful, Docker is installed correctly.
2. Post-Installation Steps¶
Official documentation:
https://docs.docker.com/engine/install/linux-postinstall/
2.1 Run Docker Without sudo¶
Create the docker group (if it does not already exist):
Add your user to the docker group:
Apply the new group membership:
Verify Docker runs without sudo:
3. Deploy Ollama and Open WebUI with Docker Compose¶
We will use the official Docker Compose file:
https://github.com/open-webui/open-webui/blob/main/docker-compose.yaml
3.1 Create Deployment Directory¶
3.2 Download the Official docker-compose.yaml¶
3.3 Start the Stack¶
Verify containers are running:
3.4 Access Open WebUI¶
Open a web browser and navigate to:
You should see the Open WebUI interface.
Enter a username, Email and Password for the new Administrator account.
4. Pulling Models in Ollama¶
Models can be added directly through the WebUI.
-
Open your browser and navigate to:
-
Log in to Open WebUI.
-
Click your profile icon (top-right corner).
-
Navigate to Admin Panel.
-
Navigate to Settings.
-
Go to the Models section.
-
Click Manage Models in the top right corner (or similar option depending on version).
-
Browse all avalible models on ollama's online library
-
Use the tag found on the ollama site to download a new model
-
Select Pull Model.
-
Enter the model name exactly as it appears in Ollama’s model library
(example:llama3.1:latest,mistral,codellama). -
Click Download / Pull.
-
Wait for the download to complete. Progress will be shown in the UI.
-
Once finished, the model will appear in your model selection dropdown when starting a new chat.
5. Updating the Deployment¶
To update to the latest container versions:
6. Stopping the Stack¶
To stop containers without deleting volumes: