---
title: "Deploy LibreChat"
description: "Open-source ChatGPT clone: multi-model, agents, search, multi-user auth"
category: "AI/ML"
url: https://railway.com/deploy/librechat-official
---

# Deploy LibreChat

Open-source ChatGPT clone: multi-model, agents, search, multi-user auth

**[Deploy LibreChat on Railway](https://railway.com/template/librechat-official)**

- **Creator:** LibreChat
- **Category:** AI/ML
- **Total deploys:** 6,250
- **Verified:** Yes

## Template content

### VectorDB https://www.svgrepo.com/show/303301/postgresql-logo.svg

- **Image:** pgvector/pgvector:pg16

### RAG API https://www.librechat.ai/librechat.svg

- **Image:** ghcr.io/danny-avila/librechat-rag-api-dev-lite:latest
- **Health check:** /health

### LibreChat https://raw.githubusercontent.com/danny-avila/LibreChat/refs/heads/main/client/public/assets/logo.svg

- **Image:** ghcr.io/danny-avila/librechat-dev:latest
- **Health check:** /health
- **Public domain:** Yes

### Meilisearch https://raw.githubusercontent.com/meilisearch/meilisearch/refs/heads/main/assets/logo.svg

- **Image:** getmeili/meilisearch:v1.11.3

### MongoDB https://devicons.railway.app/mongodb

- **Image:** mongo
- **Start command:** `docker-entrypoint.sh mongod --ipv6 --bind_ip ::,0.0.0.0`

## Documentation

# LibreChat on Railway

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/deploy/b5k2mn?referralCode=HI9hWz&utm_medium=integration&utm_source=template&utm_campaign=generic)

## ⚠️ BEFORE DEPLOYMENT

Make sure to review and correctly configure your `.env` file using the official guide:
👉 [LibreChat Configuration Guide](https://www.librechat.ai/docs/configuration/dotenv)

---

## 💡 What is LibreChat?

LibreChat is an **open-source, ChatGPT-style AI chat platform** built for flexibility, privacy, and full customization. It supports multiple AI providers (OpenAI, Anthropic, Azure, Google, Ollama, Bedrock, etc.) and includes advanced tools such as a code interpreter, file handling, agent builder, and multimodal AI interactions—all in a modern web UI.

---

## ☁️ About Hosting LibreChat

Hosting LibreChat on Railway provides a seamless cloud environment for full-stack AI applications. Deployment takes minutes and requires minimal setup. Railway automatically provisions your backend, database, and static frontend while allowing scalable infrastructure with no manual configuration.
You can connect your environment variables from LibreChat’s `.env` configuration and instantly deploy a production-ready AI platform, complete with authentication, model selection, agents, and more.

---

## 🔧 Common Use Cases

* Build a **private ChatGPT alternative** with multiple AI backends.
* Host a **multi-user AI workspace** with authentication and moderation tools.
* Deploy a **custom AI assistant or agent platform** with no-code tools.
* Integrate **local or remote AI models** (Ollama, vLLM, Groq, Bedrock).
* Run **secure AI file processing and code execution** environments.

---

## 📦 Dependencies for LibreChat Hosting

* **Node.js** 18+ (recommended 20.x)
* **MongoDB** (use Railway’s built-in database or connect an external instance)
* **Redis** *(optional but recommended)* for caching and session handling

### Deployment Dependencies

* Environment configuration: [`.env` setup guide](https://www.librechat.ai/docs/configuration/dotenv)
* AI endpoints setup: [librechat.yaml reference](https://www.librechat.ai/docs/configuration/librechat_yaml/ai_endpoints)
* Custom endpoints: [OpenAI-compatible APIs](https://www.librechat.ai/docs/quick_start/custom_endpoints)

---

## ⚙️ Implementation Details

LibreChat’s Railway template automatically deploys the backend (Express + MongoDB) and serves the production frontend built with React + Vite.
After deployment:

1. Go to Railway’s dashboard → Variables → Add `.env` keys from the [config guide](https://www.librechat.ai/docs/configuration/dotenv).
2. Redeploy the service.
3. Access your hosted LibreChat instance from the Railway-generated domain.

Optional integrations include:

* File uploads (S3-compatible storage)
* OpenAI, Azure, or Anthropic API keys
* OAuth2 / Email login

---

## 🚀 Why Deploy LibreChat on Railway?

Railway is a unified deployment platform that eliminates infrastructure complexity. It automatically handles build, configuration, and scaling for your stack, allowing you to focus on development.

By deploying **LibreChat** on Railway, you instantly get:

* Automated deployment with a single click
* Built-in database hosting
* Scalable, containerized services
* Simplified `.env` management
* CI/CD integration and logs out of the box

You’re one click away from running a complete, production-ready AI platform with support for multiple models, agents, and tools—all in one place.

---

## 🌐 Project Links

* 🔗 **Project Repository:** [github.com/danny-avila/LibreChat](https://github.com/danny-avila/LibreChat)
* 📘 **Documentation:** [www.librechat.ai/docs](https://www.librechat.ai/docs)
* 💬 **Community Discord:** [discord.librechat.ai](https://discord.librechat.ai)

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/librechat-official
