Open WebUI: a private ChatGPT-style app on top of your local models

Run Open WebUI in Docker over Ollama or LM Studio so your team gets a familiar chat window — then lock down the first admin account, the secret key, and who can reach port 3000.

chat · Published 2026-11-12 · Website · Translation: VI

Open WebUI is an open-source chat front end you host yourself. It looks close enough to ChatGPT that non-developers will use it, and it talks to models you already run — most often Ollama on port 11434, or LM Studio on port 1234. Chats, users and settings live in a Docker volume on your machine (or your server), not in a vendor cloud.

This note covers when Open WebUI is the right layer, the shortest safe Docker setup, and the three mistakes that turn a “private” chat into a public one.

When Open WebUI beats the raw apps

Ollama’s terminal and LM Studio’s window are fine for one person. Open WebUI earns its keep when:

  • Several people need the same local models without each installing a desktop app
  • You want folders, multi-user logins and a browser bookmark instead of a CLI
  • You already run Docker and prefer one compose file to a pile of desktop installs

Stay with LM Studio alone if you are the only user and like its model-download UI. Stay with plain Ollama if your “interface” is scripts and CI, not humans in a browser.

Pick Open WebUI when several people share local models in a browser; stay with LM Studio for one person who wants a desktop window; stay with Ollama alone for scripts and servers with no screen.

Open WebUI does not replace the model host — it sits on top. You still need Ollama, LM Studio, or another OpenAI-compatible endpoint.

Set it up the short way

Official docs recommend Docker. On a machine that already has Ollama listening on localhost:11434:

# keep this value; without a fixed key every recreate logs everyone out
export WEBUI_SECRET_KEY="$(openssl rand -hex 32)"

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

Open http://127.0.0.1:3000. The first account you create becomes the administrator. Create it yourself before anyone else can reach the page.

With no OLLAMA_BASE_URL set, the container looks for Ollama at http://host.docker.internal:11434 — that is what --add-host is for. Pull a model from the chat model selector (or with ollama pull on the host), then send a question you know the answer to.

Bundled option if you want one container with Ollama inside: use the :ollama image tag from the Open WebUI quick start and keep both volumes (ollama and open-webui).

Fix 1: bind to localhost until login exists

Publishing -p 3000:8080 on 0.0.0.0 puts the sign-up page on your LAN (or the public internet if the host is a VPS). The first visitor can become admin.

Bind to loopback first (127.0.0.1:3000), create the admin account, disable open sign-ups in Admin settings, then put a reverse proxy with HTTPS in front if others need access. Never leave port 3000 or 11434 open to the world without authentication.

Safe path: bind 127.0.0.1 → create admin → disable sign-ups → only then expose behind HTTPS. Unsafe path: publish 0.0.0.0:3000 before the first login.

On a remote server, use an SSH tunnel (ssh -L 3000:127.0.0.1:3000 user@host) for the first login instead of opening the port.

Fix 2: set WEBUI_SECRET_KEY once and keep it

If you omit WEBUI_SECRET_KEY, or let Compose recreate the container with an empty value, existing sessions break and everyone is logged out. Generate a 32-byte hex key once, store it in a .env file next to your compose file, and pass it into the container on every start. Back up the open-webui volume: that is where chats and users live.

Fix 3: confirm which model backend answers

Open WebUI can talk to more than one provider. Before you paste work text, check Admin → Connections (or the model picker) and confirm the active endpoint is your local Ollama/LM Studio URL — not a cloud key someone added for “just testing”. A local UI with a cloud backend is not a private chat.

Three checks after install: admin account exists and sign-up is closed; WEBUI_SECRET_KEY is fixed; the active connection points at local Ollama or LM Studio, not a cloud API.

Same privacy rule as any local stack: the UI is only as private as the model endpoint behind it.

Share

X Facebook LinkedIn