Self-host LibreChat with Levelrail

A self-hosted ChatGPT-style interface for many model providers, with agents, search, and multi-user login.

  • AuthorLibreChat-AI
  • LicenceMIT
  • Memory2 GiB
  • Archarm64
  • Services3

How to self-host LibreChat

  1. Pull the images

    3 images are pulled on your server.

    Show images
    • ghcr.io/danny-avila/librechat:v0.8.7
    • getmeili/meilisearch:v1.54.0
    • mongo:7
  2. Create the app

    3 services start in a single Compose app, with 3 named volume mounts for your data, on port 3080.

  3. Fill in the secrets

    6 secrets are generated and stored encrypted, 8 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

LibreChat requirements

Memory
About 2 GiB
Architectures
amd64 image published, arm64 image published
Ports
3080
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
MIT, permissive license
  • Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
  • Host ports. It publishes port 3080 on the host, so open them in the VPS firewall only if you want that.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then LibreChat. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the LibreChat docs page.

Deploy LibreChat your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy LibreChat from the CLI

levelrail-cli templates deploy librechat --name my-librechat

Deploy LibreChat with the API

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/librechat/deploy

LibreChat configuration

LibreChat services

ServiceImagePortsVolumes
librechat ghcr.io/danny-avila/librechat:v0.8.7 3080 librechat_images -> /app/client/public/images
meilisearch getmeili/meilisearch:v1.54.0 none librechat_meili_data -> /meili_data
mongo mongo:7 none librechat_mongo_data -> /data/db

LibreChat environment variables

VariableServiceValue
ALLOW_REGISTRATION librechat Preset by the template
CREDS_IV librechat Generated at deploy
CREDS_KEY librechat Generated at deploy
DOMAIN_CLIENT librechat Preset by the template
DOMAIN_SERVER librechat Preset by the template
HOST librechat Preset by the template
JWT_REFRESH_SECRET librechat Generated at deploy
JWT_SECRET librechat Generated at deploy
Show all 14 variables
  • MEILI_HOSTlibrechatPreset by the template
  • MEILI_MASTER_KEYlibrechatGenerated at deploy
  • MONGO_URIlibrechatPreset by the template
  • PORTlibrechatPreset by the template
  • MEILI_MASTER_KEYmeilisearchGenerated at deploy
  • MEILI_NO_ANALYTICSmeilisearchPreset by the template

Ports and volumes

Ports
3080
Volumes
3 named mounts: librechat_images -> /app/client/public/images, librechat_meili_data -> /meili_data, librechat_mongo_data -> /data/db

LibreChat FAQ

How much memory does LibreChat need?

The catalog lists about 2 GiB of memory for LibreChat across its 3 services.

Does LibreChat run on arm64?

For LibreChat, an arm64 image is published; amd64 is image published.

What licence is LibreChat under?

LibreChat is licensed under MIT, which is permissive, with few conditions on reuse.

Does LibreChat need configuration before it starts?

No. The template fills in its own defaults and generates secrets at deploy time.

Which database does LibreChat bundle?

The template includes MongoDB, running as its own service.

Which ports does LibreChat use?

LibreChat listens on port 3080 inside the stack.

Where does LibreChat keep its data?

In named volumes: librechat_images mounted at /app/client/public/images, librechat_meili_data mounted at /meili_data and librechat_mongo_data mounted at /data/db.

Can I deploy LibreChat on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id librechat for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image ghcr.io/danny-avila/librechat:v0.8.7, getmeili/meilisearch:v1.54.0, mongo:7 is what you deploy there.

levelrail-cli templates deploy librechat --name my-librechat