How to Run Local LLMs with Open WebUI on Docker (Ditch the 0/mo AI Subscriptions) A developer's guide on SelfHostStack demonstrates how to replace paid AI subscriptions like ChatGPT Plus and Claude Pro with a self-hosted setup using Open WebUI and Ollama on a low-cost VPS. The article provides a Docker Compose configuration, model pull commands, and benchmarks showing cost savings and privacy benefits, with options for hybrid access to frontier models via APIs. Originally published on SelfHostStack If you pay $20/month for ChatGPT Plus or Claude Pro, you are paying $240 every single year for: With modern quantized open-weight models Llama 3.1, Mistral NeMo, DeepSeek-Coder, and Qwen 2.5 , you can host your own private, unrestricted AI workspace on a low-cost VPS with Open WebUI and Ollama . In this guide, we'll walk through the complete deployment using Docker Compose, setup reverse proxy authentication, and benchmark token generation speeds. | Model / Setup | Cost | Privacy / Retention | Context & Feature Limits | |---|---|---|---| ChatGPT Plus / Claude Pro | $20/month $240/yr | Cloud training, data retained | Strict 3-hour message caps, hard rate limits | Open WebUI + Ollama VPS | ~$6 - $12/month VPS | 100% Private Zero telemetry | Unlimited messages, custom system prompts, RAG document chat | Hybrid Open WebUI + OpenRouter/DeepSeek API | ~$1 - $3/month Pay per token | Zero retention API options | Access to 100+ models in a unified ChatGPT-like UI | Open WebUI 70k+ GitHub stars is arguably the most polished open-source AI frontend available: Here is the exact production-ready docker-compose.yml to run Open WebUI paired with Ollama: version: '3.8' services: open-webui: image: ghcr.io/open-webui/open-webui:main container name: open-webui restart: always ports: - "3000:8080" environment: - OLLAMA BASE URL=http://ollama:11434 - WEBUI SECRET KEY=generate random secret string here - ENABLE SIGNUP=false Set to false after creating your admin account volumes: - webui-data:/app/backend/data depends on: - ollama ollama: image: ollama/ollama:latest container name: ollama restart: always ports: - "11434:11434" volumes: - ollama-models:/root/.ollama volumes: webui-data: ollama-models: For lightweight models like llama3.2:3b or qwen2.5-coder:1.5b , a standard 4GB RAM cloud instance works great. For larger 8B parameter models, choose a VPS with 8GB RAM and fast NVMe storage: SSH into your server and run: Install Docker Engine curl -fsSL https://get.docker.com | sh Create directory and start stack mkdir -p ~/ai-stack && cd ~/ai-stack nano docker-compose.yml paste the compose YAML above docker compose up -d Pull lightweight, high-performance models directly inside the Ollama container: Ultra-fast coding model Qwen 2.5 Coder 7B docker exec -it ollama ollama pull qwen2.5-coder:7b General reasoning model Llama 3.1 8B docker exec -it ollama ollama pull llama3.1:8b Extremely fast 3B model for low-resource VPS docker exec -it ollama ollama pull llama3.2:3b Use Caddy for automatic HTTPS: ai.yourdomain.com { reverse proxy localhost:3000 } If you need occasional access to frontier models Claude 3.5 Sonnet, GPT-4o, or DeepSeek-V3 for massive refactoring tasks, you don't need a $20/month subscription: Looking to replace other expensive developer and productivity tools? Explore our curated guides with verified Docker templates: