Back to all templates
LibreChat logo

LibreChat

Application512MB+ RAM

Open-source AI chat platform supporting multiple AI providers (OpenAI, Anthropic, Google, and more)

aichatllmopenaianthropicchatgpt-alternative

Deploy LibreChat in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select LibreChat

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
Step-by-step deployment guide

Deploy LibreChat on a VPS with Server Compass

Use the LibreChat template in Server Compass to deploy a self-hosted multi-model AI chat interface with MongoDB and Meilisearch on your VPS, then verify the LibreChat web UI in a browser.

About 7 minutesBrowser verified
1
Step 1

Open the server Apps tab

Select your VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Server Compass Apps tab before creating a LibreChat app
2
Step 2

Choose an app template

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Choosing to deploy an app from a Server Compass template
3
Step 3

Search for LibreChat

Use the template picker search to find LibreChat in the Server Compass template catalog.

Searching for LibreChat in the Server Compass template picker
4
Step 4

Select the LibreChat template

Choose the LibreChat template. Server Compass fills the LibreChat, MongoDB, and Meilisearch services.

LibreChat template selected in Server Compass
5
Step 5

Review the LibreChat settings

Confirm the app name and compose services. In this run, the app was named librechat-demo and used host port 3080.

Reviewing LibreChat project settings and compose services
6
Step 6

Deploy LibreChat

Review the generated environment values, confirm the port is available, and click Deploy Now.

Reviewing LibreChat environment variables and port before deployment
7
Step 7

Watch the deployment progress

Keep the deployment modal open while Server Compass uploads the compose file, pulls the LibreChat image, starts the container, and verifies the stack.

Server Compass deploying the LibreChat template on the VPS
8
Step 8

Confirm LibreChat is running

After deployment finishes, return to the Apps tab and confirm the LibreChat app is marked Running with its application URL available.

LibreChat template running in the Server Compass Apps tab
9
Step 9

Open LibreChat in the browser

Open the application URL in a browser. The LibreChat web UI confirms the site is reachable.

The deployed LibreChat web UI loaded in a browser

After LibreChat Opens

  • Create the first LibreChat user account before production use.
  • Configure registration, AI providers, HTTPS, and user access before production use.
  • Add a domain and HTTPS before exposing LibreChat to users.
  • Back up the LibreChat MongoDB volume before relying on it for production chat data.

Verified Result

The LibreChat web UI loaded successfully in a browser.

LibreChat deployment questions

What does the LibreChat template deploy?

It deploys LibreChat with MongoDB for data storage and Meilisearch for search.

Which port did the tutorial use?

The tutorial used host port 3080, which maps to the LibreChat web server on container port 3080.

Why does the guide stop at the first-run web UI?

The tutorial verifies the clean LibreChat web UI because users configure accounts and AI provider keys inside the production app.

Should this become a blog post?

No. The deployment guide should live on the LibreChat template detail page and be linked from the reusable template deployment docs page.

Manual Deployment Guide

Manual LibreChat Setup

For terminal enthusiasts: deploy LibreChat manually with these simple steps.

1

Connect to Your Remote Server

Begin by establishing a secure connection to your server through the terminal.

terminal
# Access your VPS
ssh root@YOUR_SERVER_IP

# With SSH key authentication
ssh -i ~/.ssh/your-private-key root@YOUR_SERVER_IP

First time? Ensure Docker is installed first: curl -fsSL https://get.docker.com | sh

2

Set Up Your App Folder

Create a dedicated folder for your application files.

terminal
# Create and navigate to project directory
mkdir -p ~/apps/librechat
cd ~/apps/librechat
3

Set Up Docker Compose

Create the following docker-compose.yml in your project directory:

docker-compose.yml
services:
  api:
    image: ghcr.io/danny-avila/librechat:latest
    ports:
      - "3080:3080"
    environment:
      - HOST=0.0.0.0
      - PORT=3080
      - MONGO_URI=mongodb://mongodb:27017/LibreChat
      - CREDS_KEY=<your-creds-key>
      - CREDS_IV=<your-creds-iv>
      - JWT_SECRET=<your-jwt-secret>
      - JWT_REFRESH_SECRET=<your-jwt-refresh-secret>
      - OPENAI_API_KEY=user_provided
      - ANTHROPIC_API_KEY=user_provided
      - ALLOW_REGISTRATION=true
      - MEILI_HOST=http://meilisearch:7700
      - MEILI_MASTER_KEY=<your-meili-key>
      - SEARCH=true
    volumes:
      - librechat_uploads:/app/uploads
      - librechat_images:/app/client/public/images
    extra_hosts:
      - "host.docker.internal:host-gateway"
    restart: unless-stopped
    depends_on:
      - mongodb
      - meilisearch

  mongodb:
    image: mongo:8.0
    volumes:
      - librechat_mongodb:/data/db
    restart: unless-stopped

  meilisearch:
    image: getmeili/meilisearch:v1.12.3
    environment:
      - MEILI_MASTER_KEY=<your-meili-key>
      - MEILI_NO_ANALYTICS=true
    volumes:
      - librechat_meilisearch:/meili_data
    restart: unless-stopped

volumes:
  librechat_uploads:
  librechat_images:
  librechat_mongodb:
  librechat_meilisearch:
Environment Configuration
PORTHost port to expose(default: 3080)
CREDS_KEYCredential encryption key
CREDS_IVEncryption initialization vector
JWT_SECRETJWT secret
JWT_REFRESH_SECRETJWT refresh secret
MEILI_KEYMeilisearch key
4

Spin Up the Stack

Run Docker Compose to launch your application.

terminal
# Launch the stack
docker compose up -d

# Verify container status
docker compose ps

# Follow the logs
docker compose logs --follow
5

Open the Application Port

Configure UFW to allow traffic to your application.

terminal
# Allow the application port through firewall
sudo ufw allow 3080/tcp
sudo ufw reload

# Access your app at:
# http://your-server-ip:3080
Skip the Terminal

Make it simple with Server Compass.

Deploy LibreChat without touching the command line. Server Compass gives you a clean UI for one-click deployments.

  • No terminal required
  • Point-and-click setup
  • Auto SSL certificates
  • Rolling deployments
  • Health monitoring
  • Instant rollbacks
Download Server Compass$29 one-time • Lifetime license

After Deployment

After deploying LibreChat with Server Compass, complete these steps to finish setup

1

Open the LibreChat URL in your browser

2

Register your account

3

Configure AI provider API keys in the admin panel

Need help? Check out our documentation for detailed guides.

LibreChat FAQ

Common questions about self-hosting LibreChat

How do I deploy LibreChat with Server Compass?

Simply download Server Compass, connect to your VPS, and select LibreChat from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.

What are the system requirements for LibreChat?

LibreChat requires a minimum of 512MB RAM. We recommend a VPS with at least 1024MB RAM for optimal performance. Any modern Linux server with Docker support will work.

Can I migrate my existing LibreChat data?

Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard LibreChat backup and restore procedures.

How do I update LibreChat to the latest version?

Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest LibreChat image will be pulled and deployed with zero downtime.

Is LibreChat free to self-host?

LibreChat is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.

Ready to Self-Host LibreChat?

Download Server Compass and deploy LibreChat to your VPS in under 3 minutes. No Docker expertise required.

Download Server Compass