librechat

by hajowieland

Helm chartv1.1.0App v0.7.8Verified publisher

Helm Chart for LibreChat

About this chart

librechat

Helm Chart for LibreChat

TL;DR;

helm repo add hajowieland https://charts.wieland.tech
helm repo update
helm install my-release hajowieland/librechat

Introduction

This chart deploys the RAG API for LibreChat.

Prerequisites

Then you can reference the MongoDB connection string Secret:

config:
  envSecrets:
    secretRef: librechat
    secretKeyRef:
      - name: MONGO_URI
        secretName: librechat-mongo-admin-librechat
        secretKey: "connectionString.standard"

Installing the Chart

To install the chart with the release name my-release:

helm repo add hajowieland https://charts.wieland.tech
helm repo update
helm install my-release hajowieland/miniflux

The Values section lists the values that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall the my-release deployment:

helm uninstall my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Tips

The minimum required credentials are:

  • https://www.librechat.ai/toolkit/creds_generator
  • OPENAI_API_KEY (can be a dummy)

User registration

By default, registration for new users is disabled for security purposes. The first to register will be assigned admin privileges.

Enable registration via:

config:
  env:
    ALLOW_REGISTRATION: "true"
    # ALLOW_SOCIAL_REGISTRATION: "true" # if you plan to use OIDC (you need additional configuration)

Deploy all components

You can optionally deploy other LibreChat components.

Please set .wait.enabled to true to make sure all components below are up and running before starting LibreChat itself.

Meilisearch

https://www.meilisearch.com

meilisearch:
  enabled: true

rag_api

https://github.com/danny-avila/rag_api

Check the requirements (Postgres database) here: https://github.com/hajowieland/charts/tree/main/charts/librechat-rag-api#prerequisites

ragapi:
  enabled: true

sandpack

To use the Artifacts feature and host the sandpack library yourself:

sandpack:
  enabled: true

Prometheus Exporter

For more observability of your LibreChat deployment, you can enable the librechat_exporter.

See more info about configuration options here: https://github.com/hajowieland/charts/tree/main/charts/librechat-exporter

exporter:
  enabled: true

Values

KeyTypeDefaultDescription
affinityobject{}
autoscaling.enabledboolfalse
autoscaling.maxReplicasint100
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
config.env.ALLOW_EMAIL_LOGINstring"true"
config.env.ALLOW_REGISTRATIONstring"false"
config.env.ALLOW_SOCIAL_LOGINstring"false"
config.env.ALLOW_SOCIAL_REGISTRATIONstring"false"
config.envSecrets.secretKeyReflist[]
config.externalDomainstring""sets DOMAIN_CLIENT and DOMAIN_SERVER, should be the external URL like https://chat.example.com
config.librechatYamlobject{"version":"1.2.5"}Examples: https://github.com/LibreChat-AI/librechat-config-yaml
exporter.enabledboolfalse
fullnameOverridestring""
image.digeststring""
image.pullPolicystring"IfNotPresent"
image.repositorystring"ghcr.io/danny-avila/librechat"
image.tagstring""
imagePullSecretslist[]
ingress.annotationsobject{}
ingress.classNamestring""
ingress.enabledboolfalse
ingress.hosts[0].hoststring"chat.example.com"
ingress.hosts[0].paths[0].pathstring"/"
ingress.hosts[0].paths[0].pathTypestring"ImplementationSpecific"
ingress.tlslist[]
livenessProbe.httpGet.pathstring"/"
livenessProbe.httpGet.portstring"http"
livenessProbe.initialDelaySecondsint15
livenessProbe.timeoutSecondsint3
meilisearch.enabledboolfalse
meilisearch.environment.MEILI_ENVstring"production"
meilisearch.environment.MEILI_NO_ANALYTICSboolfalse
meilisearch.persistence.enabledboolfalse
nameOverridestring""
networkPolicies.enabledbooltrue
nodeSelectorobject{}
podAnnotationsobject{}
podLabelsobject{}
podSecurityContextobject{}
ragapi.enabledboolfalse
readinessProbe.httpGet.pathstring"/"
readinessProbe.httpGet.portstring"http"
readinessProbe.initialDelaySecondsint15
readinessProbe.timeoutSecondsint3
replicaCountint1
resourcesobject{}
sandpack.applicationNamestring"librechat-sandpack"
sandpack.deployment.containerSecurityContext.readOnlyRootFilesystemboolfalse
sandpack.deployment.containerSecurityContext.runAsNonRootboolfalse
sandpack.deployment.image.pullPolicystring"Always"
sandpack.deployment.image.repositorystring"ghcr.io/librechat-ai/codesandbox-client/bundler"
sandpack.deployment.image.tagstring"latest"
sandpack.deployment.livenessProbe.enabledbooltrue
sandpack.deployment.livenessProbe.httpGet.pathstring"/"
sandpack.deployment.livenessProbe.httpGet.portstring"http"
sandpack.deployment.livenessProbe.httpGet.schemestring"HTTP"
sandpack.deployment.ports[0].containerPortint80
sandpack.deployment.ports[0].namestring"http"
sandpack.deployment.ports[0].protocolstring"TCP"
sandpack.deployment.readinessProbe.enabledbooltrue
sandpack.deployment.readinessProbe.httpGet.pathstring"/"
sandpack.deployment.readinessProbe.httpGet.portstring"http"
sandpack.deployment.readinessProbe.httpGet.schemestring"HTTP"
sandpack.enabledboolfalse
sandpack.service.ports[0].namestring"http"
sandpack.service.ports[0].portint80
sandpack.service.ports[0].protocolstring"TCP"
sandpack.service.ports[0].targetPortint80
securityContext.capabilities.drop[0]string"ALL"
securityContext.readOnlyRootFilesystemboolfalsefilesystems needs to be writable - or LibreChat fails at startup
securityContext.runAsNonRootbooltrue
securityContext.runAsUserint1000
service.portint3080
service.typestring"ClusterIP"
serviceAccount.annotationsobject{}
serviceAccount.createbooltrue
serviceAccount.namestring""
tolerationslist[]
waitobject{"enabled":false,"image":{"pullPolicy":"IfNotPresent","repository":"alpine/curl","tag":"8.12.1"}}initContainer to wait until all components (meilisearch, sandpack, ragapi) are ready before running LibreChat.

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

helm install my-release -f values.yaml hajowieland/miniflux

Deploy librechat with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has librechat on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartlibrechat is pinned at v1.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply