> For the complete documentation index, see [llms.txt](https://doc.duaer.com/zh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/zh/integrations/builtin/credentials/chroma.md).

# 在 Duaer 里配置 ChromaDB 凭证

在 Duaer 中保存 ChromaDB 的连接信息，供数字组织节点在运行时使用。密钥经实例加密密钥保护，不会写进节点参数。
## 选 ChromaDB 凭证类型 <a href="#choose-a-credential-type" id="choose-a-credential-type"></a>

Duaer 的 Chroma 向量存储节点支持两种凭证：

- ChromaDB Self-Hosted：Base URL 填实例根地址，例如 http://chroma:8000，不支持路径前缀。服务开了认证时，按配置填 API Key 或 Token，否则都留空。
- ChromaDB Cloud：在 [Chroma Cloud](https://www.trychroma.com/) 的数据库设置里新建 API 密钥，填进 API Key。密钥只限一个数据库时，Tenant ID 和 Database Name 可以留空，Duaer 会自动解析。

Duaer 在 Docker 里时，主机不要填 localhost，改用服务名或宿主机地址。

## ChromaDB Self-Hosted <a href="#chromadb-self-hosted" id="chromadb-self-hosted"></a>

在 Duaer 里新建 ChromaDB Self-Hosted 凭证，填写这些字段：

- Base URL：ChromaDB 实例地址。不支持路径前缀，地址必须直接指向实例根路径。默认 http://localhost:8000。
- Authentication：默认 None，可选 None、API Key、Token。
- API Key（密钥）：Authentication 为 API Key 时显示。
- Token（密钥）：Authentication 为 Token 时显示。

保存时，Duaer 会用这些值测试一次连接。

使用它的 Duaer 节点：[Chroma Vector Store](/zh/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorechromadb.md)。

## ChromaDB Cloud <a href="#chromadb-cloud" id="chromadb-cloud"></a>

在 Duaer 里新建 ChromaDB Cloud 凭证，填写这些字段：

- API Key（必填，密钥）：Chroma Cloud API 密钥。
- Tenant ID：可选：租户 ID（API 密钥只限一个数据库时会自动识别）。
- Database Name：可选：数据库名（API 密钥只限一个数据库时会自动识别）。
- Base URL（必填）：默认 https://api.trychroma.com。

保存时，Duaer 会用这些值测试一次连接。

使用它的 Duaer 节点：[Chroma Vector Store](/zh/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorechromadb.md)。

## 在 Duaer 里保存连接

打开 Credentials，创建 ChromaDB。按字段填写密钥、OAuth 或服务器地址。保存后，数字组织节点引用这份凭证，而不是把密钥写进参数。

凭证内容经实例的加密密钥保护。换密钥或弄丢密钥后，已存凭证会解不开，见托管文档里的加密密钥说明。

## 谁能用这份凭证

能否看到或编辑，取决于项目和角色。不要把密钥贴进聊天或变量。外部密钥库见外部密钥文档。
## Questions

### Duaer 的 ChromaDB 凭证密钥会出现在节点参数里吗？

不会。在 Duaer 里，ChromaDB 的密钥保存在凭证中，节点只引用凭证。执行记录也不应出现明文密钥。

### 在 Duaer 里 ChromaDB 凭证保存失败常见原因是什么？

字段填错、OAuth 回调地址与实例 URL 不一致，或当前角色不能创建凭证。先核对 ChromaDB 服务商要求的字段，再确认你在该项目里有权新建凭证。

