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.
Install and Start 6
pip install open-webuiopen-webui serveopen-webui serve --port 8088open-webui serve --host 0.0.0.0DATA_DIR=./data open-webui servepython -m open_webui serveUpdate and Maintenance 6
pip install -U open-webuiopen-webui serve --helprm -rf ~/.open-webuipip uninstall open-webuiUVICORN_WORKERS=1 open-webui serveopen-webui --helpDeploy and Config 8
docker run -d -p 3000:8080 ghcr.io/open-webui/open-webui:mainWEBUI_AUTH=False open-webui serveOLLAMA_BASE_URL=https://example.com open-webui servehelm repo add open-webui https://open-webui.github.io/helm-chartskubectl get podsDATA_DIR=~/.open-webui uvx open-webui@latest serveWEBUI_SECRET_KEY=xxx open-webui serveopen-webui serve --port 8080Tips
- 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