Skip to main content
Get your LibreChat instance up and running in minutes. This guide uses Docker for the fastest setup experience.

Prerequisites

Before you begin, ensure you have:
  • Docker Desktop (v20.10+) installed and running
  • At least one AI provider API key (OpenAI, Anthropic, or Google)
  • 4GB of free RAM and 10GB of disk space
LibreChat supports multiple AI providers. You can start with one and add more later.

Installation

1

Clone the repository

Open your terminal and clone LibreChat:
git clone https://github.com/danny-avila/LibreChat.git
cd LibreChat
2

Create your environment file

Copy the example environment file to create your configuration:
cp .env.example .env
3

Configure your API keys

Open the .env file in your text editor and add your API keys. At minimum, configure one AI provider:
# Replace 'user_provided' with your actual API key
OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxxxxxxxxx
You can add multiple providers by configuring multiple API keys. See the AI Endpoints documentation for all supported providers.
4

Set user permissions (Linux/macOS only)

If you’re on Linux or macOS, set the correct user permissions:
# Get your user ID and group ID
echo "UID=$(id -u)"
echo "GID=$(id -g)"
Then update these values in your .env file:
UID=1000
GID=1000
Windows users can skip this step. Docker Desktop for Windows handles permissions automatically.
5

Start LibreChat

Launch all services using Docker Compose:
docker compose up -d
This command will:
  • Download the LibreChat container images (~2-3GB)
  • Start MongoDB, Meilisearch, RAG API, and the main LibreChat application
  • Initialize the database
The first run takes 5-10 minutes to download images. Subsequent starts are much faster (under 30 seconds).
6

Access LibreChat

Once the containers are running, open your browser and navigate to:
http://localhost:3080
You’ll see the LibreChat login page. Click Sign up to create your account.
7

Create your first account

Fill in the registration form:
  • Email address
  • Name
  • Username
  • Password (minimum 8 characters)
Click Submit to create your account.
8

Start your first conversation

After logging in:
  1. Select your AI provider from the top dropdown menu
  2. Choose a model (e.g., gpt-4o, claude-sonnet-4, or gemini-2.5-pro)
  3. Type your message in the text box
  4. Press Enter or click Send
Congratulations! You’re now chatting with AI through LibreChat.

What’s Next?

Now that LibreChat is running, explore these features:

Configure AI Endpoints

Add more AI providers and customize model settings

Create Agents

Build custom AI assistants with specialized tools and capabilities

Enable Web Search

Let your AI search the internet for real-time information

Set Up Authentication

Configure OAuth, LDAP, or SSO for your team

Troubleshooting

If port 3080 is already taken on your system, change it in your .env file:
PORT=3090
Then restart the containers:
docker compose down
docker compose up -d
Access LibreChat at http://localhost:3090 instead.
Check if all containers are running:
docker compose ps
View logs for errors:
docker compose logs
Common issues:
  • Docker Desktop not running (start it first)
  • Insufficient disk space (free up at least 10GB)
  • Port conflicts (change ports in .env)
This means LibreChat can’t find your API key. Verify:
  1. You’ve replaced user_provided with your actual key in .env
  2. There are no extra spaces or quotes around the key
  3. You’ve restarted the containers after editing .env:
docker compose restart
If you see MongoDB connection errors:
# Stop all containers
docker compose down

# Remove volumes (this will delete data)
docker compose down -v

# Start fresh
docker compose up -d
Using -v will delete all conversations and user data. Only use this for a fresh installation.
Check that the required directories exist and have proper permissions:
# Linux/macOS
mkdir -p images uploads logs
chmod -R 755 images uploads logs

# Windows (PowerShell)
New-Item -ItemType Directory -Force images, uploads, logs
Then restart:
docker compose restart
If AI responses are slow:
  1. Check your internet connection
  2. Verify your API key has sufficient quota/credits
  3. Try a faster model (e.g., gpt-4o-mini instead of gpt-4o)
  4. Check container resource usage:
docker stats
Ensure Docker has at least 4GB of RAM allocated in Docker Desktop settings.

Managing LibreChat

docker compose down

Getting Help

Need assistance? Here are your resources:
Before asking for help, check the logs with docker compose logs and include any error messages in your question.

Build docs developers (and LLMs) love