Skip to main content
92 Nodes
Back to Blog

Local AI Stack with Docker Compose: Ollama, Open WebUI and Qdrant

Published on September 29, 2026 by Muhammad Raza Bangi

A Local AI Stack, Generated and Config-Validated

Our own Docker Compose Generator ships a "Local RAG Starter" recipe: Ollama for running local models, Open WebUI for a ChatGPT-style interface, and Qdrantfor vector storage. This post shows the exact file that recipe produces, the exact command we used to validate it, and exactly what that validation does and doesn't prove.

Everything below — the YAML, the settings, the validation output — is real output from our shipped tool, not hand-written for this post.

What Was Actually Tested (and What Wasn't)

Validated configuration; containers were not started: We ran docker compose config against this exact file. That command parses the YAML, resolves environment variable interpolation, and checks that the service graph (images, ports, volumes, depends_on, healthchecks) is internally consistent — and it passed cleanly. It does not start any container, pull any image, download any model, or confirm that Ollama, Open WebUI and Qdrant actually communicate with each other while running. We have not done that runtime test. If you need that guarantee, follow the setup steps below and verify it yourself — we tell you exactly what to check.

We're explicit about this distinction because "the config is valid" and "the stack works" are different claims, and conflating them is exactly the kind of overstatement we're trying to avoid in our own content.

Exact Generator Settings Used

To reproduce this file yourself in the Docker Compose Generator:

The Generated compose.yaml

This is the unedited output of that recipe:

# Generated with the 92 Nodes Docker Compose Generator
# https://92nodes.com/resources/docker-compose-generator
# Review before use: check credentials, resource limits, backups, and deployment-specific requirements.
services:
  ollama:
    image: ollama/ollama:0.34.2
    ports:
      - 11434:11434
    volumes:
      - ollama_data:/root/.ollama
    restart: unless-stopped
    networks:
      - app-network
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    ports:
      - 3000:8080
    environment:
      OLLAMA_BASE_URL: http://ollama:11434
    volumes:
      - open_webui_data:/app/backend/data
    restart: unless-stopped
    depends_on:
      ollama:
        condition: service_started
    networks:
      - app-network
  qdrant:
    image: qdrant/qdrant:v1.19.1
    ports:
      - 6333:6333
    volumes:
      - qdrant_data:/qdrant/storage
    restart: unless-stopped
    networks:
      - app-network
  db:
    image: postgres:16
    environment:
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: ${DB_DATABASE}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    restart: unless-stopped
    healthcheck:
      test:
        - CMD-SHELL
        - pg_isready -U ${DB_USERNAME} -d ${DB_DATABASE}
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 10s
    networks:
      - app-network
  redis:
    image: redis:7
    volumes:
      - redis_data:/data
    restart: unless-stopped
    healthcheck:
      test:
        - CMD
        - redis-cli
        - ping
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - app-network
name: local-rag-starter
volumes:
  ollama_data: {}
  open_webui_data: {}
  postgres_data: {}
  qdrant_data: {}
  redis_data: {}
networks:
  app-network: {}

The matching .env file we used for validation (placeholder values, not real credentials):

DB_USERNAME=ragapp
DB_PASSWORD=devpassword
DB_DATABASE=ragdb

Validating the Configuration

With the two files above in the same directory, we ran:

docker compose config

It exited successfully and printed the fully resolved configuration. An excerpt showing the environment variables resolving and the depends_on condition between open-webui and ollama:

db:
  environment:
    POSTGRES_DB: ragdb
    POSTGRES_PASSWORD: devpassword
    POSTGRES_USER: ragapp
  healthcheck:
    test:
      - CMD-SHELL
      - pg_isready -U ragapp -d ragdb
    ...
ollama:
  image: ollama/ollama:0.34.2
  ports:
    - mode: ingress
      target: 11434
      published: "11434"
      protocol: tcp
  ...
open-webui:
  depends_on:
    ollama:
      condition: service_started
      required: true
  environment:
    OLLAMA_BASE_URL: http://ollama:11434
  ...

This confirms the file is well-formed Compose Specification YAML that a real Docker Compose parser accepts — nothing more.

Required vs. Optional Services

Ollama, Open WebUI and Qdrant are the core trio — together they give you a working local chat interface backed by open models, plus a vector database you can query directly. These three are wired together: Open WebUI depends on Ollama and is configured with its address.

Postgres and Redis are optional, and it's worth being precise about what "optional" means here: in the generated file, neither is connected to anything. There's no environment variable pointing an AI service at the database, and no depends_onlinking them to Ollama, Open WebUI or Qdrant. They exist as ready-to-use infrastructure for when you build a real application layer on top of this stack — storing document metadata, tracking ingestion job state, or caching — which this recipe deliberately doesn't attempt to do for you. If you don't have that layer planned yet, the "Minimal" variant (just the three AI services) is the more honest starting point.

Hardware and Model Requirements

This configuration runs Ollama in CPU-only mode— that's the generator's default, and it's what we validated. No GPU reservation is present in the file above.

Setup Steps

  1. Generate compose.yaml and .env.example as described above, or copy the file from this post.
  2. Copy .env.example to .env and fill in real values for the database credentials (skip this if you used the Minimal variant).
  3. Run docker compose up -d to start every service in the background.
  4. Run docker compose ps and confirm every container reaches a running (and, where a healthcheck exists, healthy) state.
  5. Pull a small model: docker exec -it ollama ollama pull llama3.2:1b (swap in whichever model you prefer).
  6. Open http://localhost:3000 for Open WebUI, select the model you pulled, and send a test message.
  7. Open http://localhost:6333/dashboard to confirm Qdrant's own dashboard is reachable.

What to Test Yourself After Startup

Since we validated the configuration but didn't run it, here's exactly what we'd check if we were verifying this stack ourselves:

Troubleshooting

Scope and Limitations

Our generator states this directly in its own recipe description, and it's worth repeating here: this stack provides infrastructure only. It does not implement document ingestion, chunking, embedding generation, retrieval logic, or prompt orchestration. Building an actual retrieval-augmented chatbot on top of it — one that answers questions grounded in a document you upload — is separate work this post does not cover and this configuration does not attempt.

What we can honestly claim: the file is syntactically valid, internally consistent Compose Specification YAML, generated by a real, shipped tool, and confirmed with a real Docker Compose parser. What we can't yet claim: that the three AI services function together at runtime, or that this is a working RAG chatbot. That gap is exactly what the setup and testing steps above are for.

Frequently Asked Questions

Q: Was this stack actually run and tested end-to-end?

A: No. We generated the file with our own Docker Compose Generator and validated it with `docker compose config`, which confirms the YAML is syntactically valid, environment variables resolve, and the service graph (depends_on, healthchecks, volumes) is internally consistent. We did not run `docker compose up`, pull a model, or verify that Ollama, Open WebUI and Qdrant actually talk to each other at runtime. Treat the runtime behavior as unverified until you test it yourself.

Q: Do I need a GPU to run this?

A: No — this configuration runs Ollama in CPU-only mode, which is the generator's default. It will work without a GPU, but inference will be slower, especially for larger models. The generator can also produce NVIDIA or AMD GPU passthrough configuration if you select it, but that variant is not what we generated or validated here.

Q: What are Postgres and Redis for if they aren't connected to anything?

A: In the generator's "With PostgreSQL + Redis" variant, both are added as available infrastructure for when you build a real application layer on top — storing document metadata, tracking ingestion jobs, or caching. Out of the box, neither is wired to Ollama, Open WebUI or Qdrant; there's no environment variable or depends_on connecting them. If you don't plan to build that layer yet, use the "Minimal" variant instead.

Q: What model should I start with?

A: A small model — something in the 1-3B parameter range — so you can confirm the stack works end-to-end before waiting on a larger download or slower CPU inference. Pull it with `ollama pull <model-name>` after the containers are running, then select it in Open WebUI.

Q: Is this ready to use as a RAG chatbot for my own documents?

A: Not as-is. This stack provides infrastructure only — Ollama for local models, Open WebUI for a chat interface, and Qdrant for vector storage. It does not include document ingestion, chunking, embedding generation, or retrieval logic; you'd need to build or add that layer yourself.

Q: Is my data sent to 92nodes or anywhere else?

A: No. Everything in this stack runs in Docker containers on your own machine. The Docker Compose Generator itself also runs entirely in your browser — your configuration is never uploaded to a server.

Conclusion

A generator that produces valid, reviewable infrastructure is a genuinely useful starting point — but it's not the same thing as a finished, tested application, and we'd rather say that plainly than let a validated config file get mistaken for a running product.

Want to generate your own variant of this stack — with a GPU, without Postgres/Redis, or combined with one of our other AI & Automation recipes? Try the Docker Compose Generator yourself, or if you need this built into a real, working AI application, that's what our AI solutions team does.

Further reading: Docker's official documentation for docker compose config, Ollama's GitHub repository, and Qdrant's documentation.

Need a Working AI Application, Not Just Infrastructure?

Let's talk about what you're actually trying to build.

Contact 92nodes

Written by

Muhammad Raza Bangi

Founder · Engineering

View profile