跳到主要内容
版本:Current

Quick Start

面向 已有本机部署 的管理员:验证服务是否正常。全新装机请先看 Docker Deployment

1. 检查容器

docker ps --filter name=openwebui --filter name=litellm

期望:

  • openwebuiUp 且 healthy
  • litellmUp
  • 端口:127.0.0.1:3002->8080127.0.0.1:4001->4000

2. 检查 LiteLLM

curl -sS -o /dev/null -w "%{http_code}\n" http://127.0.0.1:4001/
# 期望 200(Swagger 页)

curl -sS -H "Authorization: Bearer <LITELLM_MASTER_KEY>" \
http://127.0.0.1:4001/v1/models
# 期望 200 且列出 config.yaml 中的 model_name

<LITELLM_MASTER_KEY> 替换为 api_keys.env 中的值(勿写入文档或 Git)。

3. 检查 Open WebUI

curl -sS -o /dev/null -w "%{http_code}\n" http://127.0.0.1:3002/
# 期望 200 或 307

浏览器访问:https://ai.bucssa.org(或你的域名)。

4. 在 Open WebUI 中连接 LiteLLM

管理员 → Settings → Connections(或「管理员设置 → 外部连接」):

字段
API Base URLhttp://127.0.0.1:4001/v1http://litellm:4000/v1(容器内)
API KeyLITELLM_MASTER_KEY 相同

保存后,在模型列表中应能看到 LiteLLM 暴露的模型名。

说明:若 docker-compose.yml 里仍写有直连 OPENAI_API_KEY,建议改为仅通过 LiteLLM 走统一路由,避免密钥分散。详见 Open WebUI Settings

5. 发起第一条对话

  1. 登录 Open WebUI
  2. 新建聊天
  3. 选择模型(如 gpt-5-mini
  4. 发送测试消息,确认流式输出正常

下一步