Open WebUI:支持 Ollama 与 OpenAI API 的用户友好型自托管 AI 界面
英文标题:📦 open-webui/open-webui
Open WebUI 是一个功能丰富、可扩展的开源自托管 AI 平台,旨在完全离线运行,原生支持 Ollama 及各类 OpenAI 兼容 API。它内置 RAG 推理引擎、插件系统、Agent、持久记忆和日历调度等企业级特性,并提供从 pip 到 Kubernetes 的多种部署方式。该项目为开发者提供了安全、多租户、高可定制的 AI 部署基座,并通过丰富的生态系统(如 Open Terminal、cptr、oikb)进一步强化了代码执行、数据同步和桌面集成能力。
中文
Open WebUI 是一个可扩展、功能丰富且用户友好的自托管 AI 平台,旨在完全离线运行。 它支持各种 LLM 运行器,如 Ollama 和 OpenAI 兼容 API,并配有内置推理引擎用于 RAG,使其成为强大的 AI 部署解决方案。
对开源 AI 充满热情?加入我们的团队 →
更多信息,请务必查阅我们的 Open WebUI 文档。
Open WebUI 关键特性 ⭐
- 🚀 轻松部署:通过 pip、uv、Docker 或 Kubernetes(kubectl、kustomize 或 helm)无缝安装,并提供
:ollama和:cuda标记的镜像用于容器部署。 - 🤝 广泛的模型与 API 集成:连接任何 OpenAI 兼容 API 以及本地 Ollama 模型。将 API URL 指向 LMStudio、GroqCloud、Mistral、OpenRouter、vLLM 等,自由混搭不同的提供商。
- 🔐 细粒度 RBAC 与用户组:管理员可以定义详细的角色、组和权限,为每个用户精确分配所需访问权限。默认安全,且可按组定制体验。
- 🧩 插件支持:通过过滤器、动作、管道、工具和技能扩展 Open WebUI。通过 MCP、MCPO 和 OpenAPI 工具服务器连接外部服务。构建自定义集成、速率限制、审批流程、数据连接等。
- 🤖 模型与 Agent:为任何基础模型包装自定义指令、工具和知识,构建专用 Agent。支持动态变量、按用户/组访问控制,以及通过 Open WebUI Community 导入社区预设。
- 📝 笔记:专用于对话之外内容的独立工作区。使用富文本编辑器起草,利用 AI 改写选中文本,并将笔记附加到任何聊天中以注入完整上下文。
- 📢 频道:团队与 AI 模型在一个时间线中实时协作的共享空间。可 @ 模型进行起草或评审,支持话题、反应、置顶和访问控制。
- 🧠 持久记忆:AI 会跨对话记住关于你的事实,将上下文从一个聊天延续到后续对话。
- ✅ 实时工作流与消息流:实时观察 AI 构建并完成检查清单。在 AI 仍在响应时排队消息;消息会在 AI 就绪时自动发送。
- 📅 日历与 AI 日程:内置个人与共享日历,支持月/周/日视图、重复事件、颜色编码、参与者和提醒。模型通过原生函数调用以对话方式管理你的日程。
- ⏱️ 自动化:安排提示词按重复时间表运行,运行记录显示在日历中,每次完成的运行链接回生成的聊天。
- 📱 响应式设计与 PWA:在桌面、笔记本和移动端提供无缝体验,通过渐进式 Web 应用获得原生应用般的感受,并支持本地主机离线访问。
- ✒️🔢 完整的 Markdown 与 LaTeX 支持:全面的 Markdown 和 LaTeX 功能,带来丰富的交互体验。
- 🎤📹 免提语音/视频通话:集成语音和视频通话,支持多种语音转文字提供商(Local Whisper、OpenAI、Deepgram、Azure)和文本转语音引擎(Azure、ElevenLabs、OpenAI、Transformers、WebAPI)。
- 💾 持久化工件存储:内置键值存储 API,用于工件,支持日志、追踪器、排行榜和协作工具,具备个人和共享数据范围。
- 📚 本地 RAG 集成:检索增强生成基于 9 种向量数据库和多种内容提取引擎(Tika、Docling、Document Intelligence、Mistral OCR、PaddleOCR-vl、外部加载器)。支持混合搜索(BM25 + 向量),具有重排序和全上下文模式。通过
#命令将文档加载到聊天中,或从你的库中拉取。 - 🔍 RAG 网络搜索:通过数十个提供商搜索网络,包括
SearXNG、Google PSE、Brave Search、Kagi、Mojeek、Tavily、Perplexity、Firecrawl、serpstack、serper、Serply、DuckDuckGo、SearchApi、SerpApi、Bing、Jina、Exa、Sougou、Azure AI Search和Ollama Cloud,直接将结果注入对话。 - 🌐 网页浏览能力:通过
#命令后跟 URL,将网页拉入聊天,或让模型在需要时自动获取。 - 🎨 图像生成与编辑:使用多种引擎创建和编辑图像,包括 OpenAI DALL·E、Gemini、ComfyUI(本地)和 AUTOMATIC1111(本地),支持生成和基于提示的编辑。
- ⚙️ 多模型对话:同时与多个模型交互,并行发挥各自优势,以获得最佳响应。
- 📊 使用分析与模型评估:管理仪表盘跟踪消息量、令牌消耗和各用户及各模型的成本。通过内置竞技场、A/B 测试和基于 ELO 的排行榜评估模型。
- 🗄️ 灵活的数据库与存储:选择 SQLite(可选加密)或 PostgreSQL,并将文件存储在本地或 S3、Google Cloud Storage、Azure Blob Storage 上。
- 🧬 高级向量数据库支持:从 9 种向量数据库中选择:ChromaDB、PGVector、Qdrant、Milvus、Elasticsearch、OpenSearch、Pinecone、S3Vector 和 Oracle 23ai。
- 🪪 企业认证与供给:完整的 LDAP/Active Directory 集成,通过可信头和 OAuth 提供商实现 SSO,以及针对 Okta、Azure AD 和 Google Workspace 等身份提供商的 SCIM 2.0 自动化供给。
- ☁️ 云原生文件集成:原生 Google Drive 和 OneDrive/SharePoint 文件选择器,实现从企业云存储无缝导入文档。
- 🔭 生产可观测性:内置 OpenTelemetry 支持,提供跟踪、指标和日志,可接入现有监控堆栈。
- ⚖️ 水平可扩展性:基于 Redis 的会话管理和 WebSocket 支持,适用于负载均衡器后的多工作进程、多节点部署。
- 🌐🌍 多语言支持:通过 i18n 支持,使用你偏好的语言使用 Open WebUI。我们正在积极寻求贡献者来扩展语言覆盖范围!
- 🌟 持续更新:我们致力于通过定期更新、修复和新功能来改进 Open WebUI。
- 🛡️ 透明的安全流程:安全报告通过文档化的负责任披露流程进行分诊、修复并作为公开公告发布。请参阅我们的安全策略。
想要了解更多关于 Open WebUI 的功能?请查看我们的 Open WebUI 文档 以获取全面概述!
Open WebUI 生态系统 🌐
Open WebUI 是核心,周围环绕着配套应用和基础设施,扩展了 AI 的能力、触及范围和运行方式:
- ⚡ Open Terminal (open-webui/open-terminal):一个自托管的计算环境,可接入 Open WebUI,为 AI 提供编写代码、运行代码、读取输出、修复错误并在聊天中迭代的空间。
- 🔒 Terminals · 企业版 (open-webui/terminals):每个用户独立的隔离容器,具有单独的凭证、资源限制和网络规则。在 Docker 或 Kubernetes 上自动管理生命周期。
- 💻 cptr (open-webui/computer):一个独立的、移动优先的计算机和编程 Agent,在你自己的机器上运行。文件、终端和 git 在一个浏览器标签页中,可从手机访问。可将其作为模型接入 Open WebUI,或通过 Telegram、WhatsApp 等渠道访问。
- 🔄 oikb (open-webui/oikb):从 45+ 个来源(GitHub、Confluence、ServiceNow、Salesforce、Jira、Slack、SharePoint、Notion 等)为你的知识库提供数据,保持团队正在使用的工具持续同步。
- 🖥️ 原生桌面应用 (open-webui/desktop):在 macOS、Windows 和 Linux 上以原生应用运行 Open WebUI。系统级 Spotlight 聊天栏,支持截屏、一键通语音,以及可选的内置 llama.cpp 引擎实现完全本地推理。
想要了解更多?请查看我们的 Open WebUI 文档 以获取更多详细信息!
我们非常感谢赞助商的慷慨支持。他们的贡献帮助我们维护和改进项目,确保我们能够持续为社区交付高质量的工作。谢谢!
通过 Python pip 安装 🐍
Open WebUI 可以使用 Python 的包安装器 pip 进行安装。开始之前,请确保你使用的是 Python 3.11 以避免兼容性问题。
-
安装 Open WebUI:打开终端并运行以下命令安装 Open WebUI:
-
运行 Open WebUI:安装完成后,你可以通过执行以下命令启动 Open WebUI:
这将启动 Open WebUI 服务器,你可以通过 http://localhost:8080 访问。
Docker 快速入门 🐳
注意:请注意,对于某些 Docker 环境,可能需要额外配置。如果遇到任何连接问题,我们的 Open WebUI 文档 中的详细指南将为您提供帮助。
警告:使用 Docker 安装 Open WebUI 时,请确保在 Docker 命令中包含
-v open-webui:/app/backend/data。此步骤至关重要,因为它确保数据持久性。
English / 原文
Open WebUI is anextensible, feature-rich, and user-friendly self-hosted AI platform designed to operate entirely offline. It supports various LLM runners like Ollama and OpenAI-compatible APIs , with built-in inference engine for RAG, making it a powerful AI deployment solution.
Passionate about open-source AI? Join our team →
For more information, be sure to check out our Open WebUI Documentation.
Key Features of Open WebUI ⭐
-
🚀 Effortless Setup : Install seamlessly via pip, uv, Docker, or Kubernetes (kubectl, kustomize, or helm), with
:ollamaand:cudatagged images available for container deployments. -
🤝 Broad Model & API Integration: Connect any OpenAI-compatible API alongside local Ollama models. Point the API URL at LMStudio, GroqCloud, Mistral, OpenRouter, vLLM, and more to mix and match providers freely.
-
🔐 Granular RBAC & User Groups: Administrators define detailed roles, groups, and permissions, giving each user exactly the access they need. Secure by default, with tailored experiences per group.
-
🧩 Plugin Support : Extend Open WebUI with Filters , Actions , Pipes , Tools , and Skills. Connect external services through MCP , MCPO , and OpenAPI tool servers. Build custom integrations, rate limits, approval flows, data connections, and more.
-
🤖 Models & Agents: Wrap any base model with custom instructions, tools, and knowledge to build specialized agents. Supports dynamic variables, per-user/group access control, and community preset imports via Open WebUI Community.
-
📝 Notes : A dedicated workspace for content outside conversations. Draft with a rich editor, use AI to rewrite selected text, and attach notes to any chat for full-context injection.
-
📢 Channels : Real-time shared spaces where your team and AI models collaborate in one timeline. Tag models to draft or critique, with threads, reactions, pins, and access control.
-
🧠 Persistent Memory : The AI remembers facts about you across conversations, carrying context from one chat to the next.
-
✅ Live Workflow & Message Flow: Watch the AI build and work through checklists in real time. Queue messages while the AI is still responding; they send automatically when it's ready.
-
📅 Calendar & AI Scheduling: Built-in personal and shared calendars with month/week/day views, recurring events, color coding, attendees, and reminders. Models manage your schedule conversationally through native function calling.
-
⏱️ Automations : Schedule prompts to run on recurring schedules, with runs surfaced on your calendar and each completed run linking back to the chat it produced.
-
📱 Responsive Design & PWA: Seamless experience across desktop, laptop, and mobile, with a Progressive Web App for native app-like feel and offline access on localhost.
-
✒️🔢 Full Markdown and LaTeX Support : Comprehensive Markdown and LaTeX capabilities for enriched interaction.
-
🎤📹 Hands-Free Voice/Video Call : Integrated voice and video calls with multiple Speech-to-Text providers (Local Whisper, OpenAI, Deepgram, Azure) and Text-to-Speech engines (Azure, ElevenLabs, OpenAI, Transformers, WebAPI).
-
💾 Persistent Artifact Storage : Built-in key-value storage API for artifacts, enabling journals, trackers, leaderboards, and collaborative tools with personal and shared data scopes.
-
📚 Local RAG Integration : Retrieval Augmented Generation backed by 9 vector databases and multiple content-extraction engines (Tika, Docling, Document Intelligence, Mistral OCR, PaddleOCR-vl, external loaders). Supports hybrid search (BM25 + vector) with reranking and full-context mode. Load documents into chat or pull them from your library with the
#command. -
🔍 Web Search for RAG : Search the web through dozens of providers including
SearXNG,Google PSE,Brave Search,Kagi,Mojeek,Tavily,Perplexity,Firecrawl,serpstack,serper,Serply,DuckDuckGo,SearchApi,SerpApi,Bing,Jina,Exa,Sougou,Azure AI Search, andOllama Cloud, injecting results directly into the conversation. -
🌐 Web Browsing Capability : Pull websites into chat with the
#command followed by a URL, or let the model fetch them on its own when needed. -
🎨 Image Generation & Editing: Create and edit images with multiple engines including OpenAI DALL·E, Gemini, ComfyUI (local), and AUTOMATIC1111 (local), supporting both generation and prompt-based editing.
-
⚙️ Multi-Model Conversations : Engage several models at once, harnessing their individual strengths in parallel for the best possible responses.
-
📊 Usage Analytics & Model Evaluation: Admin dashboards track message volume, token consumption, and cost across users and models. Evaluate models with a built-in arena, A/B testing, and ELO-based leaderboards.
-
🗄️ Flexible Database & Storage: Choose SQLite (with optional encryption) or PostgreSQL, and store files locally or on S3, Google Cloud Storage, or Azure Blob Storage.
-
🧬 Advanced Vector Database Support : Pick from 9 vector databases: ChromaDB, PGVector, Qdrant, Milvus, Elasticsearch, OpenSearch, Pinecone, S3Vector, and Oracle 23ai.
-
🪪 Enterprise Authentication & Provisioning: Full LDAP/Active Directory integration, SSO via trusted headers and OAuth providers, and SCIM 2.0 automated provisioning for identity providers like Okta, Azure AD, and Google Workspace.
-
☁️ Cloud-Native File Integration : Native Google Drive and OneDrive/SharePoint file picking for seamless document import from enterprise cloud storage.
-
🔭 Production Observability : Built-in OpenTelemetry support for traces, metrics, and logs, plugging into your existing monitoring stack.
-
⚖️ Horizontal Scalability : Redis-backed session management and WebSocket support for multi-worker, multi-node deployments behind load balancers.
-
🌐🌍 Multilingual Support : Use Open WebUI in your preferred language with i18n support. We're actively seeking contributors to expand language coverage!
-
🌟 Continuous Updates : We're committed to improving Open WebUI with regular updates, fixes, and new features.
-
🛡️ Transparent Security Process : Security reports are triaged, fixed, and published as open advisories through a documented responsible-disclosure process. See our Security Policy.
Want to learn more about Open WebUI's features? Check out our Open WebUI documentation for a comprehensive overview!
The Open WebUI Ecosystem 🌐
Open WebUI is the core, surrounded by companion apps and infrastructure that extend what your AI can do, where it can reach, and how you run it:
-
⚡ Open Terminal (open-webui/open-terminal): A self-hosted computing environment that plugs into Open WebUI, giving the AI a place to write code, run it, read output, fix errors, and iterate inside the chat.
-
🔒 Terminals · Enterprise (open-webui/terminals): Per-user isolated containers with separate credentials, resource limits, and network rules. Automatic lifecycle management on Docker or Kubernetes.
-
💻 cptr (open-webui/computer): A standalone, mobile-first computer and coding agent that runs on the machine you own. Files, terminal, and git in a browser tab, reachable from your phone. Connect it into Open WebUI as a model, or reach it from Telegram, WhatsApp, and more.
-
🔄 oikb (open-webui/oikb): Feed your Knowledge Bases from 45+ sources (GitHub, Confluence, ServiceNow, Salesforce, Jira, Slack, SharePoint, Notion, and more), keeping the tools your team already uses continuously in sync.
-
🖥️ Native Desktop App (open-webui/desktop): Run Open WebUI as a native app on macOS, Windows, and Linux. System-wide Spotlight chat bar with screenshot capture, push-to-talk voice, and optional fully-local inference via a built-in llama.cpp engine.
Want to learn more? Check out our Open WebUI documentation for more details!
We are incredibly grateful for the generous support of our sponsors. Their contributions help us to maintain and improve our project, ensuring we can continue to deliver quality work to our community. Thank you!
Installation via Python pip 🐍
Open WebUI can be installed using pip, the Python package installer. Before proceeding, ensure you're using Python 3.11 to avoid compatibility issues.
-
Install Open WebUI : Open your terminal and run the following command to install Open WebUI:
-
Running Open WebUI : After installation, you can start Open WebUI by executing:
This will start the Open WebUI server, which you can access at http://localhost:8080
Quick Start with Docker 🐳
Note
Please note that for certain Docker environments, additional configurations might be needed. If you encounter any connection issues, our detailed guide on Open WebUI Documentation is ready to assist you.
Warning
When using Docker to install Open WebUI, make sure to include the -v open-webui:/app/backend/data in your Docker command. This step is crucial as it ensures your database is properly mounted and prevents any loss of data.
Tip
If you wish to utilize Open WebUI with Ollama included or CUDA acceleration, we recommend utilizing our official images tagged with either :cuda or :ollama. To enable CUDA, you must install the Nvidia CUDA container toolkit on your Linux/WSL system.
Installation with Default Configuration
-
If Ollama is on your computer , use this command:
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 , use this command:
To connect to Ollama on another server, change the OLLAMA_BASE_URL to the server's URL:
docker run -d -p 3000:8080 -e OLLAMA_BASE_URL=https://example.com -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
-
To run Open WebUI with Nvidia GPU support , use this command:
docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda
Installation for OpenAI API Usage Only
Installing Open WebUI with Bundled Ollama Support
This installation method uses a single container image that bundles Open WebUI with Ollama, allowing for a streamlined setup via a single command. Choose the appropriate command based on your hardware setup:
-
With GPU Support : Utilize GPU resources by running the following command:
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 -
For CPU Only : If you're not using a GPU, use this command instead:
docker run -d -p 3000:8080 -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama
Both commands facilitate a built-in, hassle-free installation of both Open WebUI and Ollama, ensuring that you can get everything up and running swiftly.
After installation, you can access Open WebUI at http://localhost:3000. Enjoy! 😄
Other Installation Methods
We offer various installation alternatives, including non-Docker native installation methods, Docker Compose, Kustomize, and Helm. Visit our Open WebUI Documentation or join our Discord community for comprehensive guidance.
Encountering connection issues? Our Open WebUI Documentation has got you covered. For further assistance and to join our vibrant community, visit the Open WebUI Discord.
Open WebUI: Server Connection Error
If you're experiencing connection issues, it’s often due to the WebUI docker container not being able to reach the Ollama server at 127.0.0.1:11434 (host.docker.internal:11434) inside the container . Use the --network=host flag in your docker command to resolve this. Note that the port changes from 3000 to 8080, resulting in the link: http://localhost:8080.
Example Docker Command :
docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Keeping Your Docker Installation Up-to-Date
Check our Updating Guide available in our Open WebUI Documentation.
Warning
The :dev branch contains the latest unstable features and changes. Use it at your own risk as it may have bugs or incomplete features.
If you want to try out the latest bleeding-edge features and are okay with occasional instability, you can use the :dev tag like this:
docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui --add-host=host.docker.internal:host-gateway --restart always ghcr.io/open-webui/open-webui:dev
If you are running Open WebUI in an offline environment, you can set the HF_HUB_OFFLINE environment variable to 1 to prevent attempts to download models from the internet.
Discover upcoming features on our roadmap in the Open WebUI Documentation.
This project contains code under multiple licenses. The current codebase includes components licensed under the Open WebUI License with an additional requirement to preserve the "Open WebUI" branding, as well as prior contributions under their respective original licenses. For a detailed record of license changes and the applicable terms for each section of the code, please refer to LICENSE_HISTORY. For complete and updated licensing details, please see the LICENSE and LICENSE_HISTORY files.
If you have any questions, suggestions, or need assistance, please open an issue or join our Open WebUI Discord community to connect with us! 🤝
If you believe you've found a security vulnerability, or something that shouldn't be disclosed publicly, please reach out confidentially through our responsible disclosure program on GitHub. We accept reports only through GitHub, not through any other platform. Thank you for helping us keep Open WebUI secure!
Created by Timothy Jaeryang Baek - Let's make Open WebUI even more amazing together! 💪

