AI & Chat

librechat

LibreChat multi-model AI chat — MongoDB (provisioned externally), Redis sessions, optional Meilisearch, OIDC SSO

@r8s/librechat

librechatchatllmrag

Components (1)

01

LibreChat

LibreChat — multi-model AI chat UI with external MongoDB, Redis sessions, optional Meilisearch and OIDC SSO.

import { Platform } from '@r8s/recipes'
import { LibreChat } from '@r8s/librechat'

export default (
  <Platform secrets={{ backend: 'openbao', mount: 'kv', path: 'apps' }}>
    <LibreChat
      name="chat"
      host="chat.example.com"
      mongodb={{ host: 'mongo.data.svc.cluster.local', passwordSecret: 'chat-mongodb-credentials' }}
      sso={{
        issuer: 'https://keycloak.example.com/realms/platform',
        clientId: 'librechat',
        clientSecretRef: { secret: 'librechat-sso', key: 'clientSecret' },
      }}
    />
  </Platform>
)
namestringOptional

Resource name (defaults to 'librechat')

namespacestringOptional

Kubernetes namespace (defaults to 'default')

versionstringOptional

Container image tag (defaults to 'latest' — pin a version in production)

hoststringRequired

Public hostname for the chat UI (required)

portnumberOptional

Port the app listens on in-container (defaults to 3080)

replicasnumberOptional

Number of replicas (defaults to 1)

mongodbMongoConnectionRequired

External MongoDB connection (REQUIRED). LibreChat stores users, conversations and messages in MongoDB — this component does NOT provision it. Run MongoDB separately (replica-set StatefulSet, operator or managed service) and point this prop at it.

cachebooleanOptional

Provision a redis replication group for session caching (default: true)

searchbooleanOptional

Add a Meilisearch sidecar service for full-text / RAG search (default: false). MEILI_MASTER_KEY is shared from the app secrets bundle (key: meiliMasterKey). Sets SEARCH=true on the app so it actually queries the meilisearch instance.

sso{ issuer: string, clientId: string, clientSecretRef: SecretRef, scopes?: string }Optional

OIDC SSO client — register LibreChat as a client in Keycloak (the Auth recipe) and reference the client secret through the backend. Uses the upstream OPENID_* env names; ALLOW_SOCIAL_LOGIN plus DOMAIN_SERVER/DOMAIN_CLIENT are set from host.

backendstringOptional

OpenAI-compatible API base URL for model calls (defaults to https://api.berget.ai/v1)

secretsNamestringOptional

Name of an existing Secret holding secretKey, modelApiKey, the multi-user session credentials jwtSecret, jwtRefreshSecret, credsKey, credsIv — and meiliMasterKey when search is enabled. Hex sizing: jwtSecret / jwtRefreshSecret / credsKey are 64 hex chars (32 bytes); credsIv is 32 hex chars (16 bytes — AES-IV). Required unless a secrets backend (openbao/vault) is configured on the surrounding Platform — the backend then provisions them. Plaintext secrets are not supported.

resources{ requests?: { cpu?: string, memory?: string }, limits?: { cpu?: string, memory?: string } }Optional

Requested resources

tls{ secretName: string, clusterIssuer: string }Optional

TLS configuration (defaults to letsencrypt-prod cluster issuer)