Back openDesk Edu for a sovereign, open-source education — every vote counts.
Vote nowSave products you love by clicking the heart icon.
Production-ready self-hosted AI inference stack with Ollama, Open WebUI, and LiteLLM — unified API gateway, GPU-accelerated inference, and a ChatGPT-compatible chat interface.
No payment required
The information, code snippets, configuration files, and instructions provided in this product are shared for educational and informational purposes only. While every effort has been made to ensure accuracy, you are solely responsible for reviewing, testing, and adapting any code or configurations to your own environment before using them in production.
No liability: The author(s) shall not be held liable for any damages, data loss, system outages, security breaches, or other issues arising from the use, misuse, or inability to use the code, configurations, or instructions provided in this product. By downloading or using this product, you acknowledge that you understand and accept these terms.
Produktionsreife, selbstgehostete KI-Inferenz-Stack mit Ollama, Open WebUI und LiteLLM — einheitlicher API-Gateway, GPU-beschleunigte Inferenz und ein ChatGPT-kompatibles Chat-Interface.
Production-ready self-hosted AI inference stack with Ollama, Open WebUI, and LiteLLM — a unified API gateway, GPU-accelerated LLM inference, and a ChatGPT-compatible chat interface. Deploy in minutes on any Docker host with an NVIDIA GPU.
┌──────────────────────────────────────────────────────┐
│ Open WebUI (Port 3000) │
│ ChatGPT-like chat interface │
└──────────────────┬───────────────────────────────────┘
│ OpenAI-compatible API
▼
┌──────────────────────────────────────────────────────┐
│ LiteLLM Proxy (Port 4000) │
│ Model routing, rate limiting, retries │
└──────────────────┬───────────────────────────────────┘
│ Native API
▼
┌──────────────────────────────────────────────────────┐
│ Ollama (Port 11434) │
│ GPU-accelerated LLM inference engine │
└──────────────────────────────────────────────────────┘
Instead of connecting Open WebUI directly to Ollama, LiteLLM acts as an API gateway:
| Model | Parameters | VRAM | Quality | Speed (RTX 3090) | | ----------------- | ---------- | ------- | -------------- | ------------------- | | Qwen 3.6 | 7.6B | 6 GB | Good | ~80 tok/s | | Mistral Small 3.1 | 24B | 16 GB | Very Good | ~40 tok/s | | DeepSeek V4 | 67B | 42 GB | Excellent | ~15 tok/s | | Llama 4 | 8B/70B | 6/42 GB | Good/Excellent | ~75/12 tok/s |
# 1. Configure
cp .env.example .env
# Edit .env — fill in WEBUI_SECRET_KEY, LITELLM_MASTER_KEY
# 2. Pull a model (requires 15-20GB for llama3.2)
docker compose run --rm ollama ollama pull llama3.2:latest
# 3. Start the stack
docker compose up -d
# 4. Open the dashboard
open http://localhost:3000 # Open WebUI
open http://localhost:4000 # LiteLLM proxy
nvidia-container-toolkit)| Variable | Required | Default | Description |
|---|---|---|---|
| WEBUI_SECRET_KEY | Required | — | Open WebUI encryption key |
| LITELLM_MASTER_KEY | Required | — | LiteLLM admin API key |
| OLLAMA_KEEP_ALIVE | No | 5m | Time to keep models loaded in memory |
| OLLAMA_NUM_PARALLEL | No | 2 | Parallel request handling per model |
| OLLAMA_MAX_LOADED_MODELS | No | 3 | Max models kept in GPU memory |
| ENABLE_SIGNUP | No | false | Allow new user registration |
| DEFAULT_MODELS | No | llama3.2:latest | Default model in Open WebUI |
| LITELLM_DB_URL | No | — | Optional PostgreSQL URL for usage tracking |
WEBUI_SECRET_KEY and LITELLM_MASTER_KEYENABLE_SIGNUP=false)WEBUI_AUTH=true)nvidia-smi -l 1latest or main)Download the zip, extract it, configure .env, run docker compose up -d.