LibreChat

Overview

How LibreChat's configuration files work together and how to apply changes

LibreChat uses four main configuration files. Each controls a different aspect of the application -- from environment variables to custom AI endpoints to Docker service overrides.

Configuration Files

.env
librechat.yaml
docker-compose.yml
docker-compose.override.yml

.env -- Server-level settings: API keys, database connection strings, feature flags, and authentication secrets. This is the primary configuration file for most deployments. See the .env reference for all available variables.

librechat.yaml -- Custom AI endpoints, model settings, interface options, and advanced features like MCP servers and agents. This file is optional -- LibreChat works with defaults if it does not exist. See the librechat.yaml guide for setup instructions.

docker-compose.yml -- Defines the Docker services (API server, database, search). Do not edit this file directly -- use an override file instead so your changes survive updates.

docker-compose.override.yml -- Your local customizations to Docker services: volume mounts, port mappings, environment overrides. Docker Compose merges this with the main file automatically. See the Docker override guide.

Applying Changes

Restart Required

After editing any configuration file, you must restart LibreChat for changes to take effect.

docker compose down && docker compose up -d

Next Steps

How is this guide?

On this page