Deploy a LibreChat Helm Chart
Please follow this guidance to deploy LibreChat on Kubernetes using Helm, adjusting as needed for your specific use case. Other Helm charts contributed by the community are listed below in the Community Helm Charts section.
Prerequisites
- A running Kubernetes cluster
- Local installations of
kubectl
and Helm
Configuration
- Use the Credentials Generator to generate secure values for
CREDS_KEY
,JWT_SECRET
,JWT_REFRESH_SECRET
andMEILI_MASTER_KEY
. Place them in a Kubernetes Secret like this (if you change the secret name, remember to update your Helm values):
apiVersion: v1
kind: Secret
metadata:
name: librechat-credentials-env
namespace: <librechat-chart-namespace>
type: Opaque
stringData:
CREDS_KEY: <generated value>
JWT_SECRET: <generated value>
JWT_REFRESH_SECRET: <generated value>
MEILI_MASTER_KEY: <generated value>
- Add credentials for the Kubernetes Secret (dependent on the desired provider):
apiVersion: v1
kind: Secret
. . . .
OPENAI_API_KEY: <your secret value>
- Apply the Secret to the Cluster:
Install Helm Chart
In the root directory, run:
helm install <deployment-name> helmchart
Similar to other Helm charts, there exists a values file that outlines the default settings and indicates which configuration options can be modified.
Create a values.yaml
file populated with the values you want to modify from the default.
Install the Helm chart: helm install librechat helmchart --values <values-override-filel>
Uninstall the Helm Chart
To uninstall the Helm Chart: helm uninstall <deployment-name>
Example: helm uninstall librechat
Migrate 1.x -> 2.x
If you used the chart before version 2.x you may need to update the value
structure.
- Move Config to librechat.configEnv:
- env:
- ALLOW_EMAIL_LOGIN: "true"
- ALLOW_REGISTRATION: "true"
+ librechat:
+ configEnv:
+ ALLOW_REGISTRATION: "true"
+ ALLOW_EMAIL_LOGIN: "true"
- Consolidate all Secret values to a single Secret as described in Configuration Step 1.
- To leverage an external MongoDB instance, refer to the values file of the Chart, deactivate the components accordingly and change the FQDN of the Mongodb instance. This is recommended if data already exists in this externally managed MongoDB instance.
Community Helm Charts
- LibreChat Helm Chart by Blue Atlas Helm Charts # will be depricated soon as its migrated here
- Submitted by @dimaby on GitHub: PR #2879