Docker image
LibreChat in Docker. Every AI model, one chat.
LibreChat is a self-hosted, open source AI chat interface: a ChatGPT-style UI in front of many providers (OpenAI, Anthropic, Azure, Google, local models, and more), with conversation history, presets, and per-user API keys.
Prefer not to run it yourself? Managed LibreChat from $13.33/mo
# LibreChat in Docker, base pinned by digest docker pull ghcr.io/remarkablecloud/librechat:0.8.7-r1 docker compose up -d
- Current build
0.8.7-r1, updated Sep 11, 2026- Base
- LibreChat official, digest-pinned
- What's inside
- Multi-provider chat UI, MongoDB and Meilisearch pairing, one env contract
- Upstream license
- LibreChat: MIT
The image
What our image adds.
What changes from upstream LibreChat, and why it matters in production.
Digest-pinned base
Built from ghcr.io/danny-avila/librechat@sha256:c5db3331b845… (LibreChat 0.8.7, Node 24). Pinning by digest keeps rebuilds reproducible.
No open sign-up
Registration is disabled and an initial account is created on first run (generated password, printed once to the log), so a random visitor cannot self-register and spend your LLM credits. You can pin the account with RC_USER_EMAIL / RC_USER_PASSWORD.
Persistent encryption keys
LibreChat encrypts the provider API keys users store with CREDS_KEY / CREDS_IV; we generate these (and the JWT secrets) on first run and persist them in the data volume, so they stay stable and stored keys remain readable across restarts and upgrades.
Single-container friendly
Search (Meilisearch) is off by default, so the app runs with just MongoDB.
Healthcheck
The upstream image ships no curl, so we use a HEALTHCHECK on /health via wget. The current published tag is ghcr.io/remarkablecloud/librechat:0.8.7-r1.
Run it yourself, or not
Same image either way.
Pull it and run it anywhere, or let us run LibreChat for you on a managed server with updates, monitoring and snapshots.
Run LibreChat yourself
- Pull it from GHCR and run it on any Docker host
- The guide below: compose, environment, backups, upgrades
- You patch, back up and watch it
LibreChat on a managed server
- Installed for you from this same image, $0 for the app
- Updates with a snapshot first, monitoring and a managed firewall
- A 4 GB server from $13.33/mo billed annually, with room for more apps
The guide
Run it in production.
Compose file, environment reference, hardening, backups and upgrades, written by the people who build the image.
On this page
Architecture at a glance
- LibreChat serves the UI and API on port
3080. TLS is terminated upstream by a reverse proxy (Traefik on the RemarkableCloud App Platform). - MongoDB is a separate database container and holds users, conversations, and messages.
- Data volumes hold the generated secrets (
/app/rc-data), uploaded files (/app/uploads), and images (/app/client/public/images). - LLM providers are external: each user adds their own provider API key in the UI (encrypted at rest).
Docker Compose walkthrough
The standalone stack (LibreChat and MongoDB) is defined in the image’s docker-compose.yml:
name: librechat
services:
mongo:
image: mongo:7
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: librechat
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASSWORD:-change-me-db}
volumes: [mongo-data:/data/db]
librechat:
image: ${LIBRECHAT_IMAGE:-ghcr.io/remarkablecloud/librechat:0.8.7-r1}
restart: unless-stopped
depends_on: [mongo]
ports: ["${HTTP_PORT:-3080}:3080"]
environment:
MONGO_URI: mongodb://librechat:${DB_PASSWORD:-change-me-db}@mongo:27017/LibreChat?authSource=admin
RC_USER_EMAIL: ${RC_USER_EMAIL:-}
RC_USER_PASSWORD: ${RC_USER_PASSWORD:-}
volumes:
- librechat-data:/app/rc-data
- librechat-uploads:/app/uploads
- librechat-images:/app/client/public/images
volumes:
mongo-data:
librechat-data:
librechat-uploads:
librechat-images:
Step by step:
- MongoDB holds all chat state. The
authSource=adminin the URI matches Mongo’s root user. - The initial account is created for you. On first run the image creates an account (or uses
RC_USER_EMAIL/RC_USER_PASSWORD) and logs the login once; open registration stays off. - Only the app port is exposed.
${HTTP_PORT:-3080}:3080is for local use; in production the proxy connects to port3080on the internal network. - State lives in volumes. The three LibreChat volumes plus
mongo-datapersist across restarts and upgrades.
To start it locally:
DB_PASSWORD=$(openssl rand -hex 16) docker compose up -d
Then read the login from docker compose logs librechat, open http://localhost:3080, sign in, and add your LLM provider API key in the UI.
Environment variable reference
These are wired automatically by the App Platform backend from the managed MongoDB; they are listed here for standalone and self-hosted runs.
| Variable | Required | Value / default | Purpose |
|---|---|---|---|
MONGO_URI | yes | mongodb://<user>:<pass>@<host>:27017/<db>?authSource=admin | MongoDB connection. |
RC_USER_EMAIL | no | admin@example.com | Initial account email. |
RC_USER_PASSWORD | no | (generated) | Initial account password. Leave empty to auto-generate on first run (printed once). |
CREDS_KEY / CREDS_IV | no | (generated) | Encrypt stored provider keys. Auto-generated and persisted; keep stable. |
JWT_SECRET / JWT_REFRESH_SECRET | no | (generated) | Sign auth tokens. Auto-generated and persisted. |
ALLOW_REGISTRATION=false and SEARCH=false are baked into the image.
Hardening notes
- No self-registration. Only the created account can sign in; enable registration later in the config if you want more users.
- Stable encryption keys. The keys that encrypt stored provider credentials are generated once and persisted, so a restart never orphans them.
- No baked credentials. All secrets are generated at runtime or supplied by you, never stored in an image layer.
- Digest-pinned base. Each build is auditable and reproducible.
- Keep MongoDB private. Do not publish its port to the host or the internet.
Backups
Capture the database and the data volumes together:
- The MongoDB database:
docker compose exec mongo mongodump --username librechat --password "$DB_PASSWORD" \ --authenticationDatabase admin --db LibreChat --archive > librechat-db.archive - The data volumes (secrets, uploads, images):
for v in data uploads images; do docker run --rm -v librechat_librechat-$v:/data -v "$PWD":/backup alpine \ tar czf /backup/librechat-$v.tgz -C /data . done
Keep the secrets volume (/app/rc-data) with the database backup: without the matching CREDS_KEY, stored provider keys cannot be decrypted. On the RemarkableCloud App Platform, database and volume backups follow the platform’s backup schedule.
Upgrades
- New builds ship as new
-rtags. Pull the new tag and recreate the container; LibreChat applies any database changes it needs on start:docker compose pull librechat && docker compose up -d librechat - Back up first, and keep the database archive and the
/app/rc-dataarchive from just before the upgrade. - Read the changelog. Every build is listed in
CHANGELOG.mdwith the base image digest and any behavior changes.
Changelog
Each build is pinned by digest and recorded here, so you can see what changed before you pull a new tag.
-
0.8.7-r1Current Sep 11, 2026
LibreChat and other product names are trademarks of their respective owners. RemarkableCloud is not affiliated with or endorsed by them.
FAQ
LibreChat in Docker, answered.
Short answers from the people who build and run this image.
Do I need a database?
Yes. LibreChat stores users, conversations, and messages in MongoDB. The standalone compose file includes it.
How do I log in the first time?
The initial account (email and generated password) is printed once to the container log on first run. Registration is off, so this is the account to sign in with.
Do I need my own LLM key?
Yes. LibreChat is a front end to external providers; each user adds their provider API key in the UI, stored encrypted.
Can I add more users?
Yes, deliberately: create them with the create-user script, or enable registration in the LibreChat config.
How does HTTPS work if the container serves HTTP on 3080?
TLS is terminated at the reverse proxy (Traefik on the App Platform), which forwards to port 3080 on the internal network.
Pull it, or let us run it.
The same image runs LibreChat on our managed servers, updates and monitoring included.