This guide deploys Open WebUI with Docker Compose on Debian 10 to latest stable, Ubuntu LTS, and RHEL 9+ compatible hosts.
Current Stable Version: v0.8.9 (March 2026)
- name: Deploy Open WebUI
hosts: open-webui
become: true
vars:
app_root: /opt/open-webui
app_port: 8080
openwebui_version: "v0.8.9" # Use versioned tag for production
tasks:
- name: Install Docker on Debian/Ubuntu
apt:
name:
- docker.io
- docker-compose-plugin
state: present
update_cache: true
when: ansible_os_family == "Debian"
- name: Install Docker on RHEL family
dnf:
name:
- docker
- docker-compose-plugin
state: present
when: ansible_os_family == "RedHat"
- name: Enable and start Docker
service:
name: docker
state: started
enabled: true
- name: Create app directory
file:
path: "{{ app_root }}"
state: directory
mode: "0755"
- name: Write Docker Compose file
copy:
dest: "{{ app_root }}/docker-compose.yml"
mode: "0644"
content: |
services:
open-webui:
image: ghcr.io/open-webui/open-webui:{{ openwebui_version }}
container_name: open-webui
restart: unless-stopped
ports:
- "{{ app_port }}:8080"
volumes:
- open-webui:/app/backend/data
environment:
- OLLAMA_BASE_URL=http://host.docker.internal:11434
volumes:
open-webui:
- name: Start application stack
command: docker compose up -d
args:
chdir: "{{ app_root }}"
- name: Deploy Open WebUI with GPU
hosts: open-webui
become: true
vars:
app_root: /opt/open-webui
app_port: 8080
openwebui_version: "v0.8.9"
tasks:
- name: Install Docker on Debian/Ubuntu
apt:
name:
- docker.io
- docker-compose-plugin
state: present
update_cache: true
when: ansible_os_family == "Debian"
- name: Install Docker on RHEL family
dnf:
name:
- docker
- docker-compose-plugin
state: present
when: ansible_os_family == "RedHat"
- name: Enable and start Docker
service:
name: docker
state: started
enabled: true
- name: Create app directory
file:
path: "{{ app_root }}"
state: directory
mode: "0755"
- name: Write Docker Compose file (with GPU)
copy:
dest: "{{ app_root }}/docker-compose.yml"
mode: "0644"
content: |
services:
open-webui:
image: ghcr.io/open-webui/open-webui:{{ openwebui_version }}-cuda
container_name: open-webui
restart: unless-stopped
ports:
- "{{ app_port }}:8080"
volumes:
- open-webui:/app/backend/data
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
environment:
- OLLAMA_BASE_URL=http://host.docker.internal:11434
volumes:
open-webui:
- name: Start application stack
command: docker compose up -d
args:
chdir: "{{ app_root }}"
- name: Deploy Open WebUI Production Stack
hosts: open-webui
become: true
vars:
app_root: /opt/open-webui
app_port: 8080
openwebui_version: "v0.8.9"
ollama_base_url: "http://ollama:11434"
cors_origin: "https://openwebui.example.com"
uvicorn_workers: 4
tasks:
- name: Install Docker on Debian/Ubuntu
apt:
name:
- docker.io
- docker-compose-plugin
state: present
update_cache: true
when: ansible_os_family == "Debian"
- name: Install Docker on RHEL family
dnf:
name:
- docker
- docker-compose-plugin
state: present
when: ansible_os_family == "RedHat"
- name: Enable and start Docker
service:
name: docker
state: started
enabled: true
- name: Create app directory
file:
path: "{{ app_root }}"
state: directory
mode: "0755"
- name: Write Docker Compose file (production)
copy:
dest: "{{ app_root }}/docker-compose.yml"
mode: "0644"
content: |
services:
open-webui:
image: ghcr.io/open-webui/open-webui:{{ openwebui_version }}
container_name: open-webui
restart: unless-stopped
ports:
- "{{ app_port }}:8080"
volumes:
- open-webui:/app/backend/data
environment:
- OLLAMA_BASE_URL={{ ollama_base_url }}
- VECTOR_DB=chroma
- CHROMA_HTTP_HOST=chromadb
- CHROMA_HTTP_PORT=8000
- UVICORN_WORKERS={{ uvicorn_workers }}
- CORS_ALLOW_ORIGIN={{ cors_origin }}
depends_on:
- ollama
- chromadb
ollama:
image: ollama/ollama:latest
container_name: ollama
volumes:
- ollama:/root/.ollama
restart: unless-stopped
chromadb:
image: chromadb/chroma:latest
container_name: chromadb
ports:
- "8000:8000"
volumes:
- chromadb:/chroma/chroma
restart: unless-stopped
volumes:
open-webui:
ollama:
chromadb:
- name: Start application stack
command: docker compose up -d
args:
chdir: "{{ app_root }}"
| Variable | Default | Description |
|---|---|---|
app_root |
/opt/open-webui |
Application installation directory |
app_port |
8080 |
External port for Open WebUI |
openwebui_version |
v0.8.9 |
Open WebUI version tag (use versioned for production) |
ollama_base_url |
http://host.docker.internal:11434 |
Ollama backend URL |
cors_origin |
* |
CORS allowed origins (restrict in production) |
uvicorn_workers |
1 |
Number of worker processes (requires external ChromaDB) |
UVICORN_WORKERS > 1, you must use external ChromaDB HTTP server (not default SQLite-backed).Any questions?
Feel free to contact us. Find all contact information on our contact page.