Deploy LibreChat
Multi-provider AI chat with agents, files, search, and RAG.
Just deployed
LibreChat
Just deployed
/app/uploads
Meilisearch
Just deployed
/meili_data
MongoDB
Just deployed
/data/db
VectorDB
Just deployed
/var/lib/postgresql/data
Deploy and Host LibreChat on Railway
LibreChat is an open-source, multi-user AI chat interface that brings multiple model providers into one customizable application. It supports agents, files, conversation search, retrieval-augmented generation (RAG), model switching, presets, and secure authentication while letting operators retain control of application data and provider credentials.
About Hosting LibreChat
Hosting LibreChat requires five coordinated services: the LibreChat web application, MongoDB for users and conversations, Meilisearch for full-text conversation search, PostgreSQL with pgvector for embeddings, and the LibreChat RAG API for file indexing and retrieval. This template pins the Umbrel-tested LibreChat 0.8.7 service graph. Only LibreChat receives a public Railway domain; every dependency remains on Railway's private network. Persistent volumes protect uploaded files, MongoDB records, Meilisearch indexes, and vector data. Railway generates internal database, search, encryption, and signing credentials, while AI-provider keys remain optional external inputs with no defaults.
Common Use Cases
- Give teams one self-hosted interface for OpenAI, Anthropic, Google, and other AI providers
- Build agents that work with uploaded documents through retrieval-augmented generation
- Keep authenticated conversation history, presets, files, and full-text search under operator control
Dependencies for LibreChat Hosting
- MongoDB 8.0.10 for accounts, conversations, agents, and application metadata
- Meilisearch 1.12.3 for private full-text conversation and message indexes
- PostgreSQL 15 with pgvector 0.5.1 for RAG embeddings and metadata
- LibreChat RAG API 0.7.3 for document extraction, embedding, indexing, and retrieval
Deployment Dependencies
- LibreChat 0.8.7 source and deployment files
- LibreChat Docker installation
- LibreChat RAG API configuration
- LibreChat Meilisearch configuration
- Umbrel LibreChat 0.8.7 package
Implementation Details
| Service | Image | Networking | Persistent volume |
|---|---|---|---|
LibreChat | ghcr.io/danny-avila/librechat:v0.8.7 | Public port 3080; private dependencies | /app/uploads |
MongoDB | mongo:8.0.10 | Private port 27017 only | /data/db |
Meilisearch | getmeili/meilisearch:v1.12.3 | Private port 7700 only | /meili_data |
VectorDB | ankane/pgvector:v0.5.1 | Private port 5432 only | /var/lib/postgresql/data |
RAG API | ghcr.io/danny-avila/librechat-rag-api-dev-lite:v0.7.3 | Private port 8000 only | None; vectors persist in VectorDB |
LibreChat 0.8.7 treats librechat.yaml as optional: when it is absent, the application logs that custom configuration was not loaded and continues with validated defaults. The official image already contains the built client and starts with npm run backend, so this template uses the pinned image directly rather than fabricating a repository build. The first registered account becomes the administrator. Add at least one supported AI-provider key after deployment to chat; an OpenAI-compatible embeddings key is needed only when using RAG with the default embedding provider.
The LibreChat volume is mounted at /app/uploads. Railway starts the container as root only long enough to assign that root-owned mount to UID/GID 1000, then su launches the documented npm run backend process as the image's node user. Application logs stay in Railway's log stream. MongoDB authentication, Meilisearch authentication, RAG JWT verification, PostgreSQL authentication, credential encryption, and session signing all use independently generated deployment secrets; shared values are generated once and consumed through Railway references.
Railway checks LibreChat's /readyz endpoint, Meilisearch's /health endpoint, and the RAG API's /health endpoint. LibreChat initializes MongoDB collections and indexes through Mongoose and starts Meilisearch synchronization in the background. RAG API 0.7.3 initializes pgvector's LangChain tables and idempotently creates its custom_id, file_id, and JSONB GIN indexes during startup.
Why Deploy LibreChat on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying LibreChat on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
LibreChat
ghcr.io/danny-avila/librechat:v0.8.7Meilisearch
getmeili/meilisearch:v1.12.3MongoDB
mongo:8.0.10VectorDB
ankane/pgvector:v0.5.1