-
-
Notifications
You must be signed in to change notification settings - Fork 227
2.1.3 Frontend: LibreChat
Handle:
librechat
URL: http://localhost:33891
Enhanced ChatGPT Clone: Features OpenAI, Assistants API, Azure, Groq, GPT-4 Vision, Mistral, Bing, Anthropic, OpenRouter, Vertex AI, Gemini, AI model switching, message search, langchain, DALL-E-3, ChatGPT Plugins, OpenAI Functions, Secure Multi-User System, Presets, completely open-source for self-hosting. More features in development.
# Will start librechat alongside
# the default webui
harbor up librechatIf you want to make LibreChat your default UI, please see the information below:
# Replace the default webui with librechat
# afterwards, you can just run `harbor up`
harbor defaults rm webui
harbor defaults add librechat
# You'll also want to set librechat as a main UI
harbor config set ui.main librechat
# That'll allow you to open the librechat
# directly with
harbor open
harbor qr
harbor tunnellibrechat is a full-stack chat UI (with MongoDB, Meilisearch, pgvector, and a RAG API sidecar) that is pre-configured to talk to several local Harbor backends and a wide range of external providers out of the box. No manual endpoint setup is required for the built-in ones.
Pre-configured local backends
The endpoints.custom section in the mounted services/librechat/librechat.yml (merged at startup via the yaml config merger) defines ready-to-use providers:
-
Ollama — points at
${HARBOR_OLLAMA_INTERNAL_URL}/v1/chat/completions; dynamically fetches models whenollamais running alongside. -
SGLang — points at
http://sglang:30000/v1; appears automatically whensglangis started together with librechat. -
Boost — points at
http://boost:8000/v1; appears automatically whenboostis started together with librechat.
External providers (key-injected)
The base compose.librechat.yml injects many HARBOR_*_KEY / HARBOR_*_TOKEN environment variables (Anyscale, Groq, Fireworks, Mistral, OpenRouter, Perplexity, Together.ai, Cohere, Anthropic, Google, OpenAI, etc.) into the container. These power the corresponding pre-defined endpoints in the config (with fallbacks to user_provided).
RAG and vector store
-
librechat-rag(always started as a dependency) is hardcoded to useollamafor embeddings (EMBEDDINGS_PROVIDER=ollama,OLLAMA_BASE_URL=${HARBOR_OLLAMA_INTERNAL_URL}, modelmxbai-embed-large). - Embeddings live in the
librechat-vector(pgvector) instance. - Message/search indexing uses the
librechat-search(Meilisearch) instance. - All supporting services (
librechat-db,librechat-search,librechat-vector,librechat-rag) are brought up viadepends_onand wired over theharbor-network.
Reverse proxy / external access
- With
traefikpresent:compose.x.traefik.librechat.ymladds labels so the UI is reachable athttps://librechat.${HARBOR_TRAEFIK_DOMAIN}(websecure entrypoint).
UI replacement
- LibreChat can replace the default
webuientirely (see the "Starting" section for theharbor defaults+harbor config set ui.main librechatflow). After that,harbor open,harbor qr, andharbor tunneltarget LibreChat.
Host / volume interactions
-
Persistent user data & chats:
./services/librechat/data(host) ↔/data/db(inside librechat-db mongo container). -
Search index:
./services/librechat/meili_data_v1.12↔/meili_data. -
Vector embeddings (RAG):
./services/librechat/vectordb↔/var/lib/postgresql/data. -
Custom branding / assets:
./services/librechat/images↔/app/client/public/images. - Config, secrets, and startup script (
librechat.yml,.env,override.env,start_librechat.sh) live under./services/librechat/on the host and are bind-mounted. The custom entrypoint runs the yaml merger over all*.ymlfiles in/app/configs(arrays such ascustomendpoints are concatenated), allowing users to drop extra endpoint definitions without touching the base file.
This wiring means that starting harbor up librechat ollama sglang boost (for example) immediately surfaces all three local providers inside the LibreChat UI with working chat, title generation, and RAG capabilities.
LibreChat comes with a lot of features and settings that can be adjusted to your liking. Harbor will keep all the relevant files in the librechat folder of the workspace.
- Official Configuration reference
-
services/librechat/librechat.yml- main configuration file -
services/librechat/override.env- service-specific environment variable overrides