Skip to content

ChatUI ​

Scope: namespaced · Workload: LibreChat via the official chart

The LibreChat web UI, wired to a Gateway. It requires MongoDB and optionally uses Meilisearch for search; both are first-class datastore resources that ChatUI only references.

Spec ​

FieldTypeDescription
secretsRefLocalRef (optional)Same-namespace SecretsManagement to wait for. Leave it out to use plain Kubernetes Secrets you manage yourself — see secretsRef
gatewayRefObjectRefA Gateway (auto-wired if licensed)
gatewayobjectManual endpoint fallback: { url, apiKeySecretRef: { name, key } }. key may be any entry of the Secret (default LITELLM_API_KEY); only that value reaches LibreChat, not the rest of the Secret
onBehalfobjectFor a Wäg gateway: what happens to signed-in users the gateway doesn't know yet (unknownUser: reject (default) | provision, allowedEmailDomains) — see People on a Wäg gateway
organizationRefobjectFor a Wäg gateway: the Organization (in the gateway's namespace, of that gateway) the chat app's application and keys live in. Unset: the gateway's organization — see People on a Wäg gateway
models[]listClient-facing model list. The first is the default and titles new chats. Empty = every model the gateway offers (chats are then titled with the model in use): the referenced gateway's model names are listed, and models added later still appear. Required when the gateway is given by gateway.url — its models cannot be discovered
agentsboolLibreChat's Agents endpoint. Disabled by default (interface.agents: false); set true to enable
hoststringUI hostname
ingressobjectclassName, basic-auth, TLS
mongoDatastoreRef (required)LibreChat's MongoDB store
meilisearchMeilisearchRefSearch backend (optional)
subchartsobjectLibreChat subchart toggles (redis/ragApi only). ragApi starts the RAG API unconfigured; use fileSearch instead, which ignores it
valuesobjectFree-form Helm-values overlay for the librechat chart (see Custom chart values)
imageVolumeobjectVolume for uploaded images: { enabled, size, accessMode, storageClass } — see Image volume
ssoobjectOIDC/SSO login for LibreChat (see SSO)
mcpRefs[]list of ObjectRefMCPServer CRs to wire in (cross-namespace allowed). Referencing any auto-enables Agents (see MCP servers)
fileSearchobjectExperimental. Search the files people upload in a chat: { model, apiKeySecretRef, vectorStore } (a gateway embeddings model, vectors in Postgres with pgvector) — see File search. Free
ocrobjectDocument OCR for uploads: { model } (a gateway OCR model) or { url, modelName, apiKeySecretRef }. Licensed document-ocr — see Document OCR
memoryobjectThe chat app's memory of its users: { enabled, model, learning, messageWindowSize, tokenLimit } — see Memory. Free
sharePointobjectAttach SharePoint and OneDrive files: { baseURL, sharePointScope, graphScope }. Needs sso with Microsoft Entra ID — see SharePoint files. Free

mongo (required) ​

ModeDescription
refA MongoCluster + databaseName (default LibreChat, which must be declared in the cluster's databases[])
externalA connectionSecretRef holding MONGO_URI

MongoDB is required infrastructure, so it is not license-gated.

meilisearch (optional) ​

ModeDescription
ref (default)A MeilisearchInstance
externalhost + masterKeySecretRef
disabledSearch off

The bundled LibreChat MongoDB and Meilisearch subcharts are always disabled — those datastores are managed by their own resources.

What it installs ​

The controller installs the librechat chart as a standalone release in the ChatUI namespace, plus the Forge Gateway config ConfigMap. It translates the resource into chart values (gateway base URL, model list, ingress host + basic-auth, ESO secret names, resolved MONGO_URI / MEILI_HOST, subchart toggles).

For Meilisearch, the controller copies the resolved master key into a same-namespace owned Secret <ui>-meili-key and injects MEILI_MASTER_KEY via global.librechat.env — so a MeilisearchInstance in another namespace still works.

An update replaces the LibreChat pod rather than rolling it (Recreate): the chart keeps uploaded images on a ReadWriteOnce volume, which only one pod can mount, so a new pod placed on another node would wait for it forever. The chat app is unavailable for the few seconds the new pod needs to start.

Image volume ​

Images people upload are kept on a volume, <chatui>-librechat-images. By default it is 10G, ReadWriteOnce, on the cluster's default storage class. spec.imageVolume sets it:

FieldDescription
enabledtrue to apply the fields below
sizeSize, e.g. 20Gi. Unset, the chart's 10G. A volume only grows: a smaller size, or none, keeps the volume's own, and growing needs a storage class that allows it
accessModeReadWriteOnce, ReadWriteMany or ReadOnlyMany. ReadWriteMany needs a storage class that offers it, e.g. azurefile-csi on AKS
storageClassThe storage class
yaml
spec:
  imageVolume: { enabled: true, accessMode: ReadWriteMany, storageClass: azurefile-csi }

An existing volume keeps its access mode and storage class. Kubernetes cannot change them once the volume exists. When spec.imageVolume asks for others, the operator keeps the volume as it is and keeps updating the chat app, and the ImageVolume condition (reason VolumeReplacementNeeded) gives the two commands that replace it:

bash
kubectl -n <namespace> delete pvc <chatui>-librechat-images --wait=false
kubectl -n <namespace> scale deployment <chatui>-librechat --replicas=0

While the old volume is being deleted, the condition says so (reason VolumeReplacing) and the operator holds back the chat app's upgrades; once it is gone, the operator creates the volume as asked and starts the chat app again. The images on the old volume are not copied: copy them yourself first if you need them. The operator never deletes the volume on its own.

Login and encryption keys ​

LibreChat signs logins with JWT_SECRET / JWT_REFRESH_SECRET and encrypts the credentials it stores (MCP OAuth tokens, per-user keys) with CREDS_KEY / CREDS_IV. The operator generates random values for them into <chatui>-librechat-credentials (owned by the ChatUI) on the first reconcile and never changes them — rotating CREDS_KEY would make everything already encrypted unreadable. To bring your own (for example from Key Vault through ESO), provide a Secret named librechat-credentials-env in the ChatUI's namespace holding all four keys; it is used instead.

Chats created before this operator version

LibreChat's Helm chart used to ship fixed example values for these keys, and nothing replaced them. Upgrading gives every ChatUI its own keys: everyone is signed out once, and credentials stored before (MCP OAuth sign-ins, per-user keys) must be entered again. Conversations, agents and memories are not encrypted with these keys and are kept.

Agents endpoint ​

LibreChat ships its Agents endpoint enabled. The operator turns it off by default — it renders interface.agents: false into librechat.yaml — so a fresh ChatUI does not expose agent building. Opt back in with:

yaml
spec:
  agents: true

Referencing any MCP server also switches Agents on, because LibreChat surfaces MCP tools through them. In that case the operator grants only what the tools need:

How Agents were enableduse (run agents)create (in-UI agent builder)
spec.agents: true (explicit opt-in)✅✅
implicitly, by wiring an MCP server✅❌

This matters because agent creation is not admin-gated in LibreChat: the permissions are emitted as an object rather than a bare true, which would inherit LibreChat's create: true default and show the agent builder to every user. share/public stay off in both cases.

Custom chart values ​

Not every librechat chart option is modelled as a CRD field. spec.values is a free-form object merged into the chart values, so you can set anything the chart supports (replica count, pod resources, extra annotations, …) without waiting for a new CRD field:

yaml
spec:
  values:
    replicaCount: 2
    librechat:
      resources:
        limits: { cpu: "2", memory: 2Gi }

Operator-managed keys win. Your values are the base; the operator's computed values (datastore wiring, secret references, the bundled-subchart enabled toggles, and the tracing/SSO env it injects) are layered on top, so spec.values cannot break the wiring the operator depends on. Use the dedicated fields (mongo, meilisearch, subcharts, agents, sso, …) for anything the operator models; reserve spec.values for the long tail.

Gateway wiring ​

  • With the auto-wiring feature and a gatewayRef, the controller mints a LiteLLMVirtualKey on the referenced Gateway, stores it in an owned Secret, and injects baseURL = http://<gw-svc>.<gw-ns>.svc.cluster.local:4000/v1 plus the key.
  • Without it, supply gateway.{ url, apiKeySecretRef } manually. See Auto-Wiring.

People on a Wäg gateway ​

With a gatewayRef to a Wäg gateway, LibreChat names the signed-in user on every request. Each call runs with that person's model access, budget and logging preferences. spec.onBehalf decides what happens to people the gateway does not know yet: reject them (the default), or provision an account for them, which requires allowedEmailDomains. See Each request names the signed-in user.

One chat app per organization. A Wäg application, and so a chat app, belongs to one organization, and Wäg keeps organizations apart: it acts only for an organization's members, and their usage counts in that organization. To serve people of several organizations with their costs kept apart, run one ChatUI per organization and point each at its Organization with spec.organizationRef (an Organization of type waeg or gateway, in the gateway's namespace, referencing that gateway). Its application, chat key and OCR and file-search keys are created there. Until the Organization is Ready, the chat app waits and its Organization condition says why. Changing the field replaces the application and keys. People need to be the organization's members (see Organization members).

yaml
spec:
  gatewayRef: { name: gateway }
  organizationRef: { name: org-b }
  host: chat-b.example.com

Models from the gateway. With spec.modelsFromGateway: true, the chat app shows each person the chat models the Wäg gateway allows them: it fetches the list from the gateway for the signed-in person, asking for chat models only (x-waeg-model-types: chat), instead of using a list written into its config. The config keeps one model, used only when the gateway cannot be reached, and chats are titled with the model in use, so adding or renaming models no longer restarts the chat app. Ignored on a LiteLLM gateway.

yaml
spec:
  gatewayRef: { name: gateway }
  modelsFromGateway: true

SSO / OIDC login ​

spec.sso enables LibreChat's OpenID Connect provider — it turns on ALLOW_SOCIAL_LOGIN and injects the OPENID_* env. The OAuth client credentials come from a same-namespace Secret (via SecretsManagement); the operator mints the OPENID_SESSION_SECRET itself and wires DOMAIN_SERVER/DOMAIN_CLIENT to the UI's public URL so callbacks resolve.

FieldDescription
issuerURLOIDC issuer / discovery base URL
clientSecretRef.nameSecret holding the OAuth client (keys default to client-id / client-secret)
scopesRequested scopes (default openid, profile, email)
providerNameLogin-button label
passwordLoginfalse hides the email/password form, leaving SSO as the only way in (ALLOW_EMAIL_LOGIN=false). Default true. Accounts that only have a password can no longer sign in, so make sure everyone has an SSO account first
apiScopeThe chat app's own API scope, requested at sign-in so each person's token can be exchanged on their behalf (for SharePoint files and on-behalf-of MCP servers). Default api://<client ID>/access_as_user with SharePoint, or with Entra ID and an on-behalf-of MCP server. Set it when your app registration exposes a different Application ID URI or scope

The provider, tenantID, and explicit-endpoint fields of the shared SSO type are Gateway-only and ignored here (LibreChat derives endpoints from issuerURL).

yaml
spec:
  sso:
    issuerURL: https://idp.example.com
    providerName: "Acme SSO"
    clientSecretRef: { name: chatui-oidc }

Attached files ​

People attach files in a chat with the paperclip. Images go to the model as images, for models that can see them. PDFs are read as text and the text goes into the chat: LibreChat extracts it itself, or with Document OCR the OCR model reads the PDF, so scanned PDFs work too.

The operator sets this on purpose. By default LibreChat 0.8.8 hands a PDF to the model as a whole document, which skips Document OCR, works only with providers that accept documents, and is refused by the PII pseudonymizer (it cannot mask a document). Text goes through both gateways and their guardrails like any message.

Document OCR ​

People attach documents in a chat, or give files to an agent as context. Without OCR, LibreChat reads text PDFs and Office files itself but cannot read scanned or image-only PDFs or text in images. spec.ocr sends those uploads through an OCR model on the gateway.

yaml
# Gateway: an OCR model next to the chat models
spec:
  models:
    - { name: gpt, modelName: gpt-4o, model: azure/gpt-4o, refSecretKey: azure-key }
    - name: ocr
      modelName: mistral-ocr
      model: mistral/mistral-ocr-latest   # or azure_ai/…, vertex_ai/…
      refSecretKey: mistral-key
      mode: ocr
---
# ChatUI
spec:
  gatewayRef: { name: gateway }
  ocr: { model: mistral-ocr }

What the operator does:

  • It mints a dedicated key that may call only the OCR model, and copies it into the ChatUI's namespace as <chatui>-ocr-api. The chat key never reaches the OCR model, and OCR models are left out of the chat model list.
  • On a Wäg gateway the key belongs to a separate Wäg application, <namespace>-<chatui>-ocr. The chat application identifies the signed-in user on every request, which LibreChat's OCR call does not do, so it would be refused. The separate application also keeps OCR spend apart from chat spend. Wäg serves OCR for Mistral, Azure AI Foundry and Azure Document Intelligence models.
  • It configures LibreChat's ocr block against the gateway's /v1/ocr, with the key passed as an environment variable rather than written into the config, and exempts the in-cluster gateway from LibreChat's SSRF guard.
  • It reports the result on the DocumentOCR condition. OCR never blocks the chat UI: if it cannot be wired, the chat UI runs without it and the condition says why:
    • DocumentOCRUnlicensed: the licence lacks document-ocr.
    • InvalidTarget: the model doesn't exist or isn't mode: ocr.
    • Waiting: the gateway or the key is not ready yet.

Switching spec.ocr off removes the OCR key.

Without auto-wiring, point it at any Mistral-OCR-compatible endpoint yourself: ocr: { url: https://…/v1, modelName: mistral-ocr-latest, apiKeySecretRef: { name: ocr-key } }. The default key in that Secret is apiKey.

Licensed feature document-ocr (Enterprise; currently also enabled by preview).

Experimental

File search runs LibreChat's RAG API from its development image (librechat-rag-api-dev-lite:latest). LibreChat may change it at any time, so file search can break with a new image even when nothing else changes.

People attach files in a chat with Upload for File Search and ask about them: the files are split into chunks, each chunk is turned into a vector by an embeddings model on the gateway, and the chat model gets the chunks that best match the question. It works in plain chats; LibreChat's Agents need not be on. It works with a LiteLLM and a Wäg gateway, and it is free.

yaml
# Gateway: an embeddings model next to the chat models
spec:
  models:
    - { name: gpt, modelName: gpt-4o, model: azure/gpt-4o, refSecretKey: azure-key }
    - name: embeddings
      modelName: text-embedding-3-small
      model: azure/text-embedding-3-small
      refSecretKey: azure-key
      mode: embedding
---
# ChatUI
spec:
  gatewayRef: { name: gateway }
  fileSearch:
    model: text-embedding-3-small
    vectorStore:
      mode: postgresCluster
      postgresClusterRef: { name: shared-pg }
FieldDescription
modelThe gateway's embeddings model (its modelName or name). With auto-wiring it must exist on the gateway with mode: embedding (on Wäg, or ops listing embed)
apiKeySecretRefA key that may call the model ({ name, key }, default key apiKey). Leave it out to let the operator mint one (below)
vectorStore.modepostgresCluster or external
vectorStore.postgresClusterRefpostgresCluster: the PostgresCluster to keep the vectors on
vectorStore.databaseNamepostgresCluster: the database (default: the ChatUI's name with - and . as _, plus _vectors, e.g. team_chat_vectors)
vectorStore.connectionSecretRefexternal: a Secret in the ChatUI's namespace with the keys host, port, dbname, username and password

The vector database.

  • postgresCluster: the database needs the vector extension. With the auto-wiring licence the PostgresCluster creates the database by itself with the extension. Without it, declare it: databases: [ { name: team_chat_vectors, extensions: [vector] } ]. CloudNativePG's standard and system images ship pgvector (the default image is a system image); the minimal images do not. An external PostgresCluster cannot be used, because the operator cannot create a database there.
  • external: a database you provide, where the vector extension is already enabled (CREATE EXTENSION vector;). The operator does not create it.

The key. With gatewayRef and the auto-wiring licence the operator mints a key that may call only the embeddings model and copies it into the ChatUI's namespace as <chatui>-rag-api. On a Wäg gateway the key belongs to a separate Wäg application, <namespace>-<chatui>-rag, without on-behalf: the RAG API does not say which person a file belongs to when it calls the gateway. Embeddings models are left out of the chat model list and the chat key. Without auto-wiring, file search uses the chat app's gateway.url and gateway.apiKeySecretRef, unless apiKeySecretRef is set. On Wäg that key's application must not require on-behalf.

Each person's files stay theirs. LibreChat signs every request to the RAG API for the signed-in person with its JWT_SECRET, and the RAG API gets the same secret. This works the same for SSO and password sign-in.

Changing the model starts a new index. Vectors from different models cannot be compared, so each model has its own index in the database (files_<model>). Files uploaded before the change are not found any more; people upload them again.

The operator reports the result on the FileSearch condition. File search never blocks the chat UI: if it cannot be wired, the chat UI runs without it and the condition says why:

  • InvalidTarget: the model doesn't exist or isn't an embeddings model, the connection Secret lacks keys, or the PostgresCluster is external.
  • AutoWiringUnlicensed: without auto-wiring, there is no gateway to reach.
  • Waiting: the gateway, the key or the database is not ready yet.

Removing spec.fileSearch removes the RAG API, the minted key and the copied database credentials. The vectors stay in the database.

Memory ​

With memory on, the chat app learns lasting facts about each person — role, projects, tools, preferences — and uses them in later chats. People see and edit what is kept in the chat app's Memories panel and can switch their own memory off.

yaml
spec:
  memory:
    enabled: true
    model: gpt-4o-mini        # a chat model on the gateway; small and fast is enough
    learning: automatic       # or: explicit
    # messageWindowSize: 5    # recent messages read each turn
    # tokenLimit: 2000        # cap per person
  • learning: automatic (default) keeps useful facts as they come up, and never secrets, sensitive personal data (health, religion, politics, …) or details about other people. explicit keeps only what a person asks it to remember ("remember that …"), LibreChat's own behaviour.
  • model must be one of the chat app's models. Otherwise automatic memory stays off and the Memory condition says why.
  • It costs tokens: after every chat turn the memory model reads the recent messages, one extra call per turn. The calls go through the gateway with the chat app's key and the person's identity, so they show up in the gateway's usage and budgets like the chats.
  • enabled: false switches memory off for everyone (manual memories included). Without memory, LibreChat's default applies: people can add memories by hand, nothing is learned automatically.

Memory is free (no licence needed). Memories are stored in the chat app's MongoDB.

SharePoint files ​

spec.sharePoint adds From SharePoint to the attach menu in chats and in the agent file panels. People browse their SharePoint sites and OneDrive and attach files like a local upload. The chat app exchanges each person's sign-in token for SharePoint and Microsoft Graph tokens on their behalf, so people only see files they may open.

It needs spec.sso signing in with Microsoft Entra ID. A ChatUI with sharePoint but no sso is rejected.

yaml
spec:
  sso:
    issuerURL: https://login.microsoftonline.com/<tenant-id>/v2.0
    clientSecretRef: { name: chatui-oidc }
  sharePoint:
    baseURL: https://contoso.sharepoint.com
    # sharePointScope: https://contoso.sharepoint.com/AllSites.Read   # default
    # graphScope: Files.Read.All                                      # default; Files.Read = own files only

Prepare the Entra app registration (the one behind sso.clientSecretRef):

  1. Expose an API: set the Application ID URI to api://<client ID> and add a scope named access_as_user.
  2. API permissions: add the delegated permissions access_as_user (your own API), SharePoint AllSites.Read and Microsoft Graph Files.Read.All.
  3. Grant admin consent for the organization.

If you use another Application ID URI or scope name, set it in sso.apiScope.

What the operator sets on LibreChat:

  • ENABLE_SHAREPOINT_FILEPICKER, SHAREPOINT_BASE_URL and the picker scopes (SHAREPOINT_PICKER_SHAREPOINT_SCOPE defaults to <baseURL>/AllSites.Read, SHAREPOINT_PICKER_GRAPH_SCOPE to Files.Read.All).
  • OPENID_REUSE_TOKENS=true: LibreChat keeps the tokens Entra ID issued at sign-in, refreshes them with offline_access, and exchanges them for the picker. Sign-in sessions then follow the Entra ID tokens, so blocking a user or revoking their sessions in Entra ID also ends their chat session.
  • The API scope in OPENID_SCOPE (default api://$(OPENID_CLIENT_ID)/access_as_user; Kubernetes fills in the client ID from the client Secret). Entra ID only exchanges a token issued for the chat app's own API, not one for Microsoft Graph. Such a token cannot read the Graph profile, so LibreChat reads it through an exchange too (OPENID_ON_BEHALF_FLOW_FOR_USERINFO_REQUIRED=true).

The SharePoint condition shows the tenant the picker points at. If the picker opens on a blank page, Entra ID usually rejected the exchange: check that the API scope matches the app registration and that admin consent was granted.

SharePoint files are free (no licence needed).

MCP servers ​

spec.mcpRefs wires MCPServer CRs (bundled catalog or external) into LibreChat's Agents endpoint. Referencing any server auto-enables Agents; the operator renders the mcpServers config and, for in-cluster targets, the mcpSettings SSRF allowlist — automatically.

yaml
spec:
  mcpRefs:
    - { name: websearch }            # an MCPServer in this namespace
    - { name: docs, namespace: team } # cross-namespace allowed

Hardened defaults & admin model ​

The operator always renders a hardened LibreChat interface, regardless of MCP usage:

  • Native Web Search and Code Interpreter are OFF (interface.webSearch: false, interface.runCode: false). MCP web_search is the supported web-search path.
  • Users cannot add or disable MCP servers from the UI — admins included (interface.mcpServers permission is locked to use only). Only operator config (your MCPServer CRs) defines them.
  • No real admin: on a fresh ChatUI the operator creates a reserved, never-used phantom admin (random in-Job password, never persisted) to claim LibreChat's "first registered user becomes ADMIN" slot, so all real users (Identity CRs, SSO) land as USER. Pre-existing admins are left untouched.

Example ​

yaml
apiVersion: core.navique.com/v1alpha1
kind: ChatUI
metadata:
  name: forge-ui
  namespace: forge-ui
spec:
  secretsRef: { name: chatui-secrets }
  gatewayRef: { name: gateway, namespace: forge-gateway }
  models: [ azure_ai/gpt-5.4 ]
  agents: false            # default — LibreChat Agents endpoint off
  host: chat.forge.example.com
  mongo:
    mode: ref
    ref: { name: forge-mongo, namespace: forge-data }
    databaseName: LibreChat
  meilisearch:
    mode: ref
    ref: { name: forge-ui-search }
  ingress:
    enabled: true
    className: nginx
    basicAuthSecret: forge-ui-basic-auth
  values:                  # free-form chart overlay (operator keys still win)
    replicaCount: 2

Status ​

Deployment availability and the ingress host, plus the standard conditions and observedGeneration.

Open core under AGPL-3.0. Enterprise components are proprietary and license-gated.