Skip to main content

LibreChat (optional, LIBRECHAT=1)

Web UI for LLM interaction at /librechat/. Pre-configured with all LiteLLM models and MCP tools. Uses MongoDB for conversation storage.

EndpointURLAuth
Web UIGET /librechat/email/password (own auth)
API/librechat/api/*JWT (managed by LibreChat)

Authentication​

LibreChat has its own email/password authentication, no basic auth (SPAs and basic auth are incompatible due to Authorization header collision). The first registered user automatically becomes admin. After creating your account, set LIBRECHAT_ALLOW_REGISTRATION=false in .env and restart to lock registration.

MCP tools integration​

All MCP tools from the LiteLLM aggregated endpoint are available in LibreChat conversations. Connected via streamable-http with apiKey.source: admin (bypasses LibreChat's OAuth detection probe). Configuration in librechat/librechat.yaml.

Environment variables​

VariableDefaultDescription
LIBRECHAT_DOMAIN_CLIENThttp://librechat:3080/librechatPublic URL for client (sets <base href>)
LIBRECHAT_DOMAIN_SERVERhttp://librechat:3080/librechatPublic URL for server API
LIBRECHAT_CREDS_KEYUnsetEncryption key for stored credentials (64 hex chars)
LIBRECHAT_CREDS_IVUnsetEncryption IV (32 hex chars)
LIBRECHAT_JWT_SECRETUnsetJWT signing secret
LIBRECHAT_TITLE_MODELgroq-gpt-oss-120bModel for auto-titling conversations
LIBRECHAT_ALLOW_REGISTRATIONtrueSet to false after creating admin account
LIBRECHAT_ALLOW_EMAIL_LOGINtrueEnable email/password login
LIBRECHAT_ALLOW_SOCIAL_LOGINfalseEnable social login providers
LIBRECHAT_ALLOW_UNVERIFIED_EMAIL_LOGINtrueAllow login without email verification
LIBRECHAT_DEBUG_LOGGINGtrueEnable debug-level logging
LIBRECHAT_DEBUG_CONSOLEfalseLog to console (in addition to file)
LIBRECHAT_MEM_LIMIT512mLibreChat container memory limit
LIBRECHAT_MEMSWAP_LIMIT1gLibreChat container memory + swap limit
LIBRECHAT_CPUS1.0LibreChat CPU limit
LIBRECHAT_MONGO_MEM_LIMIT512mMongoDB container memory limit
LIBRECHAT_MONGO_MEMSWAP_LIMIT1gMongoDB container memory + swap limit
LIBRECHAT_MONGO_CPUS0.5MongoDB CPU limit
TIMEOUT_LIBRECHAT600sNginx proxy timeout
LIBRECHAT_MAX_BODY_SIZE25mMax upload size
DATA_DIR_LIBRECHAT${DATA_DIR}/librechatData directory (MongoDB + uploads)

Usage​

LibreChat Web UI​

Enable with LIBRECHAT=1 in .env. Access at http://localhost:4000/librechat/.

First-time setup​

  1. Navigate to http://localhost:4000/librechat/
  2. Register an account. The first user automatically becomes admin
  3. Set LIBRECHAT_ALLOW_REGISTRATION=false in .env and restart (docker compose restart librechat) to lock registration

What's pre-configured​

  • All LiteLLM models are available in the model selector (auto-fetched)
  • All MCP tools (browser, storage, claudebox, image generation, TTS) are connected and available in conversations
  • Conversations are stored in MongoDB and persist across restarts
  • WebSocket streaming for real-time responses

Configuration​

All settings are customizable via .env. See the LibreChat service page for the full list of environment variables.

The LibreChat config file at librechat/librechat.yaml controls endpoints, MCP servers, and interface settings. Edit it directly for advanced customization (e.g. adding more MCP servers, changing interface options).