Self-Hosting · Local AI
A Local AI Platform: Ollama + Open WebUI, RAG Included
Our Home Assistant voice guide uses a local LLM for one narrow job. This guide builds the general-purpose version: a private, ChatGPT-style chat interface running entirely on your hardware, able to answer questions about your own documents, with no account and no API bill. The stack is Ollama as the model server and Open WebUI as the front end — and the interesting part is matching models to the hardware you actually have.
Published Nov 20, 2026
The two pieces
Ollama (v0.40.16 at writing) is the model runtime: one command pulls a model from its library of roughly 270 families and serves it over a local API. It is built on llama.cpp, with an MLX backend on Apple Silicon — which matters, because Apple’s unified memory is currently the cheapest way to hold a large model. Open WebUI (v0.13.4) is the browser front end: multi-model chat, conversation history, per-user accounts, and document chat. One transparency note: since v0.6.6 Open WebUI’s license adds a branding-protection clause to its BSD base — the code is source-available and free to run, but it is no longer a plain OSI open-source license. For a home deployment that changes nothing operationally; it is still worth knowing.
Hardware: the memory rule
Local models are a memory game. Ollama’s own rule of thumb: 8 GB of RAM for ~7B models, 16 GB for ~13B, 32 GB for ~33B — the model must fit in RAM (or VRAM) with room for its context. In the current model generation that means: a typical NAS (8–16 GB) runs the small tier — Gemma 4’s E2B/E4B and Llama 3.2-class models — usefully but not instantly; a mini PC with 32 GB or an Apple Silicon Mac with unified memory is the sweet spot for the 12–14B class and the distilled DeepSeek-R1 reasoning models; and gpt-oss-120b or the biggest Qwen 3.x variants are workstation territory. A discrete GPU accelerates everything it can hold; a model split between VRAM and system RAM runs at the slower memory’s pace. Start with an 8B-class model (Llama 3.1 8B and Qwen’s current 8B are the usual picks), measure, then climb.
services:
ollama:
image: ollama/ollama:latest
volumes:
- /srv/ollama:/root/.ollama
ports:
- "127.0.0.1:11434:11434" # localhost only; Open WebUI is the door
restart: unless-stopped
open-webui:
image: ghcr.io/open-webui/open-webui:main
environment:
- OLLAMA_BASE_URL=http://ollama:11434
volumes:
- /srv/open-webui:/app/backend/data
ports:
- "3000:8080"
restart: unless-stopped
Pull a model with docker exec ollama ollama pull llama3.1:8b, open the UI, create the first account (it becomes the admin), and turn off sign-ups. Keep Ollama itself unexposed — per the exposure hierarchy, the chat UI behind your reverse proxy or VPN is the only door.
RAG: chatting with your own documents
Open WebUI’s document chat is retrieval-augmented generation: you attach PDFs, notes, or manuals; it chunks them (default 1,000-ish character chunks with overlap), embeds them locally with the bundled SentenceTransformers model (all-MiniLM-L6-v2), stores the vectors in its built-in Chroma database, and feeds the relevant passages to the model at question time. Practical expectations: it is genuinely good at “what does the manual say about the error codes” and “summarize this contract,” and it inherits the host model’s reasoning limits — a small model with perfect retrieval still reasons like a small model. Keep collections organized by topic rather than dumping everything into one, and remember the embeddings live on your disk: the privacy story stays intact end to end, which is the entire point next to the cloud assistants.
Where this fits with the voice stack
This is the same Ollama our voice pipeline guide points Home Assistant at — one model server can feed both the voice satellites and the chat UI, though a NAS serving a voice assistant’s latency targets and a human’s document chat at once will queue. If you build both, the chat platform is usually the workload that justifies the hardware step-up; the voice stack then rides along happily.
Official documentation and references
- Ollama — the runtime and model library
- Open WebUI documentation — features, RAG, and configuration
- Open WebUI license — the branding clause, in their words
Frequently asked questions
Can my NAS run this?
The small tier, yes: an 8B model in 16 GB of RAM answers correctly at reading-aloud speeds rather than instant ones. That is fine for occasional questions and document summaries, frustrating for long reasoning chats. A 32 GB mini PC or an Apple Silicon machine with 24 GB+ unified memory is where the experience turns good; a GPU you already own for transcoding rarely doubles well here — it is usually too small or busy.
Which model should I start with?
A current 8B-class general model — Llama 3.1 8B or Qwen’s latest 8B — for chat, and a distilled DeepSeek-R1 variant when you want visible step-by-step reasoning and can tolerate slower answers. Add a small embedding model only if you outgrow Open WebUI’s bundled one. Model choice ages in months; the platform underneath is the durable part.
Is Open WebUI still open source?
Mostly, with an asterisk: since v0.6.6 (April 2025) its license is BSD-3 plus a clause protecting its branding — you may not strip the Open WebUI branding except on small deployments (up to 50 users), as a permitted contributor, or with an enterprise license. Self-hosting it at home is free and unaffected in practice, but it no longer meets the strict OSI definition, and we say so rather than calling it simply open source.
Does RAG mean the model “learns” my documents?
No — nothing is trained. At question time the system retrieves the most relevant chunks of your documents and pastes them into the prompt as context. Remove the document and the knowledge is gone. That is a feature for privacy and freshness, and also the limit: the model can only use what retrieval finds, so well-organized, text-based documents work far better than scanned images.

