To install LibreChat, install Git and Docker, clone the official LibreChat repository, copy .env.example to .env, and run docker compose up -d. Then open http://localhost:3080 and sign up. The first account becomes the admin in a single-tenant setup. LibreChat is $0 under the MIT licence. It does not run models itself, so connect a provider API key or a local Ollama endpoint before your first chat.
You want one chat workspace for your team. You do not want five separate AI subscriptions, five logins, and five different chat histories.
LibreChat gives you that workspace on a machine you control. This guide shows how to install LibreChat self hosted AI chat with Docker, create the first admin account, connect your models, secure the setup, back it up, update it, and fix the errors that stop most first installs.
Quick Answer
To install LibreChat, install Git and Docker, clone the official LibreChat repository, copy .env.example to .env, and run docker compose up -d. Then open http://localhost:3080 and sign up. The first account becomes the admin in a single-tenant setup. LibreChat is $0 under the MIT licence. It does not run models itself, so connect a provider API key or a local Ollama endpoint before your first chat.
In this article
- How we checked this guide
- What LibreChat replaces, and what it does not
- Docker, npm, or Helm: choose the right route
- Requirements before you install LibreChat
- Step 1: install LibreChat with Docker
- Step 2: create the first admin account
- Step 3: connect a model and send your first chat
- Step 4: add Ollama and other custom endpoints
- First-run security steps you must not skip
- Make LibreChat useful for real work
- Backup and update routine
- Common errors and fixes
- Tips and tricks that save time
- The real cost maths: LibreChat versus ChatGPT Plus
- When not to self-host LibreChat
- Pros and cons
- Our verdict
- FAQ
- Strategic Pivot: price the whole stack before you switch
- Sources
How we checked this guide
We checked the install routes, requirements, Docker commands, first-account rule, update steps, and port fixes on the official LibreChat documentation. We checked the custom endpoint files and the Ollama example on the official Custom Endpoints guide.
We checked the licence on the official LibreChat GitHub project record, which lists the MIT licence. The paid comparison uses OpenAI’s official Help Center page. That page lists ChatGPT Plus at $20 a month, billed monthly. It also states that API usage is separate and billed independently.
What LibreChat replaces, and what it does not
LibreChat replaces the scattered chat windows. One login can reach the providers you configure, instead of a separate app for every model family. Your users, conversations, and settings live in your own LibreChat database.
The key limit is simple. LibreChat does not run AI models itself. It sends requests to the providers you configure. That is why the official Docker guide says LibreChat does not need a GPU. The model still runs somewhere. It runs at a cloud provider, or on your own machine through a local endpoint such as Ollama.
That split is the whole buying decision. LibreChat controls the workspace, accounts, and model choices. The provider controls model quality, speed, and API billing. A local endpoint controls privacy and hardware cost. Do not judge LibreChat as if it were a model.
Best for: a small-business owner, freelancer, or team lead who wants one self-hosted chat workspace for several providers, with user accounts and a model choice that can change without retraining the team. Skip if: you want a desktop app with no server to maintain, or you want the model itself to run offline with no extra endpoint to set up.
LibreChat sits in the middle of our local-AI series. Our guide to install Ollama on Ubuntu covers the local model runner LibreChat can connect to. Our guide to install Open WebUI with Ollama covers a different browser front end. Our guide to install llama.cpp for local LLM on CPU covers the engine layer. Our guides to install GPT4All for private offline AI chat and install Jan AI desktop for local models cover friendlier desktop apps. Our guide to install LocalAI as a self hosted OpenAI alternative covers an API-first server. Our guide to install Text Generation WebUI for local LLMs covers a control-heavy local workspace. Choose LibreChat when the team workspace and provider choice matter most.
Docker, npm, or Helm: choose the right route

Docker Compose is the right first install for most readers. The official local installation guide calls Docker Compose the recommended beginner route. It bundles the supporting services, so you do not install each database by hand.
The npm route runs LibreChat directly with Node.js. You manage external services such as MongoDB yourself. Choose npm when you want to develop against the code or run the app directly on the host.
The Helm route deploys LibreChat to a Kubernetes cluster. Choose Helm only when your team already runs Kubernetes and wants infrastructure-as-code workflows. It is not a shortcut for a first test.
| Route | Best for | What you manage | Main trade-off |
|---|---|---|---|
| Docker Compose | First install, small team, home server, or VPS | Docker, .env, and updates | Several containers run together |
| npm | Developers and direct host installs | Node.js, MongoDB, and other services | More manual service setup |
| Helm | Kubernetes production clusters | Cluster, secrets, and external services | Most moving parts |
Best for: Docker Compose fits a first business test and a small team rollout. Skip if: you already run Kubernetes in production, or you need to change LibreChat code every day. Start with the route your team can maintain.
Requirements before you install LibreChat
You need Git and Docker for the recommended route. Docker Desktop is recommended for most users. On a remote Linux server, use Docker Engine and the official Ubuntu Docker deployment route instead.
LibreChat’s containers need at least 1 GiB of RAM and 1 vCPU. With everything running, make at least 2 GB of memory available to Docker for smoother operation. The default Compose setup starts MongoDB, Meilisearch for conversation search, and the RAG API with a PostgreSQL/pgvector database for file search.
Docker Desktop adds its own requirements. The LibreChat guide notes at least 4 GB of system RAM on macOS and Linux, and 8 GB on Windows, plus hardware virtualization. Check Docker’s current pages before you install, because those requirements can change.
You do not need a GPU for LibreChat itself. You do need model access. That means a provider API key, a custom endpoint, or a local model server. If you connect LibreChat to Ollama on the same machine, size the hardware for the model. The model runtime needs far more memory than LibreChat does.
One hardware warning matters on older machines. The MongoDB image in the default Compose setup requires a CPU with AVX instructions. On older x86 CPUs without AVX, MongoDB can crash on startup. The fix is in the errors section below.
Step 1: install LibreChat with Docker

Clone the official repository and enter the project folder:
git clone https://github.com/LibreChat-AI/LibreChat.git
cd LibreChatCopy the example environment file:
cp .env.example .envOn Windows, use copy .env.example .env if cp is not available. The default .env file works out of the box for a basic setup. Do not skip this file. LibreChat needs it in the project root.
Start the stack:
docker compose up -dThe first launch pulls Docker images and may take a few minutes. Later starts are much faster. Wait for the containers to settle before you judge the install.
Open your browser and visit http://localhost:3080. You should see the LibreChat login page. That page is your first proof that the install worked.
If the page does not load, check the API container logs before you reinstall anything:
docker compose logs apiThe official guide names three common causes. The librechat.yaml syntax may be invalid. The .env file may be missing. Docker may not be running. Fix the named cause first. A blind reinstall usually repeats the same mistake.
Step 2: create the first admin account
Click Sign up and create your account. There are no default credentials. You create your own username and password during registration.
In an unscoped single-tenant deployment, the first account you register becomes the admin account. Create that account yourself, immediately. Do not send the fresh login page to your team and hope the right person registers first.
Use a local email and password account for that first admin. The official authentication guide gives the same advice. It keeps your recovery path simple while you set up the rest of the system.
Then close the door behind you. Set registration off after your account exists:
ALLOW_REGISTRATION=falseRestart LibreChat after you change .env. The remote Docker guide describes this setting as the way to disable external signups after you create your account. Invite or create later users through your chosen admin flow instead of leaving public registration open.
Step 3: connect a model and send your first chat
LibreChat needs a model provider before it can answer. Follow the official Your First Chat path after sign-up. Add a model API key, choose the model, and send one short message.
Keep the first test boring. Ask for a short rewrite of a harmless paragraph. Then ask one question about a small document. That test proves the account, the provider key, and the model route all work.
Check three things before you invite anyone else:
- The model appears in the selector.
- A short message returns an answer.
- The conversation still exists after you refresh the page.
If the model does not appear, do not blame the model first. Check the provider key, the endpoint configuration, and the container logs. Most first-chat failures are configuration failures.
Remember the billing split. A ChatGPT Plus subscription does not pay for API usage. OpenAI’s Help Center states that API usage is separate and billed independently. If LibreChat calls the OpenAI API, that API bill is its own line. Price it before you call LibreChat free for your team.
Step 4: add Ollama and other custom endpoints

Custom endpoints are where LibreChat becomes flexible. LibreChat supports OpenAI API-compatible services as custom endpoints. It also supports Anthropic-compatible custom endpoints with provider: "anthropic".
Three files do three jobs. Learn this split and most endpoint problems become obvious:
librechat.yamldefines the endpoint name, API URL, models, and display settings..envstores sensitive values such as API keys.docker-compose.override.ymlmountslibrechat.yamlinto the Docker container.
Docker users must mount the config file. Copy the example override file:
cp docker-compose.override.yml.example docker-compose.override.ymlMake sure the volume mount is uncommented:
services:
api:
volumes:
- type: bind
source: ./librechat.yaml
target: /app/librechat.yamlCreate librechat.yaml in the project root. This official example shows the Ollama shape:
version: 1.3.19
cache: true
endpoints:
custom:
- name: 'Ollama'
apiKey: 'ollama'
baseURL: 'http://host.docker.internal:11434/v1/'
models:
default: ['llama3:latest', 'command-r', 'mixtral', 'phi3']
fetch: true
titleConvo: true
titleModel: 'current_model'Use the version line from your own example file. Replace the model list with models your Ollama server actually has. The literal ollama key works because a local Ollama server ignores the key.
For a cloud provider, keep the real key in .env. Reference it from librechat.yaml with ${VAR_NAME} syntax. The official guide calls the environment-variable route the recommended option. A user-provided key is the other clean option. Each user enters their own key in the LibreChat UI, and LibreChat stores it encrypted.
Do not hardcode a real key in librechat.yaml. The official guide marks that direct-value route as not recommended. One shared config file should never become a shared secret file.
Restart after every config change:
docker compose down && docker compose up -dThen open LibreChat and check the endpoint selector. Your custom endpoint should appear there. If it does not, read the missing-endpoint fix below before you change anything else.
First-run security steps you must not skip
Create the first admin account yourself. Then set ALLOW_REGISTRATION=false and restart. That one sequence prevents a stranger or a fast-clicking teammate from becoming your first admin.
Keep secrets in .env, not in librechat.yaml. Reference them with ${VAR_NAME} syntax. If every user should bring their own provider key, use user_provided instead of one shared key.
Set your own persistent secrets before production use. The authentication guide warns that blank JWT values can lead LibreChat to generate temporary secrets. Use unique values of at least 32 bytes for JWT_SECRET and JWT_REFRESH_SECRET. Store them securely. Give every replica the same values.
Turn on two-factor authentication for local accounts when your team can handle it. The official setting is ENFORCE_TWO_FACTOR_AUTHENTICATION=true. It makes 2FA mandatory for local and LDAP accounts. Test it with your admin account before you enforce it for everyone.
Keep the first test local. http://localhost:3080 is a local address. A public domain changes the risk. Before other people reach LibreChat over the internet, put it behind HTTPS, keep registration closed, and confirm your domain settings match the address users actually visit.
Treat the admin panel as production access. The default Compose file defines the admin panel, but it only starts once ADMIN_PANEL_SESSION_SECRET is set in .env. Set that secret deliberately. Do not enable an admin surface by accident during a casual test.
Back up .env and librechat.yaml with the same care as the database. The database holds users and conversations. The config files hold the routes and secrets that make those conversations possible. Lose either side and your recovery becomes guesswork.
Make LibreChat useful for real work
Start with one provider and one real task. A good first business test is simple. Draft a customer reply. Summarise a policy document. Rewrite a product description. Compare the answer with the source before you trust the workflow.
Then add the second provider. LibreChat earns its place when the team can choose the right model without changing apps. Use a fast model for routine drafts. Use a stronger model for hard reasoning. Use a local Ollama model for private internal notes when your own test proves it is good enough.
Use conversation search as a team habit. The default Docker stack includes Meilisearch for conversation search. That matters when a good answer from last week becomes this week’s template. A chat tool nobody can search becomes a pile of lost drafts.
Use file search with care. The default stack includes the RAG API with PostgreSQL/pgvector for file search. Test it on one small, non-sensitive document first. Ask a question with a known answer. Check the reply against the document. Only then move real business files into the workflow.
Keep provider choice visible. Name endpoints clearly. Use model display labels your team understands. A selector full of cryptic model names invites random choices. Random choices create random quality and random bills.
Set a house rule for API spend. Cloud endpoints bill by usage. Local endpoints bill through hardware, electricity, and your time. Neither route is free in every sense. The saving comes from choosing the right route per task, not from pretending cost disappeared.
Backup and update routine
Back up before every update. Copy .env, librechat.yaml, and docker-compose.override.yml to a dated backup folder. Back up the Docker data for MongoDB, Meilisearch, and the RAG database through your normal Docker volume backup method. A backup you have never restored is a hope, not a backup.
Test the backup shape once. Note where each file lives. Note which volumes hold the data. Write down the restart command. That short note turns a bad update into a routine repair.
Update a default Docker install with the manual steps from the official guide:
docker compose down
git pull
docker compose pull
docker compose upThe guide also tells you to remove the old LibreChat images before you pull the new ones. Follow the current official update steps for your operating system. The repository’s npm run update:docker script rebuilds locally built images. It does not pull the prebuilt images the default Compose file uses. Do not rely on that script alone for a default install.
After the update, run the same tests every time:
- Open
http://localhost:3080and sign in as admin. - Send one short chat through your main provider.
- Send one short chat through your local endpoint, if you use one.
- Search for an old conversation.
- Ask one question about a test document.
Delete old backups only after those tests pass. Keep at least one known-good backup from before the update. Fast rollback beats a clever explanation during a busy workday.
Common errors and fixes
Port 3080 is already in use
Another application is using port 3080. Stop that application, or change the port LibreChat uses. The simplest fix is to set PORT in .env:
PORT=3081Restart with docker compose down && docker compose up -d. Then visit http://localhost:3081 instead. An override file alone does not free port 3080, because override ports are appended to the default list.
Containers exit immediately
Check the logs first:
docker compose logs apiInvalid librechat.yaml syntax can stop startup. A missing .env file can do the same. Docker not running is the third common cause. Validate the YAML syntax, confirm .env exists in the project root, and confirm Docker is open and running.
MongoDB crashes on an older CPU
The default MongoDB image requires AVX instructions. On a CPU without AVX, MongoDB crashes on startup. Create docker-compose.override.yml with an older MongoDB image:
services:
mongodb:
image: mongo:4.4.18Restart the stack and check the logs again. Do not keep restarting the same crashing image and calling it a network problem.
A custom endpoint does not appear
Check the endpoint block before you hunt through logs. LibreChat keeps a custom endpoint only if name, baseURL, apiKey, and models are all present. An entry missing any of them is removed with no error and no log line.
Check four things. Every field name is spelled correctly. models.default lists at least one model, even when fetch: true is set. The block sits inside the endpoints.custom list. The endpoint name is unique. A duplicate name silently replaces the first endpoint.
The endpoint appears, but messages fail
Check the .env chain. Every ${VARIABLE_NAME} in librechat.yaml needs a matching entry in .env. An unresolved API key fails with a missing API key message. An unresolved base URL fails with a missing base URL message.
If OpenRouter returns 402 Payment Required, the request reached OpenRouter. The issue is usually account credits, billing, or model availability. Fix the provider account. Do not rewrite the whole LibreChat config.
Docker cannot reach Ollama
Inside Docker, localhost means the container itself. Use the official example address, http://host.docker.internal:11434/v1/, when Ollama runs on the host machine. Confirm Ollama is running. Confirm the model name in models.default matches a model Ollama actually has. Then restart LibreChat and test again.
A config change seems to do nothing
Restart LibreChat. Config files do not apply themselves. Use docker compose down && docker compose up -d after you edit .env, librechat.yaml, or docker-compose.override.yml. Then test in a fresh browser tab.
Tips and tricks that save time
- Keep one known-good endpoint for repair tests. When a new endpoint fails, test the known-good one before you reinstall anything.
- Use
user_providedkeys when each person should pay for their own provider usage. Use one shared.envkey only when the business should pay the bill. - Name endpoints for humans. “Ollama Local” and “OpenRouter” beat a selector full of raw model strings.
- Put at least one real model in
models.default, even withfetch: true. An empty default list stops startup. - Validate
librechat.yamlafter every edit. One schema error anywhere can stop the server. - Close registration right after the first admin account. Do it before you share the address with anyone.
- Test file search on a harmless document first. A correct answer to a known question proves more than a long demo.
- Keep a dated copy of
.envandlibrechat.yamlbefore every update. Config backups are small. Regret is not.
The real cost maths: LibreChat versus ChatGPT Plus

LibreChat costs $0 to download and use under the MIT licence. ChatGPT Plus costs $20 a month, billed monthly, on OpenAI’s official Help Center page. That is $240 a year for one person.
Use a realistic five-person team scenario. Five staff members each pay for ChatGPT Plus. The team already has a suitable machine for LibreChat and a local Ollama endpoint. Your own test shows the local model handles routine drafts, summaries, and internal notes well enough to replace those five subscriptions.
| Choice | Software cost per year | What the number leaves out |
|---|---|---|
| LibreChat with local Ollama on a machine you already own | $0 | Electricity, hardware limits, update time, and model quality |
| Five ChatGPT Plus subscriptions | $1,200 | Hosted model access and OpenAI’s service operation |
| Software saving | $1,200 | Only real if the local workflow replaces the paid work |
The maths is plain. Five seats at $20 a month cost $100 a month. That is $1,200 a year. LibreChat software costs $0. The software saving is $1,200 a year in that scenario.
The saving shrinks the moment cloud APIs enter the picture. API usage is separate from ChatGPT Plus and billed independently. If your team still needs hosted frontier models through an API, LibreChat becomes the workspace and the API becomes the bill. That can still be the right choice. It is not a $1,200 saving until your usage proves it.
The solo maths is smaller. One ChatGPT Plus subscription costs $240 a year. LibreChat with a local endpoint costs $0 in software. The solo software saving is $240 a year, before electricity, hardware, and your time.
The licence needs plain words. MIT is a permissive open-source licence. You can use LibreChat without paying a licence fee. Keep the licence notice with the software. Read the licence of each model and provider you connect. LibreChat’s licence does not replace those terms. This guide is not legal advice.
When not to self-host LibreChat
Do not self-host LibreChat when nobody on the team will maintain it. Updates, backups, provider keys, and user accounts need an owner. A hosted subscription is the better buy when the honest answer is “no one will look after the server.”
Do not choose LibreChat when you want a model included. LibreChat is the workspace, not the model. If you want an offline desktop app with models inside one installer, start with GPT4All or Jan instead.
Do not expose LibreChat to the internet as a casual experiment. Public access needs HTTPS, closed registration, strong secrets, updates, and a plan for abuse. If you cannot maintain those pieces, keep the install local.
Do not ignore model quality. A private wrong answer is still a wrong answer. Test LibreChat on your real tasks, with your real documents, before you move customer work, legal work, medical work, or financial work to a local model.
Do not pick LibreChat when one provider’s own app already fits perfectly. If your team lives in one hosted product and never compares models, a self-hosted workspace adds maintenance without adding value. Self-hosting must earn its keep.
Pros and cons
Pros: $0 under the MIT licence; Docker Compose bundles MongoDB, Meilisearch, and the RAG API stack; one workspace for cloud providers and local endpoints; first single-tenant account becomes admin with no default credentials; custom endpoints keep keys in .env or user-provided storage; conversation search and file search are part of the default stack.
Cons: LibreChat does not run models, so provider or local endpoint setup is required; cloud API usage bills separately from subscriptions; Docker, config files, backups, and updates are your job; a missing endpoint field can drop the endpoint silently; older CPUs without AVX need a MongoDB image override; model quality depends on the provider or local model you connect.
Our verdict
Install LibreChat if you want one self-hosted chat workspace for your team and you are willing to own the server behind it. Start with Docker Compose, one admin account, closed registration, and one provider. Add Ollama or another custom endpoint only after the first chat works. Move the team over only when your own tasks prove the workflow saves money or time.
FAQ
Is LibreChat free for business use?
LibreChat is free to download and use under the MIT licence. That covers the LibreChat software. Check the terms of each model provider and local model before business use. Cloud API usage still bills separately.
Does LibreChat need a GPU?
No. LibreChat does not run AI models itself, so it does not need a GPU. Its containers need at least 1 GiB of RAM and 1 vCPU. If you connect a local model through Ollama, size the hardware for that model instead.
How do I install LibreChat with Docker?
Install Git and Docker. Clone the official repository, copy .env.example to .env, and run docker compose up -d. Open http://localhost:3080, sign up, and connect a model provider or local endpoint.
Why does my custom endpoint not appear?
LibreChat keeps a custom endpoint only if name, baseURL, apiKey, and models are all present. A missing field drops the endpoint silently. Also confirm models.default lists at least one model, the block sits inside endpoints.custom, and Docker mounts librechat.yaml.
Is LibreChat safe to expose on the internet?
Not by default. Create the first admin account yourself, set ALLOW_REGISTRATION=false, set persistent secrets, and serve the site over HTTPS. Keep the install local until those pieces are in place and tested.
Strategic Pivot: price the whole stack before you switch
LibreChat can remove duplicate chat subscriptions from a team workflow. It does not price the rest of your AI stack, and the rest is where small businesses quietly overspend. Before you cancel or renew any plan, put the tools, seats, and monthly prices you actually use into our AI Cost Calculator and look at the yearly total.
Then decide with the number in front of you. Move steady team chat to LibreChat when your own test proves the workflow works. Keep the hosted plan that earns its cost. Cancel the line that survives only because nobody added it up.
Sources
- LibreChat official Docker guide
- LibreChat official local installation guide
- LibreChat official Custom Endpoints guide
- LibreChat official authentication guide
- OpenAI Help Center: What is ChatGPT Plus?
Price note — updated 1 December 2026: Prices in this post were checked on 1 December 2026. When you are reading this, the price may be lower or higher — always check the official pricing page before you buy.
Pros
- $0 under the MIT licence
- Docker Compose bundles MongoDB, Meilisearch, and the RAG API stack
- One workspace for cloud providers and local endpoints
- First single-tenant account becomes admin with no default credentials
- Custom endpoints keep keys in .env or user-provided storage
- Conversation search and file search are part of the default stack
Cons
- LibreChat does not run models, so provider or local endpoint setup is required
- Cloud API usage bills separately from subscriptions
- Docker, config files, backups, and updates are your job
- A missing endpoint field can drop the endpoint silently
- Older CPUs without AVX need a MongoDB image override
- Model quality depends on the provider or local model you connect
Install LibreChat if you want one self-hosted chat workspace for your team and you are willing to own the server behind it. Start with Docker Compose, one admin account, closed registration, and one provider. Add Ollama or another custom endpoint only after the first chat works.
