Self-Hosted ChatGPT: Open WebUI + Ollama Setup (2026)

Turn your local Ollama models into a private ChatGPT with Open WebUI: one-command Docker install, document chat (RAG), voice, and safe LAN access.

Quick answer. Run one Docker command to put Open WebUI in front of Ollama and you get a private, ChatGPT-style web app: multi-model switching, chat history, document chat (RAG), and voice — all local. Point it at an existing Ollama server with OLLAMA_BASE_URL, or bundle both in a single container.

If you have followed a few ollama run guides, you already have real models on your machine — but you are still talking to them through a terminal, one prompt at a time, with no history, no file uploads, and no easy way to switch models. Open WebUI is the missing front end. It turns that pile of local models into a self-hosted ChatGPT that runs entirely on hardware you control, with accounts, chat threads, document chat, and voice.

This guide is the "now make it a real app" capstone: one-command Docker install, the native pip path, connecting to an Ollama server you already run, turning on document chat, switching models mid-conversation, adding voice, and exposing it safely on your LAN.

What do you get by putting Open WebUI in front of Ollama?

Open WebUI is an open-source, self-hosted interface that speaks to Ollama (and any OpenAI-compatible endpoint) out of the box. Instead of a REPL, you get:

  • A ChatGPT-style UI — persistent chat threads, markdown rendering, code blocks, and regeneration.
  • Multi-model switching — flip between llama3.2, qwen2.5-coder, deepseek-r1, or any pulled model from a dropdown, and even run two models side by side in one conversation.
  • Document chat (RAG) — upload PDFs, docs, and notes, then ask questions grounded in their content.
  • Voice — speak your prompt and have replies read back to you.
  • Multi-user accounts — its own login, roles, and access control, so you can share one instance across a small team.

The important part: nothing leaves your machine. The models are Ollama's, the data lives in a local volume, and the whole stack works offline.

What do you need before you start?

  1. Ollama installed with at least one model pulled — e.g. ollama pull llama3.2. Confirm it responds at http://localhost:11434.
  2. Docker (the fastest path) or Python 3.11 / 3.12 for the pip install.
  3. A few GB of free disk for the Open WebUI container and its data volume.

How do you install Open WebUI with Docker?

Docker is the recommended path — one command, and the image ships with everything. Which command you use depends on where Ollama runs.

ScenarioImage tagHow it reaches Ollama
Ollama already running on this machine:mainhost.docker.internal:11434
No Ollama yet — bundle both together:ollamaOllama runs inside the same container
Ollama on another server:mainOLLAMA_BASE_URL env var

Scenario A — connect to Ollama already on your machine

This is the most common case. The --add-host flag lets the container reach Ollama on the host at host.docker.internal:11434:

docker run -d -p 3000:8080 \
  --add-host=host.docker.internal:host-gateway \
  -v open-webui:/app/backend/data \
  --name open-webui --restart always \
  ghcr.io/open-webui/open-webui:main

Then open http://localhost:3000. The -v open-webui:/app/backend/data volume is not optional — it holds your accounts, chats, and settings, and skipping it means losing everything on the next container recreate.

Scenario B — bundle Ollama and Open WebUI in one container

If you do not already run Ollama, the :ollama image includes it. Add --gpus=all if you have an NVIDIA GPU:

docker run -d -p 3000:8080 --gpus=all \
  -v ollama:/root/.ollama \
  -v open-webui:/app/backend/data \
  --name open-webui --restart always \
  ghcr.io/open-webui/open-webui:ollama

The extra -v ollama:/root/.ollama volume keeps your downloaded models out of the container so they survive rebuilds. Drop --gpus=all for a CPU-only box.

Scenario C — connect to a remote Ollama server

Running Ollama on a beefier machine (a workstation with a GPU, a home server) and Open WebUI elsewhere? Point it with OLLAMA_BASE_URL:

docker run -d -p 3000:8080 \
  -e OLLAMA_BASE_URL=http://192.168.1.50:11434 \
  -v open-webui:/app/backend/data \
  --name open-webui --restart always \
  ghcr.io/open-webui/open-webui:main

For that to work, the Ollama server must be listening on the network, not just localhost — see the LAN section below.

Prefer no Docker? The native pip install

Open WebUI is also a Python package. It supports Python 3.11 and 3.12 — 3.13 is not supported yet, so create a clean 3.11 environment first:

python3.11 -m venv open-webui-env
source open-webui-env/bin/activate
pip install open-webui
open-webui serve

The pip build serves on http://localhost:8080 (note: 8080, not the 3000 the Docker examples map to). It auto-detects Ollama on localhost. To keep data in a known place, prefix the command: DATA_DIR=./data open-webui serve. Docker is still the better bet for anything long-lived; pip is handy for a quick local trial or a dev box.

First run: create your admin account and pick models

The first account you register becomes the administrator — there is no default password, and this account owns the Admin Panel. Create it immediately so nobody else can claim it, especially on a shared network.

Once in, the model dropdown at the top of a new chat lists every model Ollama has pulled. You can:

  • Switch models between messages to compare answers.
  • Select two or more models at once to get parallel responses in the same thread.
  • Pull new models straight from the UI (Admin Panel → Settings → Models) instead of dropping back to the terminal.
  • Add OpenAI-compatible endpoints alongside Ollama, so local and hosted models sit in the same picker.

How do you chat with your own documents (RAG)?

This is what makes it feel like a real assistant. Open WebUI has built-in retrieval-augmented generation — upload a document and the model answers from its contents instead of guessing.

Under the hood, when you add a file to a Workspace → Knowledge collection, Open WebUI splits it into overlapping chunks, converts each chunk into a vector with an embedding model (nomic-embed-text is a common local choice — pull it with ollama pull nomic-embed-text), and stores those vectors. At chat time it embeds your question, finds the closest chunks, and injects them into the prompt.

To use a collection in a chat, type # followed by the collection name and the model will ground its answer in those documents. Three settings in the RAG config are worth knowing:

  • Chunk Size — tokens per chunk. Bigger chunks keep more context together but retrieve less precisely.
  • Chunk Overlap — shared tokens between neighbouring chunks so a sentence split across a boundary is not lost.
  • Top K — how many chunks to retrieve. Raising it feeds more context, but make sure the model's context window can hold it.

Can you talk to it? Voice input and output

Yes. Open WebUI supports speech-to-text and text-to-speech, configured under Admin Panel → Settings → Audio. The default speech-to-text and text-to-speech both use the browser's Web Speech API, so they work with zero extra services. For higher-quality transcription you can point the STT engine at a Whisper or OpenAI-compatible endpoint, and TTS at any OpenAI-compatible voice API.

Start a voice conversation with the microphone icon next to the message box — it transcribes what you say, generates a reply, and reads it back. One browser caveat: microphone access only works over HTTPS or on localhost. If you reach the app by LAN IP over plain HTTP, the mic will be blocked until you put it behind TLS.

How do you safely expose it on your LAN?

To use Open WebUI from your phone or another laptop, two things have to be reachable: Open WebUI itself, and (if it runs elsewhere) the Ollama server.

By default Ollama only listens on localhost. To accept connections from the network, bind it to all interfaces with OLLAMA_HOST:

# Linux (systemd): add to the service environment
Environment="OLLAMA_HOST=0.0.0.0:11434"

# macOS / quick test
export OLLAMA_HOST=0.0.0.0:11434
ollama serve

Now mind the security. Ollama has no authentication. Anything that can reach port 11434 can list, run, and even delete your models. So:

  • Keep the raw Ollama port LAN-only. Never port-forward 11434 to the public internet.
  • Let people log in through Open WebUI, which does have accounts and roles — treat it as the front door, not Ollama.
  • For anything beyond a trusted home network, put a reverse proxy (Nginx, Caddy, or Traefik) with TLS and auth in front of Open WebUI. TLS also unlocks the microphone for voice.

Done right, you end up with a private ChatGPT that your whole household or small team can open in a browser, backed by models that never phone home.

Going deeper on self-hosting? This post is the front-end layer. For hardware sizing, quantization, and running models in production, read our complete guide to self-hosting LLMs, and the 2026 open-source LLM landscape to pick which models to pull. For specific model picks, see our DeepSeek V4 and Qwen 3.5 guides.

FAQ

Is Open WebUI free and fully local?

Yes. Open WebUI is open source and self-hosted. Paired with Ollama, every prompt, document, and model runs on your own hardware — no API keys, no cloud, and it works offline.

Why can't the Open WebUI container reach Ollama?

The container's "localhost" is itself, not your host. Use the --add-host=host.docker.internal:host-gateway flag and let it reach Ollama at host.docker.internal:11434, or set OLLAMA_BASE_URL to the host's LAN IP. On Linux you can also add --network=host.

What's the difference between the :main and :ollama images?

:main is just the web app and expects Ollama to already exist. :ollama bundles Ollama inside the same container, so a single command gives you both — convenient, but it couples upgrades of the two together.

Which embedding model should I use for document chat?

nomic-embed-text is a solid local default — small, fast, and pulled with ollama pull nomic-embed-text. Set it as the RAG embedding model in the admin settings, then upload documents to a Workspace collection.

Can multiple people use one instance?

Yes. The first registered account is the admin; additional users sign up (or are invited) and get their own chats. For anything past a trusted LAN, front it with a reverse proxy and TLS, and never expose the raw Ollama port to the internet.

Do I need a GPU?

No. Open WebUI itself is lightweight; the compute is Ollama's. Small models run acceptably on CPU, but a GPU (add --gpus=all with the CUDA/bundled image) makes larger models genuinely usable.

Building an internal AI tool on top of a self-hosted stack and want it done properly? You can hire vetted remote developers through Codersera to extend your team.