In this categoryLocal AI · 24
Local AIIntermediate

How to Set Up Open WebUI for Local AI

Run Open WebUI in Docker, connect it to Ollama, switch between models in one click, and create custom personas that save your best system prompts.

15 minIntermediate

Open WebUI is a polished browser-based interface for Ollama that adds persistent chat history, multi-model switching, user accounts, and custom personas — all running entirely on your own machine. This guide sets it up from scratch using Docker, then covers the key features that save the most time.

What you need

  • Ollama installed and running with at least one model pulled (see the Mistral guide if needed)
  • Docker Desktop installed from docker.com
  • A browser — Open WebUI runs at http://localhost:3000

Step 1: Start Open WebUI with Docker

Run the following command. It pulls the image, creates a named volume for persistent data, and maps the container port to localhost:3000. The --add-host flag is required on macOS and Windows so the container can reach Ollama running on your host machine.

Docker run
$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
First run downloads ~1.5 GB image; subsequent starts are instant
$
Native GPU pass-through
If you want the container itself to do inference (instead of calling Ollama on the host), add --gpus all and use the :cuda tag: ghcr.io/open-webui/open-webui:cuda. For most setups, calling Ollama on the host is simpler.

Step 2: Create the admin account

Open http://localhost:3000 in your browser. On first visit, Open WebUI shows a sign-up form. The first account you create becomes the admin. Fill in a name, email, and password, then click Sign Up. These credentials are stored locally and never sent anywhere.

Open WebUI — first launch
Open WebUI
─────────────────────────────
Name [ Admin User ]
Email [ admin@local.dev ]
Password [ •••••••• ]
[ Sign Up ]
Sign-up form on first visit; first account becomes admin.

Step 3: Connect to Ollama

Open WebUI usually detects Ollama automatically. To check, click your profile icon in the top right, go to Settings > Connections. The Ollama URL should be set to http://host.docker.internal:11434. Click the refresh button next to it. If the connection succeeds, your pulled models appear in the model selector immediately.

Settings — Connections
Connections
─────────────────────────────────────────
Ollama Base URL
[ http://host.docker.internal:11434 ] [↻]
Models found: mistral, phi3.5, llama3.2
A green checkmark confirms Ollama is reachable.

Step 4: Switch between models in a chat

In the chat interface, click the model name at the top to open the picker. You can switch models mid-conversation or open a multi-model comparison view that sends the same message to two models side by side. This is useful for comparing output quality between a 7B and a 12B model on the same prompt.

Pull an extra model while Open WebUI is running
$ollama pull llama3.2
pulling manifest
pulling 966de95... 100% 2.0 GB
It appears in the Open WebUI model picker immediately
$

Step 5: Create a custom persona

Go to Workspace > Models and click New Model. Give it a name, pick a base Ollama model, and write a system prompt in the System Prompt field. Save it. The persona now appears as a selectable option in the model picker alongside the raw Ollama models, with the system prompt baked in.

Persona: Code Reviewer
You are a senior software engineer doing a code review.
Your job is to find bugs, suggest improvements, and explain tradeoffs.

Rules:
- Point out the most critical issue first.
- Cite the specific line or function when you flag a problem.
- Suggest a fix, not just a complaint.
- If the code is already correct, say so in one sentence.
Personas survive model swaps
If you change the base model behind a persona (say, from mistral to llama3.2), the system prompt is preserved. This lets you quickly test whether a stronger model improves your workflow without recreating the persona.

Result

Open WebUI is running at localhost:3000, connected to Ollama, with persistent chat history, multi-model switching, and named personas that keep your best system prompts one click away.

Local models run better with more VRAM. CompareRTX GPUs on Amazonbefore you upgrade.(affiliate link. We may earn a commission at no extra cost. Disclosure)

Watch related tutorials

Free weekly email

Weekly local AI drops

New models, what runs on your hardware, and the guides to set them up. One email a week, unsubscribe any time.

Tags
#open webui#ollama web ui#local ai web interface#chat ui for ollama