Skip to content
Courses/Self-hosted AI automation for small businesses/Docker Compose for a Complete Local AI Stack

Docker Compose for a Complete Local AI Stack

A useful local stack shouldn't be a folder full of loose commands. Docker Compose lets you spin up the interface, automation, and vector database with volumes, profiles, and a clear backup path.

  • Separate base services from optional services using profiles.
  • Persist state in durable volumes.
  • Avoid the classic "it works in my terminal, but I don't know how to repeat it" problem.
Terminal
services:
  qdrant:
    image: qdrant/qdrant:latest
    ports: ["6333:6333"]
    volumes:
      - qdrant_data:/qdrant/storage

  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    ports: ["3000:8080"]
    volumes:
      - open_webui_data:/app/backend/data
    environment:
      - OLLAMA_BASE_URL=http://host.docker.internal:11434

  n8n:
    image: n8nio/n8n:latest
    profiles: ["automation"]
    ports: ["5678:5678"]
    volumes:
      - n8n_data:/home/node/.n8n
    environment:
      - N8N_ENCRYPTION_KEY=change-me

volumes:
  qdrant_data:
  open_webui_data:
  n8n_data:
Terminal
# Base: Qdrant + Open WebUI
docker compose up -d

# Add automation with n8n
docker compose --profile automation up -d

# View status and logs
docker compose ps
docker compose logs -f open-webui

# Minimum backup
docker run --rm -v open_webui_data:/data -v "$PWD:/backup" alpine   tar czf /backup/open-webui-backup.tgz /data

Official sources

  • Docker Compose
  • Docker Compose profiles
  • Open WebUI documentation
  • Qdrant documentation
  • n8n Docs
Complete Aulafy mapSee how this lesson fits without leaving your path.

Complete Aulafy map

How all courses connect

This is not a checklist. Start with the foundation, choose an outcome, and go deeper only when your project needs more control.

  1. 1Understand
  2. 2Apply or build
  3. 3Operate with confidence
01

Choose an application

Turn the foundation into a visible outcome: a website, a business improvement, media, or an interactive experience.

Continue into the technical branch when you need to maintain code, data, or infrastructure.

02

Build with code

Prepare your environment, work with coding agents, and run models while keeping control of your projects.

This branch prepares you to design and operate reliable AI systems.

03

Take systems to production

Combine retrieval, agents, evaluation, security, deployment, and model adaptation when the problem requires it.

You do not need every course: choose the component your system needs and return as it grows.

View full catalogue