Open WebUI CLI Cheatsheet - open-webui Self-hosted AI Platform Full Reference

Open WebUI solves the problem of teams needing models without everyone managing separate vendor consoles: it aggregates Ollama and any OpenAI-compatible service behind one interface with user accounts, an admin panel, knowledge bases and conversation history, so model access is issued centrally instead of via personal API keys. This sheet covers installation and launch, updating and maintenance, and deployment and configuration. Two operational details decide whether the deployment survives. First, the data directory must be set explicitly - launched via a temporary runner, chats, user settings and knowledge-base indexes disappear when the process exits, and that loss usually surfaces only when someone reports their history is gone. Second, concurrency during upgrades: running database migrations with multiple replicas or workers in parallel can corrupt the store, so the correct sequence is scale down to a single replica, complete the migration, then scale back out. These two are the most common real failure sources in self-hosted deployments; most other settings can be tuned later.

AI CLI·20 commands·Last updated 2026-09-10
open-webuiaiself-hostedchatplatformclirag

Install and Start 6

pip install open-webui
Install via pip
open-webui serve
Start the server (default 8080)
open-webui serve --port 8088
Start on a custom port
open-webui serve --host 0.0.0.0
Bind externally
DATA_DIR=./data open-webui serve
Start with a data dir
python -m open_webui serve
Start as a module

Update and Maintenance 6

pip install -U open-webui
Upgrade to latest
open-webui serve --help
Start flags
rm -rf ~/.open-webui
Wipe data (use with care)
pip uninstall open-webui
Uninstall the package
UVICORN_WORKERS=1 open-webui serve
Single worker for migrations (upgrade)
open-webui --help
Top-level commands

Deploy and Config 8

docker run -d -p 3000:8080 ghcr.io/open-webui/open-webui:main
Run via Docker
WEBUI_AUTH=False open-webui serve
Single-user mode (no login)
OLLAMA_BASE_URL=https://example.com open-webui serve
Connect remote Ollama
helm repo add open-webui https://open-webui.github.io/helm-charts
Add the Helm repo
kubectl get pods
Check K8s deploy status
DATA_DIR=~/.open-webui uvx open-webui@latest serve
Start via uvx with a fixed data dir
WEBUI_SECRET_KEY=xxx open-webui serve
Set a persistent key to avoid logout
open-webui serve --port 8080
Explicitly set the default port

Tips

  • Always set DATA_DIR; otherwise uvx temp dirs drop chats and settings when the process ends.
  • With multiple workers or K8s replicas, scale to one replica for migrations before scaling up, to avoid DB corruption.
  • Default port 8080; Docker often maps the UI to 3000 with -p 3000:8080.

FAQ

How is Open WebUI different from LM Studio?

Open WebUI is a platform with admin console, RAG, and multi-model chat (server/team oriented); LM Studio is a local desktop inference client. They pair well: Open WebUI connects to LM Studio Ollama endpoint.

Must it connect to Ollama?

No. It can use any OpenAI-compatible API (cloud, vLLM, LM Studio) and has a built-in engine for local RAG.

Official References

Each command links to its official documentation below, so you can verify the latest usage and read deeper.

Maintained by LaoHand

Publicly updated on Sep 10, 2026, continuously proofread against official docs.

Contact Us

Wrong command or description? Send us corrections, business inquiries or product feedback by email.

Contact Us