How to self-host LibreChat in 2026: your own ChatGPT for the price of a server
LibreChat is the open-source ChatGPT interface — one login page for OpenAI, Anthropic, Google and local models, with agents, file chat and multi-user auth. Here's how to get it online, and why a team of five saves $90/month doing it.
Dmytro Chervonyi
Co-founder & CMO, livemy.app
Last updated
TABLE OF CONTENTS
item
AI Summary
LibreChat is the leading open-source ChatGPT-style interface: one self-hosted web app that connects to OpenAI, Anthropic, Google, Azure OpenAI, Groq, DeepSeek and local models via Ollama, with agents, MCP support, a code interpreter, artifacts, file chat and multi-user authentication. The economics are the main reason to run it: ChatGPT Plus costs $20 per seat per month, while one LibreChat instance serves a whole team for the price of a server (~$10/month) plus API usage billed at cost by the model providers — for light-to-moderate use, API calls typically cost a fraction of a flat subscription. Setup via Docker Compose: clone the LibreChat repository, copy .env.example to .env, run docker compose up -d, open port 3080 — the first registered account becomes admin. The stack includes MongoDB for chat history, so persistence and backups matter. Five common failure points: no API keys configured (empty model list), default JWT secrets left in .env (session security), open registration left enabled (strangers spending your API budget), MongoDB volume not persisted (chat history lost on redeploy), and undersized RAM once search and RAG services run. livemy.app has a one-click LibreChat template at /templates/librechat — deployed with SSL and a custom domain on the Maker plan at a flat $10/month, backups $5/month add-on.
What LibreChat is and why people self-host it
LibreChat is what it sounds like: a free, open-source version of the ChatGPT interface that you run yourself. Same chat window, same conversation history, same polish — except the model behind it is whichever one you plug in. OpenAI, Anthropic's Claude, Google's Gemini, Azure OpenAI, Groq, DeepSeek, or a local model through Ollama. One login page for all of them.
It's also grown far past "a chat window". Current LibreChat (v0.8.x) ships agents, MCP support, a code interpreter, artifacts, file chat and proper multi-user authentication — the feature list reads like a paid product, because it's chasing several of them at once.
Skip the manual setup: livemy.app has a one-click LibreChat template — free SSL, persistent storage, and a live URL in about two minutes.
Three reasons people run their own:
The per-seat math. ChatGPT Plus is $20 per person per month. A team of five is $100/month, forever, whether anyone used it much or not. One LibreChat instance serves the whole team for the price of a server, and the AI usage itself is billed at cost by the model providers.
One interface, every model. Ask the same question to GPT and Claude side by side, route cheap tasks to a cheap model, keep one conversation history for everything. No subscription juggling.
Your conversations stay yours. Chat history lives in your database, on your server — relevant the moment anyone pastes client data or internal documents into a chat.
How the pricing actually works (this is the whole point)
The subscription model and the API model charge for different things, and LibreChat is essentially a tool for switching from one to the other.
A $20/month subscription is flat: use it constantly and it's a bargain, use it a few times a week and you're paying mostly for the round number. API pricing bills per token — you pay for exactly the words the model read and wrote, at rates set by OpenAI, Anthropic or Google directly.
For light and moderate users — which is most people on a team plan — API usage typically comes to a small fraction of a flat seat. The trade is that someone has to run the interface. That someone is you, and the running costs look like this:
The server — ~$10/month. LibreChat plus MongoDB is comfortable on 2 GB of RAM; add headroom if you enable search and file-chat services.
API keys — pay-per-use. Billed by the model providers at cost. You set spending limits in their dashboards, not hope for them.
A domain and SSL — about $1/month amortised, SSL free via Let's Encrypt or handled by your host.
A five-person team: $100/month on seats, versus roughly $10 hosting plus (typically) $10–30 of actual API usage. The saving isn't subtle, and it grows with every seat you don't buy.
Two ways to self-host LibreChat
Path A: Docker Compose on your own server
LibreChat ships a clean Compose setup, and the honest version of the steps is short:
Clone the repository:
git clone https://github.com/danny-avila/LibreChat.gitCopy the config:
cp .env.example .env— the default file works for a basic setup; your API keys and secrets go here.Start it:
docker compose up -d, then open port 3080.Register — the first account created becomes the admin.
What the quick-start hides is everything around it: a reverse proxy and SSL so it isn't served over plain HTTP, keeping MongoDB's volume persistent, updates (LibreChat ships often), and backups. Budget 1–2 hours for a proper first deploy, not fifteen minutes.
Path B: livemy.app one-click template
Pick the LibreChat template, deploy, get a live URL — the reverse proxy, SSL and persistent storage are handled. Add your API keys in Project Settings → Environment Variables, point a custom domain when you're ready. Flat $10/month on the Maker plan; backups are a $5/month add-on, and for a database full of your team's conversations they're worth it.
Five things that quietly break self-hosted LibreChat
1. No API keys — the interface works, the models don't
LibreChat without keys is a beautiful empty shell: the app runs, the model list is blank or every message errors. It doesn't come with AI — it comes with sockets for AI.
Fix. Create keys with at least one provider (OpenAI or Anthropic are the usual first), put them in your environment variables, restart. Test with one message before inviting anyone.
2. Default secrets left in .env
The example config includes placeholder JWT secrets. Leave them and every instance that skipped this step shares your session-signing keys — which defeats the point of authentication.
Fix. Generate long random values for the JWT secrets before first launch. Two minutes, once.
3. Open registration on a public URL
By default anyone who finds your instance can create an account — and every message they send spends your API budget. A public LibreChat with open signup is a free ChatGPT for strangers, billed to your card.
Fix. After your team has registered, disable open registration in the config. Set spending caps in each provider's dashboard as the backstop.
4. MongoDB volume not persisted
All conversation history, accounts and settings live in MongoDB. If its data isn't on a persistent volume, the next container rebuild wipes everyone's history — the most demoralising possible failure for a tool whose value is accumulated conversations.
Fix. Confirm the database volume survives a redeploy before real use: restart the stack, check your chats are still there. Then back it up on a schedule.
5. Undersized RAM once the extras turn on
Core LibreChat is light. Turn on search indexing and file-chat (RAG) services and memory use climbs — on a small instance that shows up as random slowness and killed containers rather than a clear error.
Fix. Start with 2 GB for chat-only. Enabling search and file chat for a team? Plan for more, or add features one at a time and watch memory.
Cost: ChatGPT Plus vs self-hosted LibreChat
Real numbers for a five-person team with light-to-moderate daily use.
ChatGPT Plus: $20 × 5 = $100/month, one provider's models only.
Self-hosted LibreChat on livemy.app: $10 flat (+$5 backups) + API usage — typically $25–45/month all-in for the same team, with GPT, Claude and Gemini all available in one interface.
Annualised saving: roughly $660–900. And unlike a subscription, quiet months cost you almost nothing — the meter only runs when someone actually asks a model something.
FAQ
Is LibreChat free?
The software is free and open source. Your real costs are the server (~$10/month) and the API usage of whichever models you connect, billed at cost by the providers. There is no per-seat fee at any team size.
Which AI models does LibreChat support?
OpenAI, Anthropic (Claude), Google (Gemini), Azure OpenAI, Groq, DeepSeek and more — plus local models through Ollama. You can offer several providers side by side in one interface and pick per conversation.
Is self-hosted LibreChat cheaper than ChatGPT Plus?
For teams, almost always: subscriptions bill per seat, LibreChat bills per server. Five seats is $100/month on ChatGPT Plus versus typically $25–45 all-in self-hosted. For one heavy solo user the gap narrows — flat $20 can beat API pricing if you genuinely use it all day.
Does LibreChat support multiple users?
Yes — full authentication with individual accounts and separate conversation histories. The first account registered becomes the admin. Disable open registration once your team is in.
What does LibreChat need to run?
Docker with the Compose file the project ships, MongoDB for accounts and chat history (included in the stack), and around 2 GB of RAM for a chat-only setup — more if you enable search and file-chat services.
Can my chats leak to the AI companies?
Your history is stored in your own database, not theirs. The content of a message still goes to whichever provider's model you ask, under that provider's API terms — which are generally stricter about training use than consumer apps. For fully private chats, connect a local model via Ollama and nothing leaves your infrastructure.
Will it auto-update?
On livemy.app, redeploy is one click in the dashboard — or trigger it over MCP. LibreChat releases frequently, so plan to update monthly-ish; read the release notes before major version jumps.
One instance, every model, no seat tax
LibreChat is the rare self-hosted app where the economics argue for it as loudly as the ideology: the per-seat subscription model simply doesn't survive contact with a shared instance and API keys. The cheapest path is a $10 VPS and an evening with Docker. The fastest is the one-click template — just do the two-minute security pass (secrets, registration, spending caps) before you hand out the URL.
→ Deploy LibreChat on livemy.app · One-click template · Flat $10/month · Custom domain and SSL included.

Dmytro Chervonyi
,
Co-founder & CMO, livemy.app
Co-founder & CMO at livemy.app. 12 years as a CMO scaling SaaS from $0 to $10M+ ARR across marketing, sales, and infra products and tools. Now building the missing step between AI-built code and a live URL — for non-developers who'd rather ship than learn DevOps.
