• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
Best Free Web Resources — local AI tools and hardware guides

Best Free Web Resources

Local AI Tools & Digital Engineering Resources

What can I run?
  • AI Tools
    • Start: Local LLMs
    • Ollama Models & VRAM
    • LM Studio Models
    • GPU Comparison
    • AI Hardware Matrix
    • Local LLM Directory
    • VRAM Calculator
    • Hardware Compare
    • Local Model Recommender
    • API Pricing & ROI
  • Local AI Guides
  • Web Resources
    • Inspiration
    • Photography
    • Games
    • SEO
    • Tutorial
      • Coding
      • WordPress
    • Resume/CV
    • Graphics
      • Logo
    • Freebies
Cover illustration: LibreChat With Ollama

LibreChat With Ollama: Docker Setup, Local Models and Safe Defaults

November 23, 2026 by BFWR Editorial

LibreChat is an open-source, MIT-licensed chat interface that you host yourself. It runs no models and needs no GPU: its documentation asks for at least 1 GiB of RAM and one vCPU, and 2 GB of memory for Docker when every container is running. To use it with Ollama you add one custom endpoint to librechat.yaml with the base URL http://host.docker.internal:11434/v1/. The failure almost everyone hits is that Ollama listens only on 127.0.0.1, which a Docker container cannot reach.

This guide covers the Docker Compose install, the exact Ollama endpoint block, how to keep file search on your own machine, the defaults to change before anyone else can reach the server, and how LibreChat compares with Open WebUI. BFWR has not installed LibreChat. The steps, settings and file contents come from LibreChat’s documentation, its Compose files and its GitHub repository, all read on 15 November 2026.

Quick answer

  • Install: git clone https://github.com/LibreChat-AI/LibreChat.git, cp .env.example .env, docker compose up -d, then open http://localhost:3080.
  • Ollama: mount a librechat.yaml through docker-compose.override.yml and add a custom endpoint named Ollama with baseURL: "http://host.docker.internal:11434/v1/", any placeholder apiKey and fetch: true.
  • If Ollama does not appear: Ollama binds 127.0.0.1 by default, so the container cannot reach it. Check docker compose logs api for the URL it tried.
  • File search is not local by default: the RAG API uses OpenAI embeddings unless you set EMBEDDINGS_PROVIDER=ollama and switch to the full RAG image.
  • Change these defaults: port 3080 is published on every network interface, and open registration is on (ALLOW_REGISTRATION=true). Bind to 127.0.0.1 and turn registration off after you create your admin account.
  • Licence: MIT, with no branding or user-count clause, unlike Open WebUI.

What LibreChat is, and whether it is maintained

The repository moved from danny-avila/LibreChat to LibreChat-AI/LibreChat, and GitHub redirects the old address. On 15 November 2026 the GitHub API reported the MIT licence, about 47,100 stars, a push that day, and 1,873 commits to main in the previous 90 days. The repository is not archived and its README carries no maintenance notice. The last full release was v0.8.8 on 1 October 2026, followed by v0.8.9-rc1 on 26 October. Check the releases page before you rely on a version number; this project ships often.

The documentation is clear about what LibreChat is not: “LibreChat does not run AI models itself; it sends requests to the providers you configure, so it does not need a GPU.” Ollama does the inference, so size the machine for the model, not for the interface. The VRAM calculator covers that part.

What docker compose up starts

The default docker-compose.yml defines six services. Only two publish a port to your machine:

Service (container) Image What it does Published port
api (LibreChat) librechat-dev:latest The web app and API ${PORT}:${PORT}, 3080 by default, all interfaces
mongodb (chat-mongodb) mongo:8.0.20 Users, chats, settings. Runs with --noauth None
meilisearch (chat-meilisearch) getmeili/meilisearch:v1.35.1 Conversation search, off until enabled None
vectordb pgvector/pgvector:0.8.0-pg15-trixie Stores document embeddings for file search None
rag_api librechat-rag-api-dev-lite:latest Indexes uploaded files None
admin-panel librechat-admin-panel:latest Admin UI; refuses to start without ADMIN_PANEL_SESSION_SECRET 3000, all interfaces

The docs explain which databases you actually need: “MongoDB is required: LibreChat stores users, conversations, messages, and settings in it. PostgreSQL is optional: only the RAG API uses it, to store document embeddings, and LibreChat itself never connects to it.”

Install LibreChat with Docker Compose

You need Git and Docker (Docker Desktop on macOS and Windows). These are the commands from LibreChat’s Docker guide:

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

On Windows, use copy .env.example .env if cp is not available. The first start pulls every image and takes a few minutes. Then open http://localhost:3080 and click Sign up. There is no default login: in a single-tenant install, “the first account you register becomes the admin account.”

Leave docker-compose.yml alone: its first line says to put changes in an override file, which Compose merges automatically.

The .env keys that matter for a local setup

  • PORT=3080: the port LibreChat listens on and publishes.
  • ALLOW_REGISTRATION=true and ALLOW_EMAIL_LOGIN=true: email sign-up and login are open by default. ALLOW_SOCIAL_LOGIN=false and ALLOW_SOCIAL_REGISTRATION=false keep Google, GitHub and the other social logins off.
  • CREDS_KEY, CREDS_IV, JWT_SECRET, JWT_REFRESH_SECRET: blank in the example. LibreChat then generates random values and stores them in /app/data/.env.temp inside the librechat-data volume. The example file says to “Configure unique, persistent values before using a production instance.”
  • SEARCH=false and MEILI_MASTER_KEY=: conversation search stays off until you set SEARCH=true and a unique master key of at least 16 bytes.

Connect LibreChat to Ollama

Ollama has no built-in button in LibreChat. It is added as a custom endpoint in librechat.yaml, and Docker needs to be told to mount that file.

Step 1: mount librechat.yaml

cp docker-compose.override.yml.example docker-compose.override.yml

Uncomment the config-file section so the file reads:

services:
  api:
    volumes:
      - type: bind
        source: ./librechat.yaml
        target: /app/librechat.yaml

Step 2: add the Ollama endpoint

Create librechat.yaml in the LibreChat folder. The endpoint block below is the example from LibreChat’s Ollama page with one change: the baseURL is switched to host.docker.internal, as that example’s own comment says to do when LibreChat runs in Docker. The version line is required; the value shown is the one in the repository’s librechat.example.yaml on 15 November, so match it to your checkout.

version: 1.3.18

endpoints:
  custom:
    - name: "Ollama"
      apiKey: "ollama"
      # use 'host.docker.internal' instead of localhost if running LibreChat in a docker container
      baseURL: "http://host.docker.internal:11434/v1/"
      models:
        default: [
          "llama2",
          "mistral",
          "codellama",
          "dolphin-mixtral",
          "mistral-openorca"
          ]
        # fetching list of models is supported but the `name` field must start
        # with `ollama` (case-insensitive), as it does in this example.
        fetch: true
      titleConvo: true
      titleModel: "current_model"
      modelDisplayLabel: "Ollama"

The default list is only a sample. With fetch: true LibreChat reads the models you have actually pulled. Keep titleModel: "current_model": the docs say it lets title generation reuse the conversation’s model “instead of loading a second one”. The apiKey must not be empty: Ollama ignores it, but “a custom endpoint with no apiKey is dropped at config load.”

Restart with docker compose down && docker compose up -d. Ollama should now appear in the endpoint menu.

Running Ollama inside the same Compose stack

docker-compose.override.yml.example also contains an ollama service using ollama/ollama:latest with an NVIDIA GPU reservation. Its example publishes 11434:11434 on every interface. If only LibreChat needs Ollama, you can drop that ports line: containers in the same Compose project reach each other by service name, so the baseURL becomes http://ollama:11434/v1/ and port 11434 never opens on your network. Pull models inside that container, as Ollama’s Docker instructions show with docker exec.

When Ollama does not appear, or the model list is empty

This is the most reported problem. Issue #12817 (April 2026) asked for it to be documented after its author “wasted a lot of time” on it, and LibreChat’s Ollama page now lists the checks:

  1. localhost is the wrong host inside Docker. In the container, localhost is the LibreChat container itself. Use http://host.docker.internal:11434/v1/. On Linux, the default Compose file already maps host.docker.internal to the host for the api service through extra_hosts, so you do not need to add it there. Use http://localhost:11434/v1/ only when LibreChat runs outside Docker.
  2. Ollama is listening only on loopback. Ollama’s FAQ says “Ollama binds 127.0.0.1 port 11434 by default.” LibreChat’s docs say to set OLLAMA_HOST=0.0.0.0 in Ollama’s environment and restart it, and they warn straight after: “Ollama’s API is unauthenticated.” Binding to every interface hands model access, including pulling and deleting models, to anyone who can reach port 11434. The docs suggest binding instead to the address the LibreChat container reaches and firewalling the port. Running Ollama inside the Compose stack, as above, avoids the question.
  3. The endpoint name changes how models are listed. LibreChat calls Ollama’s native /api/tags only when the endpoint name starts with ollama. Any other name falls back to /v1/models, which current Ollama versions also answer.
  4. Read the log. docker compose logs api shows the connection error and the exact URL LibreChat tried.

One more thing changes answers rather than connectivity. Ollama’s context-length page says it defaults to 4K tokens on GPUs with under 24 GiB of VRAM. In a long LibreChat conversation the earlier messages fall out of that window. Start Ollama with OLLAMA_CONTEXT_LENGTH=32768 (or larger, if your VRAM allows) to raise it for every model; our Ollama server guide covers where to set server variables on each platform.

Keep file search on your machine

LibreChat’s “Upload for File Search” sends documents to its RAG API, which splits them into chunks (CHUNK_SIZE=1500 with CHUNK_OVERLAP=100 by default), turns them into embeddings and stores them in pgvector. The default embeddings provider is OpenAI. With the stock .env, file search either needs an OpenAI key or does not work, and with a key your document text goes to OpenAI.

The docs give an Ollama option. Pull the embedding model first with ollama pull nomic-embed-text, then add three lines to .env:

EMBEDDINGS_PROVIDER=ollama
OLLAMA_BASE_URL=http://host.docker.internal:11434
EMBEDDINGS_MODEL=nomic-embed-text

Then switch the RAG container to the full image in docker-compose.override.yml, under the same services: key as the api entry. Each service name can appear only once in that file.

  rag_api:
    image: registry.librechat.ai/librechat-ai/librechat-rag-api-dev:latest
    # If running on Linux
    # extra_hosts:
    #   - "host.docker.internal:host-gateway"

Uncomment the extra_hosts lines on Linux. Unlike the api service, rag_api has no host.docker.internal mapping in the default Compose file. Note the OLLAMA_BASE_URL here has no /v1, unlike the chat endpoint. Which embedding model to choose is covered in our local embedding models guide.

Safe defaults before anyone else can reach it

On a home server or a shared network, change these first.

  • Bind the web port to localhost. The Compose file publishes "${PORT}:${PORT}", which Docker opens on every network interface. The Docker guide says override ports are appended to that list rather than replacing it, and documents the !override tag (Docker Compose 2.24.4 or later) for replacing it. Use it to publish on loopback only:
    services:
      api:
        ports: !override
          - "127.0.0.1:3080:3080"

    Put this under the same api: entry as the librechat.yaml volume, and reach it from other machines through an HTTPS reverse proxy or an SSH tunnel.

  • Close registration after you sign up. The authentication docs say the first account “gets the ADMIN role, so create it yourself before opening registration to others”. Register, then set ALLOW_REGISTRATION=false in .env and restart. The docs say that even with registration disabled you can add users with the create-user script: docker compose exec api npm run create-user. You can also restrict sign-ups to your email domain with registration.allowedDomains in librechat.yaml.
  • Set permanent secrets. Generate your own CREDS_KEY, CREDS_IV, JWT_SECRET and JWT_REFRESH_SECRET rather than relying on the generated temporary file. The docs point to LibreChat’s credentials generator and ask for JWT secrets of at least 32 bytes.
  • Never publish the database ports. MongoDB runs with --noauth, and the vector database uses the sample password mypassword. Both are safe only because no port is published. The override example labels its MongoDB port section “USE CAREFULLY, THIS MAKES YOUR DATABASE VULNERABLE TO ATTACKS”.
  • Watch the admin panel. If you set ADMIN_PANEL_SESSION_SECRET, the admin panel starts on port 3000, also on every interface. Apply the same !override pattern to admin-panel.
  • Keep Ollama off the network. See step 2 above. Our local LLM security guide covers the wider risks once tools and documents are involved.

LibreChat vs Open WebUI

Both put a ChatGPT-style interface in front of Ollama. They differ in setup and licence.

LibreChat Open WebUI
Licence MIT BSD-3 terms plus a branding clause (GitHub reports NOASSERTION)
Latest release, 15 Nov v0.8.8 (1 Oct 2026) v0.13.3 (8 Nov 2026)
Docker install Compose stack: app, MongoDB, Meilisearch, pgvector, RAG API One container with a data volume
Ollama connection Custom endpoint in librechat.yaml Detected automatically on port 11434
File search Separate RAG API with pgvector Built in

The licence is the deciding difference for some teams. Open WebUI’s clause 4 says licensees are “strictly prohibited from altering, removing, obscuring, or replacing any” Open WebUI branding unless a deployment has no more than 50 end users in any rolling 30-day period, or you hold written permission or an enterprise licence. LibreChat’s MIT licence asks only that the copyright and permission notice stay in copies of the software. You can rebrand it for any number of users. This is a reading of the two published licence texts, not legal advice.

For the quickest single-container setup, Open WebUI is simpler (see our Open WebUI guide). For MIT terms, LibreChat.

FAQ

Why does LibreChat not show my Ollama models?

Usually the base URL is localhost inside Docker, or Ollama is listening only on 127.0.0.1. Use http://host.docker.internal:11434/v1/, make sure Ollama listens on an address the container can reach, and check docker compose logs api.

Can each user point LibreChat at their own Ollama server?

Yes, with baseURL: "user_provided". Those URLs go through LibreChat’s SSRF check, which blocks private and loopback addresses. To allow a private Ollama, list it with its port under endpoints.allowedAddresses, for example 'host.docker.internal:11434'.

Can LibreChat run with no data leaving my computer?

Chat can, with Ollama as the only endpoint. File search needs EMBEDDINGS_PROVIDER=ollama and the full RAG image, because the default is OpenAI embeddings.

Related guides and tools

  • Open WebUI in 2026: setup, backends and the licence catch
  • Running Ollama as a server and in Docker
  • Build a private RAG chatbot for your documents
  • Best local embedding models for RAG
  • Securing a local LLM
  • Self-hosted AI: the full stack
  • Ollama models and VRAM

Sources

  • LibreChat-AI/LibreChat on GitHub: README, docker-compose.yml, docker-compose.override.yml.example, .env.example, librechat.example.yaml, LICENSE and releases
  • LibreChat docs: Docker install, Ollama endpoint, Docker override, .env reference, authentication and RAG API
  • LibreChat issue #12817 (Ollama listening only on 127.0.0.1)
  • Ollama docs: FAQ and context length
  • Open WebUI LICENSE

Updated 15 November 2026. Repository activity, release versions, Compose files, example configuration and documentation were read on that date; check the releases page for newer versions.

⚡ Free Interactive Tools

Work out what your hardware can actually run

Free calculators and directories, sized from real model weights — before you download gigabytes or order a card:

📦 Ollama Models & VRAM Memory cost + pull command 🚀 Start: Local LLMs Hardware, runner and first model 📊 What Can I Run? Models by VRAM tier, 8GB–128GB 💻 Hardware Matrix 75 laptops & GPUs profiled

Filed Under: Technology, Tutorial

About BFWR Editorial

BFWR Editorial is the byline for guides researched and written by Best Free Web Resources. These guides are built from primary sources — model cards, configuration files, official documentation and vendor pricing pages — and every figure is dated and linked so you can check it yourself. Size and memory numbers are arithmetic computed from published model data or from our own calculators, never measurements: BFWR does not operate a hardware test lab and publishes no benchmarks of its own. Where a figure comes from a vendor, we say so.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

⚡ FREE INTERACTIVE TOOLS

Local AI Hardware & VRAM Matrix

Benchmark your PC or Mac for local AI, calculate VRAM requirements, and compare cloud API costs vs local hardware ROI.

🚀 New here? Start with Local LLMs → 💻 Hardware Matrix (79 Devices) → 📚 Local LLM Directory (30 Models) → 🎮 AI GPU Comparison → ⚡ VRAM & KV Cache Calculator → 💰 API Pricing & Break-Even → 🍎 Mac VRAM Unlocker (90% Boost) →
📦 Ollama 🖥️ LM Studio ⚙️ llama.cpp 🚦 vLLM 💬 Open WebUI 🎨 ComfyUI 🔒 Self-Hosted 📊 VRAM Tiers 🎯 Recommender ⚖️ Comparisons

Search

  • Facebook
  • Instagram
  • RSS
  • Twitter
  • YouTube

Footer

Latest Guides

  • LibreChat With Ollama: Docker Setup, Local Models and Safe Defaults
  • SAM 3 Locally: Files, ComfyUI Nodes, Prompts and the Licence
  • Jan With Local Models: Setup, the llama.cpp Engine and the Local API Server
  • Free Seamless Textures in 2026: CC0 Sources, Photoshop Use and What the Licences Allow
  • GPT4All in 2026: Is It Still Maintained, and What to Use Instead
  • ComfyUI Manager Not Showing: Why, and How to Fix It in 2026

AI Tools & Calculators

  • What can I run?
  • VRAM Calculator
  • GGUF Size Calculator
  • Fine-tuning VRAM
  • LoRA Training VRAM
  • Image Generation VRAM
  • Mac VRAM Optimizer

Browse & Compare

  • Models Directory (30 models)
  • Hardware Matrix (79 devices)
  • Image Models
  • Model Licences
  • Comparisons
  • Model Recommender
  • API Pricing & ROI

Guides & Resources

  • Technology
  • Coding
  • Tutorials
  • Freebies
  • Graphics

Copyright © 2026 · Best Free Web Resources · All Rights Reserved.  |  About · Privacy Policy · Contact · AI Tools Hub