LibreChat is a free, open-source chat interface you host yourself. It looks and feels like ChatGPT, but you can plug in almost any model: OpenAI, Anthropic, Google, OpenRouter, and local models through Ollama, all in one place.
It also includes agents, MCP tools, artifacts, a code interpreter, chat with files, web search and memory, so it can replace several paid apps for a person or a whole team.
This guide shows how to install LibreChat with Docker Compose, add API keys, connect Ollama with librechat.yaml, update it, and fix the most common problems. It follows the official LibreChat docs and changelog as of November 2026 (v0.8.9).
- What: a self-hosted, open-source web chat app for many AI providers. Latest stable: v0.8.9 (17 Nov 2026).
- Install: clone the repo,
cp .env.example .env, thendocker compose up -d. - Open:
http://localhost:3080and create your account. - API keys:
OPENAI_API_KEY,ANTHROPIC_API_KEY,GOOGLE_KEYin .env. - Ollama: add a custom endpoint in librechat.yaml; from Docker use
http://host.docker.internal:11434/v1/. - Features: agents, MCP, artifacts, code interpreter, file chat, web search, memory.
What LibreChat Is
- Self-hosted web app: the docs describe it as a self-hosted web application, not a desktop app. You use it in a browser.
- Many providers: OpenAI, Anthropic, Google, Azure, and any OpenAI-compatible endpoint, including Ollama.
- Multi-user: each person gets their own account, chats and settings.
- Open source: free to run on your own PC, home server or cloud VM.
Recent releases added Chat Projects, passkey sign-in and MCP Apps. If you only want a quick local chat UI for Ollama, Open WebUI may be simpler; LibreChat shines when you mix many cloud and local models.
What You Need
| Item | Notes |
|---|---|
| Docker and Docker Compose | Docker Desktop on Windows and Mac, Docker Engine on Linux |
| Git | To clone the repository |
| API keys (optional) | For cloud models such as OpenAI, Anthropic or Gemini |
| Ollama (optional) | For free local models |
| Free port | 3080 by default |
Need keys? See how to get an OpenAI API key and how to get a Gemini API key.
Install LibreChat With Docker Compose
- Clone the repository:
git clone https://github.com/LibreChat-AI/LibreChat.git cd LibreChat - Create your settings file:
cp .env.example .envOn Windows Command Prompt, use
copy .env.example .env. - Start LibreChat:
docker compose up -dThe first start downloads several images and can take a few minutes.
- Open
http://localhost:3080in your browser. - Register the first account and sign in.
Port 3080 already in use? Change PORT in .env (for example to 3081) and run docker compose up -d again.
Add OpenAI, Claude and Gemini Keys
| Provider | .env key |
|---|---|
| OpenAI | OPENAI_API_KEY |
| Anthropic (Claude) | ANTHROPIC_API_KEY |
| Google (Gemini) | GOOGLE_KEY |
- Open .env in a text editor.
- Paste your key after the matching variable.
- Or set
user_providedso each user enters their own key in the interface. - Leave a key blank to hide that provider.
- Choose visible endpoints with
ENDPOINTS=openAI,assistants,azureOpenAI,google,anthropicif you want to limit the list. - Restart:
docker compose downthendocker compose up -d.
Cloud usage is billed by each provider, not by LibreChat. Want many models through one key? Our OpenRouter guide explains how.
Connect Ollama and Other Local Models
Local and other OpenAI-compatible models are added as custom endpoints in librechat.yaml. The official Ollama example looks like this:
endpoints:
custom:
- name: "Ollama"
apiKey: "ollama"
baseURL: "http://host.docker.internal:11434/v1/"
models:
default: ["llama3.2", "qwen3:8b"]
fetch: true
titleConvo: true
titleModel: "current_model"
modelDisplayLabel: "Ollama"
- Create librechat.yaml in the LibreChat folder (there’s an example file in the repo to copy).
- Set
baseURL. Inside Docker,localhostmeans the container itself, so usehost.docker.internalon Docker Desktop, or your PC’s LAN address on Linux. - Keep
apiKeyfilled in. Any text works for Ollama, but an empty key makes LibreChat drop the endpoint. - Use
fetch: trueto pull the full model list from Ollama automatically. - Restart LibreChat and pick “Ollama” from the endpoint menu.
On Linux, Ollama listens only on 127.0.0.1 by default. Setting OLLAMA_HOST=0.0.0.0 lets containers reach it, but that also opens it to your network with no login, so firewall port 11434. Our Ollama environment variables guide shows how. The same custom endpoint format works for LM Studio’s server, vLLM and llama.cpp.
Features Worth Turning On
| Feature | What it gives you |
|---|---|
| Agents | Custom assistants with their own instructions, tools and files |
| MCP | Connect MCP servers for files, search, databases and more |
| Artifacts | Render React, HTML, SVG, Markdown and Mermaid in a side panel |
| Code Interpreter | Run code in a sandbox |
| RAG API (chat with files) | Upload documents and ask questions about them |
| Web Search | Answers with citations |
| Memory | Remember user preferences across chats |
| Projects | Group related chats |
Each feature has its own setup page in the docs, and some need extra services or API keys. Looking for MCP servers to add? See our best MCP servers list.
Update LibreChat
- Stop it:
docker compose down - Remove old images (Linux and Mac):
docker images -a | grep "librechat" | awk '{print $3}' | xargs docker rmi - Get the latest code:
git pull - Pull new images:
docker compose pull - Start again:
docker compose up -d
Plan updates for a quiet time of day, since the app is offline while the containers restart. The docs include PowerShell versions of these commands for Windows. Read the changelog before big version jumps, since config options sometimes change.
LibreChat vs Open WebUI
| LibreChat | Open WebUI | |
|---|---|---|
| Main strength | Many cloud providers plus local models | Ollama-first local setup |
| Config style | .env plus librechat.yaml | Mostly in the web admin panel |
| Agents and MCP | Yes | Yes |
| Artifacts | Yes | Yes |
| Best for | Teams mixing providers | Personal local AI |
Compare with our Open WebUI setup guide and Open WebUI RAG guide.
Keep Your Instance Secure
- Close registration after your accounts are created, especially if the server is reachable from the internet.
- Use HTTPS through a reverse proxy before exposing LibreChat outside your home network.
- Protect .env: it holds your API keys. Never commit it to Git.
- Use SSO or passkeys for teams; the authentication docs cover the options.
- Don’t expose Ollama directly to the internet.
Back up your setup regularly. Copy .env and librechat.yaml somewhere safe, and back up the database volume Docker created, so you can restore users and chat history if an update goes wrong or you move to a new server.
Example Setup: Cloud Models Plus Free Local Models
A popular way to run LibreChat is to mix one or two paid cloud models with free local ones, so you only pay for the hard questions.
- Add one cloud key in .env, for example
ANTHROPIC_API_KEYorOPENAI_API_KEY, for difficult tasks. - Add Ollama as a custom endpoint in librechat.yaml for everyday chat, summaries and drafts.
- Pull two local models in Ollama: a small fast one and a larger, smarter one that still fits your VRAM. Our best Ollama models list helps you choose.
- Create an agent for a repeated job, such as “email rewriter”, and set it to use the local model.
- Switch models mid-chat when a local answer isn’t good enough, and continue with the cloud model.
This keeps most of your usage free and private on your own hardware, while still giving you top models when you need them.
For a family or small team, set the cloud key to user_provided so each person uses and pays for their own key, while everyone shares the free local models.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Can’t open localhost:3080 | Containers still starting or port taken | Wait, check docker compose ps, or change PORT |
| Ollama endpoint missing | Empty apiKey in librechat.yaml |
Set any text, such as “ollama” |
| Ollama connection refused | Using localhost inside Docker | Use host.docker.internal or your LAN IP |
| Ollama works on Mac, not Linux | Ollama bound to 127.0.0.1 | Set OLLAMA_HOST=0.0.0.0 and firewall the port |
| Provider not showing | Key blank or not in ENDPOINTS |
Add the key and restart |
| Model keeps generating | Missing stop sequences for some models | Add stop tokens with addParams |
| Config changes ignored | Container not restarted | docker compose down then up -d |
FAQ
Is LibreChat free?
Yes. LibreChat is open source and free to self-host. You only pay providers for cloud API usage.
What port does LibreChat use?
3080 by default. Change it with PORT in .env.
Can LibreChat use Ollama?
Yes. Add Ollama as a custom endpoint in librechat.yaml with an OpenAI-compatible base URL.
Is LibreChat a desktop app?
No. It’s a self-hosted web app you open in a browser.
Does LibreChat support MCP?
Yes. You can connect MCP servers, and recent versions added MCP Apps.
What is the latest LibreChat version?
v0.8.9, released on 17 November 2026.
Can several people use one LibreChat server?
Yes. Each user has their own account and chats.



