Installation
LibreChat offers multiple installation methods to suit different needs, from quick Docker deployments to full local development setups. This guide covers all installation options in detail.Docker (Recommended)
Fastest and most reliable method for production use
npm/Local Installation
Full development environment with hot reloading
Cloud Deployment
One-click deployment to cloud platforms
System Requirements
Minimum Requirements
- CPU: 2 cores
- RAM: 2GB minimum, 4GB recommended
- Storage: 10GB free disk space
- OS: Linux, macOS, or Windows (with WSL2 for Docker)
Software Requirements
- Docker Installation
- Local Installation
- Docker Engine 20.10+
- Docker Compose v2.0+
LibreChat uses the
packageManager field in package.json to specify [email protected]. Modern Node.js installations will automatically use the correct version.Docker Installation (Recommended)
Docker is the recommended installation method for most users. It provides isolation, easy updates, and consistent environments.Standard Docker Setup
Configure Environment
Create and configure your Edit
.env file:.env with your preferred editor. Required configuration:.env
Start Services
Launch all containers:This starts:
- LibreChat (api) - Main application
- MongoDB - Database
- Meilisearch - Search engine
- RAG API - Document processing (optional)
- VectorDB - PostgreSQL with pgvector
Docker Compose Configuration
The defaultdocker-compose.yml includes all services. Here’s what each service does:
docker-compose.yml
Customizing Docker Deployment
Create adocker-compose.override.yml file for customizations (see docker-compose.override.yml.example):
docker-compose.override.yml
Local/npm Installation
Install LibreChat directly on your system for development or when Docker isn’t suitable.Install Dependencies
LibreChat uses npm workspaces. Install all dependencies:This installs dependencies for:
- Root workspace
/api- Backend server/client- Frontend React app/packages/*- Shared libraries
Build the Application
packages/data-provider- Shared API typespackages/data-schemas- Database schemaspackages/api- TypeScript backend codepackages/client- Frontend utilitiesclient- React frontend build
Start the Frontend (Development)
For development with hot module reloading, in another terminal:The dev server runs on
http://localhost:3090 and proxies API requests to :3080Development Commands
Common commands for local development:Cloud Deployment
Deploy LibreChat to cloud platforms with one click:Railway
Deploy to Railway with MongoDB and automatic HTTPS
Zeabur
Deploy to Zeabur with serverless scaling
Sealos
Deploy to Sealos cloud platform
Cloud Deployment Considerations
Environment Variables for Production
.env
Updating LibreChat
Docker Update
Local Installation Update
Troubleshooting
Docker Issues
Container fails to start
Container fails to start
MongoDB connection errors
MongoDB connection errors
File permission errors
File permission errors
Local Installation Issues
Build errors
Build errors
MongoDB not connecting
MongoDB not connecting
Meilisearch not working
Meilisearch not working
Next Steps
Configuration Guide
Configure AI endpoints, authentication, and advanced features
User Management
Set up user accounts, OAuth, and permissions
AI Agents
Create custom AI agents with tools and capabilities
API Reference
Integrate LibreChat with your applications
Need help? Join the Discord community for support, or check the GitHub issues for known problems and solutions.