Skip to main content

Overview

LibreChat is an open-source (MIT) ChatGPT-style chat interface that talks to OpenAI, Anthropic, Google and any OpenAI-compatible server (Ollama, vLLM, LiteLLM, OpenRouter) from one place, with per-user accounts, agents, presets and conversation search. This template deploys the LibreChat web UI and API on a standard workload together with a MongoDB database and a Meilisearch search index. Chat over your uploaded files and 2-4 replicas are optional. The administrator account comes from a secret you create before installing, and self-service registration is off, so the UI is ready to sign in to on its public URL as soon as it starts. Model providers are optional: add API keys or point at your own model servers, or let each user bring a key.
This template does not create a GVC. You must deploy it into an existing GVC that you already have. The GVC must have exactly one location, because the datastores are single-instance and the uploaded-files volume exists per location.

What Gets Created

Each datastore also creates its own identity and policy. The template creates no credential of its own: every key and password lives in a secret you create.

Prerequisites

Four secrets must exist before you install (more when you turn on optional features). Secrets are org-level, so no GVC flag is involved. The MongoDB and Redis passwords go into connection strings, so use URL-safe values such as openssl rand -hex 32.
1

Create the encryption and signing keys secret

A dictionary secret with exactly four keys. CREDS_KEY and CREDS_IV encrypt every API key your users save, so never change them; changing a JWT_* value signs everyone out:
Set keys.secretName to this name.
2

Create the admin account secret

A dictionary secret with the keys email and password (8 or more characters). LibreChat creates this account on its first start, before the UI serves:
Set admin.secretName to this name.
3

Create the MongoDB credentials secret

A dictionary secret with username, password and database:
Set mongodb.config.credentialsSecretName to this name.
4

Create the Meilisearch key secret

An opaque secret with plain encoding and a key of 16 or more bytes. Required while search.enabled is true:
Set meilisearch.auth.secretName to this name.
5

Optional: create the model API key secrets

One opaque secret per provider key, shared by every user, using the same create-opaque form with --name PROVIDER_KEY_SECRET_NAME. Reference them from providers.openai.apiKeySecretName, providers.anthropic.apiKeySecretName, providers.google.apiKeySecretName, a custom endpoint’s apiKeySecretName, and rag.embeddings.apiKeySecretName. Local servers such as Ollama need no key.
6

Optional: create the pgvector and Redis secrets

For rag.enabled: true, a dictionary secret with username, password and database, set as pgvector.config.credentialsSecretName. For redis.enabled: true, a dictionary secret with the key password, set as redis.redis.auth.fromSecret.name:
Create the secrets before installing, or the deployment wedges silently. A name that points at a secret which does not exist installs “successfully” and then never starts, and cpln logs returns zero lines. The one place the reason appears is status.versions[].message:
Use get-deployments; plain cpln workload get has no versions key. Once the secret exists the workload recovers on its own, or run cpln workload force-redeployment RELEASE_NAME-librechat --gvc GVC_NAME to skip the wait.
Backups of the database need a bucket and cloud access; see Backing Up.

Installation

Install from the marketplace registry with the four required values, the names of the secrets you created:
Then follow the instructions for your preferred method:

UI

Browse, install, and manage templates visually

CLI

Manage templates from your terminal

Terraform

Declare templates in your Terraform configurations

Pulumi

Declare templates in your Pulumi programs

Configuration

Image and Core Settings

  • replicas — 1 is the lighter shape; 2-4 keep chat up through restarts and upgrades and require redis.enabled: true. Document search runs the same count.
  • admin.secretName — read on the first start only; later changes to the secret change nothing.
  • Every other MongoDB template value works under mongodb, for example mongodb.backup.

Model Providers

A provider with an empty apiKeySecretName is off. A custom endpoint is any OpenAI-compatible server, shown by name in the model menu; private addresses such as *.cpln.local work. Use the fully qualified WORKLOAD_NAME.GVC_NAME.cpln.local form for servers in the same GVC.

Extra LibreChat Settings

config is merged over the generated librechat.yaml (lists replace). Never put an API key here: the file is part of the workload spec, so reference a key with ${VAR}. See the librechat.yaml reference.

MCP Servers

MCP servers go in config.mcpServers. This example connects the Control Plane MCP server. Each user clicks Connect on it in the chat’s MCP menu and signs in to Control Plane with OAuth, so no token is stored in the chart:
Every tool’s description is sent with each message, and the full toolset has about 95 tools. If LibreChat reports that the context is exceeded, raise Max Context Tokens in the model’s parameters, up to the model’s limit.

Search Files and Redis

Every other meilisearch, pgvector and redis template value works under its key too.

Access

Connecting

Read the public URL:
When publicAccess.enabled is false, reach the UI through a tunnel:

First Run

Open the web UI and sign in with the admin email and password. Add models through the providers or custom endpoints you configured, or ask users to enter their own keys when providers.userProvidedKeys is true. To use the Control Plane MCP server, set it up as shown in MCP Servers and have each user connect from the MCP menu.

Operations

Backing Up

Chats, users and settings live in MongoDB. Enable scheduled backups to object storage with the mongodb.backup values; the prerequisites (bucket, cloud account, access) and restore steps are on the MongoDB page. Uploaded files are not backed up: the shared files volume takes no snapshots, and uninstalling deletes every volume.

Scaling and Availability

Set replicas to 2-4 and redis.enabled to true to keep chat available through restarts and upgrades. With Redis on, a browser that reconnects mid-answer picks the answer up on any replica; an answer is lost if the replica generating it crashes. The datastores are single-instance, so a MongoDB restart is a short outage. Answers are capped at 10 minutes per request.

Troubleshooting

A prerequisite secret is missing or misnamed. Run cpln workload get-deployments RELEASE_NAME-librechat --gvc GVC_NAME -o yaml and read status.versions[].message, then create the secret. See the warning under Prerequisites.
A large toolset such as toolsets=full sends many tool descriptions with every message. Raise Max Context Tokens in the model’s parameters, up to the model’s limit.
The chart refuses replicas outside 1-4, more than 1 replica without redis.enabled: true, redis.mode other than dev, a plaintext Redis password, a custom endpoint named after a built-in one or with a duplicate name, a non-http(s) baseURL or no models, a customDomain with a path, and rag.enabled without rag.embeddings.apiKeySecretName or rag.embeddings.baseUrl. The error message names the value to fix.

Important Notes

  • Never change CREDS_KEY or CREDS_IV. Saved user API keys become unreadable.
  • The admin secret is read on first start only. Afterwards change the password in the UI.
  • Never put an API key in config. Reference it with ${VAR}.
  • Decide on document search before indexing. Changing rag.embeddings.model after files are indexed breaks their search.
  • Use one GVC location. Extra locations duplicate single-instance datastores.
  • Uninstall deletes every volume, including uploaded files.

External References