OllamaBeginner30 min9 sections

Self-Host Open WebUI as Your ChatGPT Replacement

A polished, multi-user, self-hosted ChatGPT-clone running entirely on your hardware. Docker, 5 minutes, no API keys.

MyAIHardware EditorialUpdated May 24, 2026
Self-Host Open WebUI as Your ChatGPT Replacement

Before you start

  • Working Ollama install (Linux, macOS, or Windows)
  • Docker installed (Docker Desktop on Windows/macOS, docker-ce on Linux)
  • 10 GB free disk for the container image and database

Required hardware

Step 01

Why Open WebUI

The Ollama CLI is great for testing, terrible for daily use. You want a real web interface, conversation history, model picker, file upload, prompt library, multi-user, etc. Open WebUI provides all of that as a single Docker container that talks to your existing Ollama install. It's the most polished open-source ChatGPT clone, supports OpenAI-compatible backends as well as Ollama, and runs entirely on your own hardware.

It is not the only option (LibreChat, Hollama, and Big-AGI are all reasonable), but Open WebUI is the most popular and best-maintained. It has 50K+ stars on GitHub and ships meaningful updates every couple weeks. For 95% of users this is the right pick.

Step 02

Step 1: Run the container

One docker run command. The arguments below give you: port 3000 exposed, persistent storage in a named volume, host networking so it can reach Ollama on the same machine. If your Ollama lives on a different machine, point OLLAMA_BASE_URL at it explicitly.

bash
# Ollama on same host
docker run -d \
  -p 3000:8080 \
  -v open-webui:/app/backend/data \
  --add-host=host.docker.internal:host-gateway \
  -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
  --name open-webui --restart always \
  ghcr.io/open-webui/open-webui:main

# Ollama on a different host (e.g., a dedicated AI server)
docker run -d \
  -p 3000:8080 \
  -v open-webui:/app/backend/data \
  -e OLLAMA_BASE_URL=http://192.168.1.50:11434 \
  --name open-webui --restart always \
  ghcr.io/open-webui/open-webui:main

# Visit http://localhost:3000
Step 03

Step 2: First-run setup

The first time you load http://localhost:3000, Open WebUI asks you to create an admin account. Whatever email you put in becomes the admin, there's no email verification, it's local. Pick a strong password. Future users can sign up but won't have admin rights. If you want to disable signups entirely after creating your account, set ENABLE_SIGNUP=false as an env var.

Step 04

Step 3: Verify Ollama models show up

Click the model picker (top of any chat). You should see every model you've pulled with `ollama pull`. If the list is empty, Open WebUI can't reach Ollama. Most common cause on Linux: Ollama is bound to 127.0.0.1 (default) but Open WebUI in Docker can only reach 0.0.0.0. Re-do the OLLAMA_HOST step from the Ubuntu install tutorial.

bash
# Quick connectivity test from inside the container
docker exec open-webui curl -s http://host.docker.internal:11434/api/tags

# If that fails, Ollama isn't listening on all interfaces. Fix it:
sudo systemctl edit ollama.service
# Set Environment="OLLAMA_HOST=0.0.0.0:11434"
sudo systemctl restart ollama
Step 05

Step 4: Enable RAG (file upload)

Open WebUI has built-in RAG, you can drop PDFs, Word docs, or text into a conversation and the model will quote them. Behind the scenes it embeds the document with a small embedding model (by default `nomic-embed-text`, pull it via Ollama) and stores chunks in a Chroma vector database. Once enabled, every chat has a paperclip icon. Upload a document, and the model can reference it like an attachment.

bash
# Pull the embedding model Open WebUI uses by default
ollama pull nomic-embed-text

# In Open WebUI: Settings > Documents > Embedding Model > nomic-embed-text
Step 06

Step 5: Tweak the prompt library and prompts.txt

Open WebUI lets you save prompts as reusable templates. Click 'Prompts' in the sidebar, hit '+', define a template like 'Explain this code: {{code}}', now you can pick it from a slash menu mid-chat. This is the killer productivity feature most users miss. Build up a personal library of 10-20 task prompts and you'll find yourself reaching for Open WebUI over ChatGPT for the same reason mechanical-keyboard people reach for vim, your tools are tuned for you.

Step 07

Step 6: Multi-user invites

As admin, go Admin Panel > Users. You can invite roommates, family, or coworkers, they each get their own conversation history and the model picker shows whichever models you've allowed for their group. This is the realistic way to share an LLM box across multiple humans without everyone seeing everyone's chats.

Step 08

Step 7: TLS and remote access

Out of the box Open WebUI runs HTTP only. If you want to access it from outside your LAN, or even from inside but with proper TLS, put Caddy in front. Caddy auto-provisions Let's Encrypt certificates and reverse-proxies traffic. A 5-line Caddyfile is enough.

caddy
# /etc/caddy/Caddyfile
ai.your-domain.com {
  reverse_proxy localhost:3000
}

# Caddy handles HTTPS automatically.
# Then in your router, port-forward 443 to this host.
# Or better: use Tailscale and skip public exposure entirely.
Warning

Exposing Open WebUI to the public internet means anyone who guesses an account email can sign up. Disable ENABLE_SIGNUP=false before opening to the web.

Step 09

Step 8: Updating

Open WebUI updates every couple weeks. Updates are a docker pull + restart, no data loss because /app/backend/data lives in a persistent volume. Set up Watchtower if you want it automated, or just `docker pull` monthly. Read the release notes before upgrading major versions, breaking changes are rare but they happen.

bash
# Manual update
docker pull ghcr.io/open-webui/open-webui:main
docker stop open-webui && docker rm open-webui
# Re-run the docker run command from step 1

# Or automated with Watchtower
docker run -d \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --name watchtower --restart always \
  containrrr/watchtower --interval 86400 open-webui

Tags

#open-webui#docker#ui#self-hosted

Stuck? Share your build?

Hundreds of homelabbers are working through these same tutorials in our community. Drop your config, ask the hard question, or show off what you built.

Join the discussion

Stay Ahead of the AI Curve

Get weekly AI hardware news, benchmark updates, and deals in your inbox. Founding-subscriber list, be one of the first.

✓ No spam✓ Weekly digest✓ Unsubscribe anytime