Installation Methods
Choose the installation method that best fits your needs:Docker (Recommended)
Production-ready deployment with all dependencies managed
Local Development
For contributing or custom development work
- Docker Installation
- Local Development
Docker Installation
Docker is the recommended way to run LibreChat. It handles all dependencies and ensures consistent behavior across systems.Prerequisites
Install Docker
You need Docker and Docker Compose installed:
- Windows
- macOS
- Linux
- Download Docker Desktop for Windows
- Run the installer
- Restart your computer
- Verify installation:
Minimum Requirements:
- 4GB RAM (8GB+ recommended)
- 10GB disk space
- Docker Engine 20.10+ and Docker Compose 2.0+
Configuration
Create Environment File
Copy the example environment file:The
.env file contains all configuration options. Key settings:Configure AI Providers
Add your API keys to
.env:Where to get API keys
Where to get API keys
- OpenAI: platform.openai.com/api-keys
- Anthropic: console.anthropic.com
- Google AI Studio: aistudio.google.com/apikey
- Azure: Requires Azure subscription and OpenAI resource deployment
- AWS Bedrock: Enable Bedrock in AWS Console and create IAM credentials
Using custom endpoints (Ollama, LM Studio, etc.)
Using custom endpoints (Ollama, LM Studio, etc.)
For local or custom AI providers, create
librechat.yaml:host.docker.internal allows Docker containers to access services on your host machine.Launch LibreChat
Start Services
Launch all containers:This command:
- Downloads required Docker images (LibreChat, MongoDB, Meilisearch, RAG API)
- Creates containers and networks
- Initializes databases
- Starts all services in the background
First run takes 2-5 minutes to download ~2GB of images and initialize databases.
Monitor Startup
Watch the logs to confirm successful startup:Wait for:Press
Ctrl+C to exit logs (services continue running).Docker Compose Services
Thedocker-compose.yml file defines these services:api (LibreChat)
api (LibreChat)
Main application server:
- Image:
registry.librechat.ai/danny-avila/librechat-dev:latest - Port: 3080
- Volumes:
.env,images/,uploads/,logs/ - Depends on: MongoDB, Meilisearch, RAG API
mongodb
mongodb
Database for conversations, users, and settings:
- Image:
mongo:8.0.17 - Port: 27017 (internal)
- Volume:
./data-node - Command:
mongod --noauth
./data-node/ directory.meilisearch
meilisearch
Full-text search engine for conversations:
- Image:
getmeili/meilisearch:v1.35.1 - Port: 7700 (internal)
- Volume:
./meili_data_v1.35.1 - Master Key: From
MEILI_MASTER_KEYin.env
rag_api
rag_api
RAG (Retrieval-Augmented Generation) API:
- Image:
registry.librechat.ai/danny-avila/librechat-rag-api-dev-lite:latest - Port: 8000
- Depends on: vectordb (PostgreSQL with pgvector)
vectordb
vectordb
Vector database for RAG:
- Image:
pgvector/pgvector:0.8.0-pg15-trixie - Port: 5432 (internal)
- Volume:
pgdata2
Docker Management
Custom Docker Overrides
To customize Docker Compose without editing the main file:docker-compose.override.yml to add custom configurations:Post-Installation
First-Time Setup
Create Admin Account
The first registered user becomes the admin:
- Visit
http://localhost:3080 - Click Sign up
- Enter email and password
- Register
Optional Features
Enable web search
Enable web search
Configure search providers in Get keys from:
.env:- Serper: serper.dev
- Firecrawl: firecrawl.dev
- Jina: jina.ai
Enable code interpreter
Enable code interpreter
Configure file storage
Configure file storage
By default, files are stored locally. Configure S3 or Firebase:
- AWS S3
- Firebase
Set up OAuth/SSO
Set up OAuth/SSO
Configure OAuth providers:
Next Steps
Your LibreChat installation is complete! Here’s what to explore:Configuration Guide
Deep dive into librechat.yaml and advanced settings
AI Endpoints
Configure all AI providers and custom models
Create Agents
Build custom AI assistants with tools and knowledge
Enable MCP
Add Model Context Protocol servers
User Management
Manage users, roles, and permissions
Production Deployment
Deploy LibreChat to production
Need help?
- Join Discord for community support
- Check GitHub Discussions
- Report issues on GitHub