🌐 Open WebUI:136k Stars 的自托管 AI 平台,一行 Docker 命令搞定
项目地址:https://github.com/open-webui/open-webui | ⭐ 136k Stars | 🛠 Python | 作者 Timothy Jaeryang Baek
老实说,市面上 AI 聊天界面一堆,但大多数要么绑死某个厂商 API,要么装起来要配一堆依赖。你只是想找个本地跑的、能接 Ollama 又能接 OpenAI 的聊天界面,结果搜了一圈发现——Open WebUI 已经 136k Stars 了,而且一行 Docker 就能跑起来。
一、为什么选 Open WebUI
这玩意儿不是简单的 Ollama 网页版。它自带完整的 RAG 引擎(支持 9 种向量数据库)、多模型并行对话、语音/视频通话、图像生成(DALL-E / ComfyUI / SD WebUI),甚至还有 LDAP / SSO 企业认证。换句话说,你装一个 Open WebUI,等于同时拿到了 ChatGPT 界面 + 本地 RAG 系统 + 模型管理后台。
⚡ 最骚的是它完全离线可用,所有数据在你自己的机器上。
二、一行命令部署
Docker 部署(推荐)
如果你的机器上已经装了 Ollama:
docker run -d -p 3000:8080 \
--add-host=host.docker.internal:host-gateway \
-v open-webui:/app/backend/data \
--name open-webui --restart always \
ghcr.io/open-webui/open-webui:main
如果 Ollama 在另一台服务器:
docker run -d -p 3000:8080 \
-e OLLAMA_BASE_URL=https://your-ollama-server.com \
-v open-webui:/app/backend/data \
--name open-webui --restart always \
ghcr.io/open-webui/open-webui:main
需要 GPU 加速,加个 --gpus all 换成 :cuda 镜像就行。
pip 安装(轻量版)
不用 Docker 的话,一行 pip 搞定:
pip install open-webui
open-webui serve
访问 http://localhost:8080 就能用。
捆绑 Ollama 的一体化部署
连 Ollama 都不想单独装?用 :ollama 镜像,一个容器里啥都有:
docker run -d -p 3000:8080 --gpus=all \
-v ollama:/root/.ollama \
-v open-webui:/app/backend/data \
--name open-webui --restart always \
ghcr.io/open-webui/open-webui:ollama
三、核心玩法
🔥 本地 RAG:选 ChromaDB / PGVector / Milvus 等 9 种向量数据库,直接把 PDF 拖进聊天窗口就能检索。支持用 # 命令引用文档库。
🎤 语音/视频通话:集成 Whisper(本地)、Deepgram、Azure 等多种语音识别引擎,直接在浏览器里语音输入。
🎨 图像生成:接上 ComfyUI 或 AUTOMATIC1111,聊天框里直接生图改图。
🛠 Python 函数调用:内置代码编辑器,写个 Python 函数就能当工具给 LLM 用,比 OpenAI Function Calling 还灵活。
🧩 Pipeline 插件:支持自定义 Pipeline,可以加速率限制、使用监控、翻译过滤等中间件。
四、踩坑记录
踩过的坑都是泪。最坑的是 Docker 网络配置——容器里访问宿主机的 Ollama 用的是 host.docker.internal(Linux 上要加 --add-host 参数),不是 127.0.0.1。端口映射后是 3000,但如果用了 --network=host 会变成 8080。
另一个坑:生产部署一定要挂载 volume。不挂的话容器一删,所有聊天记录和配置全没了。
五、总结
一行 Docker 命令部署,支持 Ollama / OpenAI / 任意兼容 API
内置 RAG、语音、图像生成、插件系统,功能密度极高
完全离线可用,数据主权在你手上
企业级特性:LDAP/SSO/RBAC/SCIM 全都有
🌐 Open WebUI: 136k Stars Self-Hosted AI Platform, One Docker Command Away
Project: https://github.com/open-webui/open-webui | ⭐ 136k Stars | 🛠 Python | Author: Timothy Jaeryang Baek
Let's be honest — you've tried a dozen AI chat UIs. Most are locked to one vendor, or require a painful setup. You just want something local that works with both Ollama and OpenAI. Turns out Open WebUI already has 136k Stars, and runs in one Docker command.
1. Why Open WebUI
This is not just an Ollama web UI. It includes a full RAG engine (9 vector databases), multi-model conversations, voice/video calls, image generation (DALL-E / ComfyUI / SD WebUI), and enterprise auth (LDAP/SSO). One install replaces ChatGPT UI + local RAG + model management.
⚡ Best part: it runs fully offline. Your data stays on your machine.
2. One-Command Deploy
Docker (Recommended)
If Ollama is on your machine:
docker run -d -p 3000:8080 \
--add-host=host.docker.internal:host-gateway \
-v open-webui:/app/backend/data \
--name open-webui --restart always \
ghcr.io/open-webui/open-webui:main
If Ollama is on a different server:
docker run -d -p 3000:8080 \
-e OLLAMA_BASE_URL=https://your-ollama-server.com \
-v open-webui:/app/backend/data \
--name open-webui --restart always \
ghcr.io/open-webui/open-webui:main
For GPU support, add --gpus all and use the :cuda image.
pip Install (Lightweight)
No Docker? pip it:
pip install open-webui
open-webui serve
Access at http://localhost:8080.
Bundled Ollama
Want everything in one container? Use the :ollama image:
docker run -d -p 3000:8080 --gpus=all \
-v ollama:/root/.ollama \
-v open-webui:/app/backend/data \
--name open-webui --restart always \
ghcr.io/open-webui/open-webui:ollama
3. Key Features
🔥 Local RAG: Drag PDFs into chat, choose from ChromaDB / PGVector / Milvus and 6 more vector DBs. Use # to reference your document library.
🎤 Voice/Video Calls: Integrated Whisper (local), Deepgram, Azure speech recognition — talk to your AI directly from the browser.
🎨 Image Generation: Connect ComfyUI or AUTOMATIC1111, generate and edit images right in the chat.
🛠 Python Function Calling: Built-in code editor. Write Python functions as LLM tools — more flexible than OpenAI's Function Calling.
🧩 Pipeline Plugin System: Custom middleware for rate limiting, usage monitoring, translation filtering, and more.
4. Gotchas
Container can't reach 127.0.0.1 on the host — use host.docker.internal with --add-host. Port is 3000 normally, 8080 with --network=host. Always mount volumes or you'll lose everything on container delete.
5. Summary
One Docker command deploy, works with Ollama / OpenAI / any compatible API
Built-in RAG, voice, image gen, plugin system — incredibly feature-dense
Fully offline, your data stays yours
Enterprise features: LDAP/SSO/RBAC/SCIM included