Local AI & Private LLMs⭐ 70k+ GitHubLicense: MIT

How to Self-Host Ollama & Open-WebUI with Docker Compose

Open-Source Alternative to: ChatGPT Plus & Claude Pro ($20/mo)

Combine Ollama's local model engine with Open-WebUI's feature-rich interface: document RAG, web search integration, voice mode, multi-model chat, and user management on your own server.

MINIMUM HARDWARE
8 GB RAM (16 GB for 8B models), 4 vCPU, 50 GB Disk
ESTIMATED SAVINGS
$2,400/year
OFFICIAL REPOSITORY
github.com/open-webui/open-webui ↗

Production Docker Compose File

Copy this tested configuration directly into your server's directory:

🐳 docker-compose.yml
version: '3.8'
services:
  ollama:
    image: ollama/ollama:latest
    restart: always
    volumes:
      - ollama_models:/root/.ollama
    ports:
      - '11434:11434'
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    restart: always
    ports:
      - '3000:8080'
    environment:
      - OLLAMA_BASE_URL=http://ollama:11434
    volumes:
      - open_webui_data:/app/backend/data
    depends_on:
      - ollama
volumes:
  ollama_models:
  open_webui_data:

Quick Deployment Steps

1. docker compose up -d 2. Run in container: docker exec -it $(docker ps -qf 'ancestor=ollama/ollama:latest') ollama pull llama3.2 3. Open http://localhost:3000 and start chatting locally!

Key Advantages & Trade-Offs

✓ Why Self-Host Ollama & Open-WebUI?

  • Complete data confidentiality: zero prompts or documents leave your machine
  • Run state-of-the-art open weights (DeepSeek-R1, Llama 3.3, Qwen 2.5)
  • RAG document search and OpenAI-compatible API proxy

⚠ What to Keep in Mind

  • Requires decent hardware (Apple Silicon Mac or NVIDIA GPU for fast token generation)
  • High storage requirement for multiple model weights (4 GB - 40 GB per model)

More Self-Hosted Alternatives

Knowledge & Workspace
AppFlowy
Replaces Notion ($10/seat/mo)
Project Management
Plane
Replaces Jira ($8.50/seat/mo) & Linear
No-Code Database
NocoDB
Replaces Airtable ($20/seat/mo)