Ollama WebUI Docker

Run Ollama and Open WebUI together in Docker for private local access and remote browsing.

The short answer

Ollama WebUI Docker is a local AI stack for Self-hosted AI with Docker Compose. Run Ollama and Open WebUI together in Docker for private local access and remote browsing. It combines 4 components, is rated intermediate, and takes about 25 minutes to set up. Expect around $1,500 in hardware and $0/month versus cloud.

Cost
~$1,500
$0/mo vs cloud
Difficulty
intermediate
Setup time
~25 min
Use case
Self-hosted AI with Docker Compose
ModelsQwen3 5 9b
HardwareRtx 4090

~$1,500 hardware · $0/mo vs cloud

Ollama WebUI Docker

This stack runs Ollama and Open WebUI together in Docker Compose. It is ideal for users who want a self-hosted local AI web interface with an Ollama back end.

What you get

  • Local AI web UI served through Open WebUI
  • Ollama model hosting in Docker
  • Optional remote access via Cloudflare Tunnel

Architecture

ComponentRole
Open WebUIBrowser-based model UI and chat client
OllamaLocal model server and GPU runtime
Cloudflare TunnelOptional remote access to the web UI

Prerequisites

  • Linux host with NVIDIA GPU support (Docker + nvidia-container-runtime)
  • Docker Compose installed
  • Ollama and Open WebUI compatible with your GPU platform

Setup

  1. Create a docker-compose.yml file.
version: "3.8"
services:
  webui:
    image: ghcr.io/open-webui/open-webui:main
    expose:
      - 8080/tcp
    ports:
      - 8080:8080/tcp
    environment:
      - OLLAMA_BASE_URL=http://ollama:11434
    volumes:
      - open-webui:/app/backend/data
    depends_on:
      - ollama
 
  ollama:
    image: ollama/ollama
    expose:
      - 11434/tcp
    ports:
      - 11434:11434/tcp
    healthcheck:
      test: ollama --version || exit 1
    command: serve
    volumes:
      - ollama:/root/.ollama
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              device_ids: ["all"]
              capabilities: [gpu]
 
  tunnel:
    image: cloudflare/cloudflared:latest
    restart: unless-stopped
    environment:
      - TUNNEL_URL=http://webui:8080
    command: tunnel --no-autoupdate
    depends_on:
      - webui
 
volumes:
  ollama:
  open-webui:
  1. Start the stack.
docker compose up -d
  1. Pull a model into Ollama.
docker exec -it <ollama_container> ollama pull qwen3.5:9b
  1. Open the UI.
  • Local: http://localhost:8080
  • Remote: configure Cloudflare Tunnel as needed

Use it

  • Private local AI access from any browser
  • Team demos without exposing a public API
  • Remote personal access using Cloudflare Tunnel

Troubleshooting

  • WebUI can’t reach Ollama → confirm the OLLAMA_BASE_URL points to http://ollama:11434.
  • GPU not available → check Docker GPU permissions and nvidia-smi.
  • Model not loaded → run the pull command inside the Ollama container.

Swap components

Frequently asked

What is the Ollama WebUI Docker stack for?

Run Ollama and Open WebUI together in Docker for private local access and remote browsing. It is purpose-built for Self-hosted AI with Docker Compose and runs entirely on your own hardware.

How much does the Ollama WebUI Docker stack cost?

Ollama WebUI Docker costs around $1,500 in hardware up front and $0/month to run, since everything is self-hosted — no per-token or subscription fees versus a cloud equivalent.

How long does it take to set up Ollama WebUI Docker?

Plan for roughly 25 minutes. The stack is rated intermediate.

What do I need to run Ollama WebUI Docker?

Ollama WebUI Docker is built from 2 tool(s), 1 model(s), 1 hardware item(s). Each is listed below with a link.