# Self-hosting LibreChat: one ChatGPT UI for your whole team, billed per token instead of per seat

> Source: <https://dev.to/dmytro_chervonyi/self-hosting-librechat-one-chatgpt-ui-for-your-whole-team-billed-per-token-instead-of-per-seat-162a>
> Published: 2026-09-03 08:35:21+00:00

ChatGPT Plus is $20 per person per month. A team of five is $100/month, forever, whether anyone used it much or not.

LibreChat is the open-source ChatGPT-style interface that turns that per-seat subscription into a per-token API bill. One instance, one login page, and whichever models you plug in behind it: OpenAI, Anthropic, Google, Azure OpenAI, Groq, DeepSeek, or a local model through Ollama.

This is the setup, the security pass most quick-starts skip, and the five failures that show up once real people use it.

Current LibreChat (v0.8.x) is well past "a chat window." It 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 is chasing several of them at once.

The part that matters architecturally: **MongoDB holds accounts and conversation history**. That is where your team's accumulated context lives, and it is the thing you can lose.

```
git clone https://github.com/danny-avila/LibreChat.git
cd LibreChat
cp .env.example .env
docker compose up -d
```

Open port 3080. Register. **The first account created becomes the admin** — do this yourself before anyone else has the URL.

That is the honest quick-start. What it hides is everything around it: a reverse proxy and TLS so it is not served over plain HTTP, keeping the MongoDB volume persistent, updates (LibreChat ships often), and backups. Budget 1–2 hours for a proper first deploy, not fifteen minutes.

Disclosure so you can weigh the rest: I co-founded [livemy.app](https://livemy.app), which has a one-click LibreChat template. Coolify and Dokploy also ship LibreChat templates and are the obvious picks if you already run your own VPS, and plain Compose on a $5 box is the cheapest path if you enjoy servers.

A flat subscription and a token bill charge for different things.

$20/month flat is a bargain if you use it constantly, and mostly a round number if you use it a few times a week. API pricing bills for exactly the tokens the model read and wrote, at rates the providers set directly.

For light-to-moderate users, which is most of a team, API usage lands at a fraction of a flat seat. Running costs:

Five-person team: ~$100/month on seats versus roughly $10 hosting plus $10–30 of actual API usage. The gap grows with every seat you do not buy.

The honest counter-case: one heavy solo user, all day, every day. Flat $20 can beat token pricing there. LibreChat is a team play.

LibreChat without keys is a beautiful empty shell. The app runs, the model list is blank or every message errors. It does not come with AI, it comes with sockets for AI.

**Fix.** Create keys with at least one provider, set them in your environment, restart, send one test message before inviting anyone.

`.env`

The example config ships placeholder JWT secrets. Leave them and you share session-signing keys with every other instance that also skipped this step, which defeats the point of having authentication at all.

**Fix.** Generate long random values before first launch:

```
openssl rand -hex 32
```

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 free ChatGPT for strangers, billed to your card.

**Fix.** Disable open registration once your team is in. Set provider-side spending caps as the backstop, because config is a policy and a cap is a wall.

All history, accounts and settings live in MongoDB. If the volume is not persistent, the next container rebuild wipes everyone's conversations. For a tool whose entire value is accumulated context, this is the most demoralising possible failure.

**Fix.** Verify persistence *before* real use: restart the whole stack, confirm chats survive. Then schedule backups.

Core LibreChat is light. Enable search indexing and file-chat (RAG) and memory climbs. On a small instance that shows up as random slowness and OOM-killed containers, not a clear error message.

**Fix.** 2 GB for chat-only. Enabling search and file chat for a team means more, or turn features on one at a time and watch memory.

Before you hand out the URL:

Five minutes. Skipping step 3 or 4 is how people end up funding a stranger's model usage.

LibreChat is the rare self-hosted app where the economics argue as loudly as the ideology. The per-seat model does not survive contact with a shared instance and API keys.

If you are one person using AI all day, keep your subscription. If you are a team of three or more where usage is uneven, this pays for itself the first month.

*What did you hit first when self-hosting it? I am betting on either the empty model list or the wiped Mongo volume, and I would like to know which one wins.*
