npm
How to install LibreChat locally using npm
For most scenarios, Docker Compose is the recommended installation method due to its simplicity, ease of use, and reliability. If you prefer using npm, you can follow these instructions.
Prerequisites
- Node.js v20.19.0+ (or ^22.12.0 or >= 23.0.0): https://nodejs.org/en/download
- LibreChat uses CommonJS (CJS) and requires these specific Node.js versions for compatibility with openid-client v6
- Git: https://git-scm.com/download/
- MongoDB (Atlas or Community Server)
Installation Steps
Preparation
Run the following commands in your terminal:
Note: If you're using Windows 10, you might need to use
copyinstead ofcp.
Update the MONGO_URI
Edit the newly created .env file to update the MONGO_URI with your own
Build and Start
Once you've completed the preparation steps, run the following commands:
Access LibreChat!
Visit http://localhost:3080/
Tip
- Next time you want to start LibreChat, you only need to execute
npm run backend
Update LibreChat
To update LibreChat to the latest version, run the following commands:
First, stop LibreChat (if you haven't already).
Additional Setup
Unlock additional features by exploring our configuration guides to learn how to set up:
- Meilisearch integration
- RAG API connectivity
- Custom endpoints
- Other advanced configuration options
- And more
This will enable you to customize your LibreChat experience with optional features.
see also:
How is this guide?