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

Open WebUI is a feature-rich self-hosted AI platform that connects Ollama and any OpenAI-compatible API, with built-in RAG, multi-model chat, and an admin console. open-webui is its CLI: serve to start, set port and data dir, or deploy via Docker and Helm. This sheet covers install, launch, and deploy so you can self-host a private AI portal with an admin console.

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