Skip to content

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.

sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

The Docker service starts automatically after installation. To verify that Docker is running, use:

sudo systemctl status docker

1.3 Verify Docker Installation

sudo docker run hello-world

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):

sudo groupadd docker

Add your user to the docker group:

sudo usermod -aG docker $USER

Apply the new group membership:

newgrp docker

Verify Docker runs without sudo:

docker run hello-world

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

mkdir -p ~/docker/openwebui
cd ~/docker/openwebui

3.2 Download the Official docker-compose.yaml

curl -O https://raw.githubusercontent.com/open-webui/open-webui/main/docker-compose.yaml

3.3 Start the Stack

docker compose up -d

Verify containers are running:

docker ps

3.4 Access Open WebUI

Open a web browser and navigate to:

http://<server-ip>:3000

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.

  1. Open your browser and navigate to:

    http://<server-ip>:3000
    

  2. Log in to Open WebUI.

  3. Click your profile icon (top-right corner).

  4. Navigate to Admin Panel.

  5. Navigate to Settings.

  6. Go to the Models section.

  7. Click Manage Models in the top right corner (or similar option depending on version).

  8. Browse all avalible models on ollama's online library

https://ollama.com/library
  1. Use the tag found on the ollama site to download a new model

  2. Select Pull Model.

  3. Enter the model name exactly as it appears in Ollama’s model library
    (example: llama3.1:latest, mistral, codellama).

  4. Click Download / Pull.

  5. Wait for the download to complete. Progress will be shown in the UI.

  6. 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:

docker compose pull
docker compose up -d

6. Stopping the Stack

To stop containers without deleting volumes:

docker compose down


Last update: 2026-03-02