Where Does Self Hosted LibreChat Store Data?
Self hosted LibreChat config is .env plus librechat.yaml in the project root. Uploads, images, logs, and DB dirs sit beside them.
Last updated
A LibreChat checkout has two config files and a handful of data folders. The .env file (copied from the example) holds secrets and endpoints. The librechat.yaml file shapes models, agents, and UI options. Both live in the project root.
Runtime data fans out beside them. Uploads, public images, and logs are bind mounts in the compose file, while Mongo and MeiliSearch keep their own data dirs. The temp credentials file persists in a data volume so restarts do not rotate secrets. Guard that volume and the .env with the same care.
Where LibreChat stores this, by platform
/opt/LibreChat/.env
Secrets and provider keys. Never commit this file. Copy from .env.example and fill in real values.
/opt/LibreChat/librechat.yaml
Model and feature config mounted into the api container. Validate YAML syntax before restarting.
/opt/LibreChat/uploads
User uploads bind mount. Back up alongside Mongo dumps for full restores.
Frequently asked questions
How do I back up LibreChat?
Back up .env, librechat.yaml, and the uploads, images, and data folders together. Mongo holds chats, so dump it rather than copying raw files across versions.
How do I add a model provider?
Add the provider block to librechat.yaml or set the key in .env, then restart. Check effective values with compose exec api env on the running container.
Notice an outdated path? Let us know.