Self-host LibreChat with Docker
A self-hosted ChatGPT-style interface for many model providers, with agents, search, and multi-user login.
This page describes the Levelrail template for LibreChat (AI). It deploys the services below as one Docker Compose app on your own server.
Project site: https://www.librechat.ai/docs.Recommended memory: about 2048 MiB.
Services, ports and volumes
| Service | Image | Container ports | Volumes |
|---|---|---|---|
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 |
Environment variables
| Service | Variable | Value |
|---|---|---|
librechat | ALLOW_REGISTRATION | Preset in the template |
librechat | CREDS_IV | Generated at deploy |
librechat | CREDS_KEY | Generated at deploy |
librechat | DOMAIN_CLIENT | Preset in the template |
librechat | DOMAIN_SERVER | Preset in the template |
librechat | HOST | Preset in the template |
librechat | JWT_REFRESH_SECRET | Generated at deploy |
librechat | JWT_SECRET | Generated at deploy |
librechat | MEILI_HOST | Preset in the template |
librechat | MEILI_MASTER_KEY | Generated at deploy |
librechat | MONGO_URI | Preset in the template |
librechat | PORT | Preset in the template |
meilisearch | MEILI_MASTER_KEY | Generated at deploy |
meilisearch | MEILI_NO_ANALYTICS | Preset in the template |
Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.
Deploy LibreChat with Levelrail
In the dashboard, open Apps, choose New app, then Browse templates, and select LibreChat. Review the Compose body and deploy.
With the CLI:
levelrail-cli templates deploy librechat --name my-librechatSee Service template catalog for how templates work, and Getting started if you have not installed Levelrail yet.
More AI templates
All templates are listed in the self-host gallery.