LibreChat
★ 46.9kA self-hosted alternative to Chatgpt
Compare:LibreChat vs Open-WebUI
About
Community Ratings
No ratings yetNew this week
Read recap →Features
- AI model selection
- custom endpoints
- code interpreter
- agents and tools integration
- web search
- generative UI artifacts
- image generation and editing
- presets and context management
- multimodal file interactions
- admin panel
Details
- Last Updated
- Nov 10, 2026
- Created
- Feb 12, 2023
- Install Methods
- docker-composesource
- Requirements
- RedisS3 with CloudFront (optional for media links and downloads)
- Authentication
- oauthldaplocal
- Backup & Export
- native-export
- Runtime / Stack
- NodejsDocker
- Privacy & Independence
- Cloud: Optional
- User Model
- Multi-User
- Deployment
Deployment: Docker Compose ✓6 Containers — moderate hosting footprintRuns as 6 containers
Run LibreChat yourself
Pick how much you want to manage.
RailwayBest match
One click
Railway template, runs in your own Railway account.
About 5 minutes to running
netcup
Full control
A small server, then Docker Compose.
About 20 minutes with Docker
Hetzner
Full control
A small server, then Docker Compose.
About 20 minutes with Docker
2 more ways to host
Some links earn us a commission. netcup pays us one and is our preferred VPS host.
Is this your project? Sponsor a listing
Run LibreChat with Docker Compose
Compose file from the LibreChat project repository.
6 services · database: mongo · infra: mongo, meilisearch, pgvector · 3 unclassified (librechat-dev, librechat-admin-panel, librechat-rag-api-dev-lite)
no resource limits declared
needs persistent storage (8 volumes)
docker-compose.yml · @ cf9a426 · scanned Nov 3, 2026
# Do not edit this file directly. Use a ‘docker-compose.override.yaml’ file if you can.
# Refer to `docker-compose.override.yaml.example’ for some sample configurations.
services:
api:
container_name: LibreChat
ports:
- "${PORT}:${PORT}"
depends_on:
- mongodb
- rag_api
image: registry.librechat.ai/danny-avila/librechat-dev:latest
restart: always
user: "${UID}:${GID}"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- HOST=0.0.0.0
- MONGO_URI=mongodb://mongodb:27017/LibreChat
- MEILI_HOST=http://meilisearch:7700
- RAG_PORT=${RAG_PORT:-8000}
- RAG_API_URL=http://rag_api:${RAG_PORT:-8000}
- PROXY=${PROXY:-}
- HTTP_PROXY=${HTTP_PROXY:-}
- HTTPS_PROXY=${HTTPS_PROXY:-}
- NO_PROXY=${NO_PROXY:-localhost,127.0.0.1,::1},${no_proxy:-},mongodb,chat-mongodb,meilisearch,chat-meilisearch,rag_api,vectordb,host.docker.internal
- http_proxy=${http_proxy:-}
- https_proxy=${https_proxy:-}
- no_proxy=${no_proxy:-localhost,127.0.0.1,::1},${NO_PROXY:-},mongodb,chat-mongodb,meilisearch,chat-meilisearch,rag_api,vectordb,host.docker.internal
volumes:
- type: bind
source: ./.env
target: /app/.env
- ./images:/app/client/public/images
- ./uploads:/app/uploads
- ./logs:/app/logs
- ./skill:/app/skill
admin-panel:
container_name: admin-panel
image: registry.librechat.ai/clickhouse/librechat-admin-panel:latest
ports:
- "${ADMIN_PANEL_PORT:-3000}:3000"
depends_on:
- api
restart: always
environment:
- PORT=3000
# Plain expansion (not :?) so `docker compose down`/`pull` still run when this is unset.
# The panel itself refuses to start without it; set ADMIN_PANEL_SESSION_SECRET in .env.
- SESSION_SECRET=${ADMIN_PANEL_SESSION_SECRET}
- API_SERVER_URL=http://api:${PORT:-3080}
- VITE_API_BASE_URL=${DOMAIN_CLIENT:-http://localhost:3080}
- SESSION_COOKIE_SECURE=${ADMIN_PANEL_SESSION_COOKIE_SECURE:-false}
mongodb:
container_name: chat-mongodb
image: mongo:8.0.20
restart: always
user: "${UID}:${GID}"
volumes:
- ./data-node:/data/db
command: mongod --noauth
meilisearch:
container_name: chat-meilisearch
image: getmeili/meilisearch:v1.35.1
restart: always
user: "${UID}:${GID}"
environment:
- MEILI_HOST=http://meilisearch:7700
- MEILI_NO_ANALYTICS=true
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
volumes:
- ./meili_data_v1.35.1:/meili_data
vectordb:
container_name: vectordb
image: pgvector/pgvector:0.8.0-pg15-trixie
environment:
POSTGRES_DB: mydatabase
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
restart: always
volumes:
- pgdata2:/var/lib/postgresql/data
rag_api:
container_name: rag_api
image: registry.librechat.ai/danny-avila/librechat-rag-api-dev-lite:latest
environment:
- DB_HOST=vectordb
- RAG_PORT=${RAG_PORT:-8000}
restart: always
depends_on:
- vectordb
env_file:
- .env
volumes:
pgdata2:
This file may be out of date. Check the LibreChat documentation for current setup steps.
Track your self-hosted stack
Bookmark software to try, rate tools you've used, and keep your collection in one place.
Alternatives to LibreChat
