All-in-one Docker image combining Ollama and Open WebUI in a single container, with automatic Ollama updates on every boot.
docker run -d \
--gpus all \
-p 3000:8080 \
-v ollama:/root/.ollama \
-v open-webui:/app/backend/data \
--name open-webui \
--restart always \
psauxw/ollama-webui:latest
Then open http://localhost:3000 in your browser.
Create a docker-compose.yml file:
services:
open-webui:
image: psauxw/ollama-webui:latest
container_name: open-webui
restart: always
ports:
- 3000:8080
volumes:
- ollama:/root/.ollama
- open-webui:/app/backend/data
extra_hosts:
- host.docker.internal:host-gateway
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities:
- gpu
volumes:
ollama:
open-webui:
Then run:
docker compose up -d
If you have other containers (e.g. a Discord bot) that need to reach Open WebUI internally, put them on a shared network:
services:
open-webui:
image: psauxw/ollama-webui:latest
container_name: open-webui
restart: always
ports:
- 3000:8080
volumes:
- ollama:/root/.ollama
- open-webui:/app/backend/data
extra_hosts:
- host.docker.internal:host-gateway
networks:
- shared-net
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities:
- gpu
volumes:
ollama:
open-webui:
networks:
shared-net:
external: true
Create the network first:
docker network create shared-net
Other containers on shared-net can then reach Open WebUI at http://open-webui:8080.
| Volume | Description |
|---|---|
/root/.ollama | Ollama models and configuration |
/app/backend/data | Open WebUI users, chats, and settings |
Both volumes persist across container restarts and image updates. To upgrade to a newer image without losing data:
docker compose pull
docker compose up -d
| Port | Service |
|---|---|
3000 (host) → 8080 (container) | Open WebUI |
11434 | Ollama API (optional, expose if needed) |
To also expose the Ollama API to your host, add 11434:11434 under ports.
| Variable | Default | Description |
|---|---|---|
OLLAMA_HOST | 0.0.0.0 | Ollama listen address |
OLLAMA_ORIGINS | * | Allowed CORS origins |
DATA_DIR | /app/backend/data | Open WebUI data directory |
The container automatically pulls and installs the latest Ollama binary every time it starts. To update Open WebUI, pull the latest image:
docker compose pull && docker compose up -d
Content type
Image
Digest
sha256:4264e5b03…
Size
8.8 GB
Last updated
4 days ago
docker pull psauxw/ollama-webui