How to Use LibreChat: The Beginner's Guide (2026)

CodexFuse Team · 2026-11-01T11:59:22.246Z · 11 min read

One chat window for every AI model you use. Deploy LibreChat with Docker, secure your first account, wire up providers, and unlock RAG.

What Is LibreChat?

LibreChat is a free, open-source, self-hosted web app that puts one ChatGPT-style interface over every AI model you use. OpenAI, Anthropic, Google, a local Ollama server, or any OpenAI-compatible endpoint — all of them live behind a single login and a single chat window. This guide walks you through exactly how to use LibreChat: deploying it with Docker, creating your first account, connecting your models through librechat.yaml, adding API keys, chatting, and feeding it your documents with RAG. Treat this page as a complete librechat tutorial for beginners — first install, first account, endpoints, API keys, and the RAG lesson in one place. It is also the self hosted chatgpt alternative that teams actually deploy when they want one UI over every provider.

First, a name check, because search results are messy here: this guide covers the open-source project at LibreChat-AI/LibreChat on GitHub — 46,602 stars, MIT license, formerly under the danny-avila org. It is not the older Python project "Libre Chat" by vemonet, and it is not Libera Chat, the IRC network. Both of those pollute the same searches, so if a tutorial points you at a LangChain app or an IRC server, you are on the wrong page.

Is There a LibreChat Download?

No. There is no LibreChat .exe, .dmg, or AppImage — this is the single most common beginner confusion, and the vendor docs answer it in one line: LibreChat is a self-hosted web application; you install it yourself and use it in your browser. After a normal Docker deploy, your LibreChat lives at http://localhost:3080 on the machine that runs it. (There is an unofficial community mobile client called Librechat-Mobile on TestFlight and Google Play, but the official project ships no native app.)

What Do You Need to Run LibreChat?

Four things, and the fourth surprises nobody: a machine you control, Docker, enough RAM, and at least one model to talk to. The official Docker path pulls a whole stack — LibreChat itself plus MongoDB (accounts and chat history), Meilisearch (conversation search), and the RAG API with PostgreSQL/pgvector (file search). All of it arrives through one compose command; nothing is installed separately. The containers ask for about 1 GiB of RAM and 1 vCPU, and the docs recommend roughly 4 GB of system RAM (8 GB on Windows).

If Docker is new to you, our Docker beginner guide gets the engine running first. For models, you have two roads: paid cloud APIs (OpenAI, Anthropic, Google) or free local models through our Ollama guide. This walkthrough covers both.

How to Install LibreChat with Docker

This is the official, vendor-recommended librechat install path, and it takes one command to start. Run it on a VPS, a home server, or your own machine. The librechat docker stack bundles the app with its database and search services — no separate installs.

  1. Clone the repo. git clone https://github.com/LibreChat-AI/LibreChat.git, then cd LibreChat. (The old danny-avila URL redirects, but use the current path.)
  2. Copy the environment template. cp .env.example .env — defaults work for a local install.
  3. Copy the config template. cp librechat.example.yaml librechat.yaml — this is where you wire up custom model endpoints later.
  4. Start the stack. docker compose up -d. This pulls LibreChat, MongoDB, Meilisearch, the RAG API, and PostgreSQL.
  5. Check the services. docker compose ps — give MongoDB and Meilisearch a minute to go healthy.
  6. Open the app. Visit http://localhost:3080. You should see the LibreChat login screen.
  7. Create your first account. Register immediately — this account becomes your admin.
  8. Lock registration down. In .env, set ALLOW_REGISTRATION=false (or restrict allowed domains), then docker compose restart.
  9. Wire up your models. Edit librechat.yaml for custom endpoints; set provider keys in .env.
  10. Send your first message. Pick the model in the selector and type. It is now yours.

On a VPS, swap localhost for your server IP or domain, and put a reverse proxy with HTTPS in front of it before you do anything else — see what is VPS hosting for the hosting side of that decision.

How to Create Your First Account (and Why You Should Hurry)

LibreChat registration is open by default: anyone who finds your instance can create an account, and every message they send spends your API budget. The first registered account automatically becomes the admin; every account after that gets the ordinary USER role.

The safe order of operations: start the stack, register your own admin account first, then close the door. Set ALLOW_REGISTRATION=false in .env (or allow-list specific email domains if your team needs to self-register), restart the stack, and consider SSO or LDAP next. Say this once and remember it: an exposed LibreChat with open registration is an open bar on your OpenAI bill.

How to Connect Your AI Models with librechat.yaml

LibreChat knows many providers out of the box (OpenAI, Anthropic, Google, and more) — you activate them with an API key in .env, e.g. OPENAI_API_KEY=your-key. But the real power is custom endpoints: any OpenAI-compatible API, including a local Ollama server, plugs in through librechat.yaml.

The current v0.8.8 Ollama pattern looks like this (note: the config schema moves between versions, so always verify against the current docs rather than copying old snippets):

endpoints:
  custom:
    - name: "Ollama"
      apiKey: "ollama"
      baseURL: "http://host.docker.internal:11434/v1/"
      models:
        default: ["llama3"]
        fetch: true
      titleConvo: true
      titleModel: "current_model"
      modelDisplayLabel: "Ollama"

The apiKey field must exist even though Ollama ignores it, and host.docker.internal lets the LibreChat container reach Ollama running on your host machine. With fetch: true, LibreChat pulls your full local model list from the Ollama server instead of using only the hardcoded defaults. This librechat ollama pairing is the free local-models path — no cloud bill, no per-token anxiety. Mount the file through docker-compose.override.yml (./librechat.yaml to /app/librechat.yaml) and restart the stack.

How to Add Your API Keys

Managing your librechat api keys is a per-user affair, and that is by design.

On a shared or team instance, you do not put your OpenAI key in the shared .env. Instead, set the provider variable to user_provided — for example OPENAI_API_KEY=user_provided — and every user brings their own key: open the endpoint menu, click the gear icon labeled "Set API Key" (or go to Settings, Data controls, API keys), and paste it.

Each key gets an expiry — 30 minutes, 2 hours, 12 hours, a day, 7 days, 30 days, or never. Keys are encrypted and stored per user on the server, and they are never shared between users; you can revoke one or all of them at any time. Until a key is set, the endpoint shows in the list but cannot be used.

How to Start Your First Chat and Switch Models

Click the model selector at the top of the chat window and pick any endpoint you configured. Type a message; LibreChat streams the answer. The genuinely useful trick: you can switch endpoints or presets mid-conversation — history carries over, so asking GPT a follow-up to a Llama answer is one click.

Presets let you save a model plus its parameters (temperature, system prompt, tone) as a one-click configuration, which is how teams standardize on, say, "Support Bot v2" without anyone memorizing settings.

How to Feed LibreChat Your Documents (the RAG Lesson)

LibreChat answers from your files through File Search, powered by the bundled RAG API. The librechat rag mechanism works like this: (a FastAPI service with PostgreSQL/pgvector, already running in your compose stack). Click the + in the chat composer, choose "Upload for File Search," and the RAG API chunks and indexes your documents. The model then gets a file_search tool and calls it on demand; retrieved passages appear under "Sources" beneath the answer.

Two details matter. "Upload as Text" is a different option — it pastes the whole file into context instead of indexing it, which is better for short docs you want summarized but wasteful for large manuals. And for teams, Agents can have File Search enabled in the Agent Builder with uploaded files — those files become the agent's knowledge base for everyone who chats with it. One platform note: OpenAI shut down its Assistants API in August 2026, so LibreChat's docs now steer you to Agents for this workflow.

How to Invite Your Team and Lock Down Auth

LibreChat is built for multi-user setups: no guest mode, every user signs in. You get OAuth2 (Google, GitHub, Discord, Facebook, Apple), any OpenID Connect provider (Entra ID, Keycloak, Auth0, Authentik, Cognito), SAML, LDAP and Active Directory, plus email and password with 2FA.

The bundled Admin Panel — a browser UI, no extra install — manages users, groups, and roles, and exposes live config overrides plus moderation and token-spend tools so you can watch (and cap) what each user burns. If you already run a self-hosted identity provider, our Authentik beginner guide covers the OIDC side you plug in here.

LibreChat vs Open WebUI vs AnythingLLM vs Jan

Every self-hosted AI chat UI claims to be the one; the honest split is by audience. The librechat vs openwebui question is the one that comes up in every comparison thread, so here is the short answer.

ProductBest forLicense / footprint
LibreChatTeams needing many providers plus enterprise authMIT; multi-container stack (~46.6K stars)
Open WebUISolo home-lab polish, Ollama-firstMoved from MIT to a custom license — check before enterprise use; single container (~124–139K stars)
AnythingLLMNon-technical document Q&A (RAG-first workspaces)MIT; native Electron desktop app, zero-config (~54–60K stars)
JanPure offline desktop use of local LLMsApache 2.0; no RAG, MCP, or multi-user (~41K stars)

7 Beginner Mistakes to Avoid

MistakeWhat happensThe fix
Leaving registration open on a public instanceStrangers register and burn your API budgetRegister yourself first, then set ALLOW_REGISTRATION=false
Expecting a desktop appYou search for a LibreChat download and find the wrong projectIt is a web app at localhost:3080 — full stop
Copying an old librechat.yaml snippetSchema drift breaks your endpoints silentlyCheck the current v0.8.x docs every time
Pasting your API key into the shared .env on a team boxEveryone spends your keyUse user_provided and per-user keys
Pointing baseURL at localhost for OllamaThe container's localhost is itself, not your hostUse host.docker.internal (or the Docker bridge IP)
Using "Upload as Text" for a 500-page manualYou blow the context window and the billUse "Upload for File Search" for anything large
Skipping HTTPS on a public instancePasswords and API keys cross the wire in cleartextReverse proxy with TLS before sharing the URL

Sources

  • LibreChat-AI/LibreChat on GitHub (canonical repo; v0.8.8 release notes) — https://github.com/LibreChat-AI/LibreChat and https://github.com/LibreChat-AI/LibreChat/releases/tag/v0.8.8
  • LibreChat changelog — https://www.librechat.ai/changelog
  • Vendor docs: Docker install — https://www.librechat.ai/docs/local/docker
  • Vendor docs: local install + "Your First Chat" — https://www.librechat.ai/v0.8.8/docs/local
  • Vendor docs: Ollama endpoint config — https://www.librechat.ai/docs/configuration/librechat_yaml/ai_endpoints/ollama
  • Vendor docs: authentication — https://www.librechat.ai/docs/features/authentication and https://www.librechat.ai/docs/configuration/authentication
  • Vendor docs: RAG API — https://www.librechat.ai/docs/features/rag_api and https://www.librechat.ai/docs/configuration/rag_api
  • Vendor docs: Agents — https://www.librechat.ai/docs/features/agents
  • Vendor docs: OpenAI provider / user-provided keys — https://www.librechat.ai/docs/configuration/pre_configured_ai/openai
  • Self-hosting walkthrough (dev.to) — https://dev.to/dmytro_chervonyi/self-hosting-librechat-one-chatgpt-ui-for-your-whole-team-billed-per-token-instead-of-per-seat-162a
  • Railway LibreChat deploy page (requirements table + LibreChat-vs-OpenWebUI) — https://railway.com/deploy/librechat
  • Raspberry Pi + Ollama hands-on tutorial (peppe8o, v0.8.7) — https://peppe8o.com/librechat-raspberry-pi-ollama/
  • AnythingLLM vs Open WebUI vs LibreChat comparison 2026 (dev.to) — https://dev.to/jovan_chan_9500711396d4e6/anythingllm-vs-open-webui-vs-librechat-in-2026-which-self-hosted-ai-interface-should-you-use-24cl
  • Open WebUI vs AnythingLLM vs LibreChat comparison (toolhalla) — https://toolhalla.ai/blog/open-webui-vs-anythingllm-vs-librechat-2026
  • Napsty MCP-deploy guide (librechat.yaml MCP config) — https://napsty.com/blog/using-librechat-to-host-mcp-chatbot
  • LibreChat from zero to presets (remotefrog, Jan 2026) — https://remotefrog.com/2026/01/13/librechat-from-zero-to-presets/

Frequently Asked Questions

Is LibreChat really free?

The software is free and MIT-licensed — no seat fees, no license keys. You pay only for the models you use: cloud provider API costs, or nothing at all if you run local models through Ollama on your own hardware.

Is LibreChat safe to expose to the internet?

Yes, if you finish the lockdown checklist: register your admin account first, set ALLOW_REGISTRATION=false (or an email allow-list), add SSO or 2FA, and put HTTPS in front of it with a reverse proxy. Skip any of those and you are handing strangers a chat box on your bill.

Can LibreChat use my local Ollama models?

Yes — add a custom endpoint in librechat.yaml with baseURL pointing at your Ollama server (host.docker.internal:11434/v1/ from inside Docker), and LibreChat lists your local models alongside the cloud ones.

LibreChat vs Open WebUI: which should I choose?

Pick LibreChat if you need multiple AI providers in one interface with enterprise authentication for a team. Pick Open WebUI if you are a solo home-lab user who wants the most polished single-container experience, mostly with Ollama. Check Open WebUI's current license before enterprise use.

Do I need Docker to run LibreChat?

Docker is the recommended and best-tested path — it is the only one that bundles MongoDB, Meilisearch, and the RAG API for you. A local npm install exists in the docs, but you would then be wiring up those services yourself.

Featured on Twelve Tools Launch Llama Tools Launch your MCP