mirror of
https://github.com/LibreChat-AI/librechat.ai.git
synced 2026-03-27 02:38:32 +07:00
* docs(config): rewrite overview with FileTree and restart guide - Replace vague marketing copy with actionable config guide - Add FileTree showing 4 config files (.env, librechat.yaml, docker-compose.yml, docker-compose.override.yml) - Add file descriptions explaining what each config file controls - Add restart Callout with Docker/Local tabs - Add next-step Cards linking to librechat.yaml setup, Docker setup, .env reference * docs(config): restructure librechat.yaml with guide-first setup steps - Replace feature list with 4-step setup procedure using Steps component - Add Docker/Local Tabs for deployment-specific commands - Add OpenRouter worked example with OPENROUTER_KEY warning - Add Reference section with Cards linking to ai_endpoints and object_structure - Merge troubleshooting content from setup.mdx into index page - Remove outdated model menu screenshots * refactor(config): merge setup.mdx into librechat.yaml and add redirect - Delete setup.mdx (content merged into index.mdx) - Remove setup from meta.json pages array - Update ai_endpoints link from /setup to /librechat_yaml - Add redirect for old /setup URL in next.config.mjs * docs(endpoints): rewrite OpenRouter as end-to-end setup guide - Replace bare YAML snippet with 5-step Steps component guide - Add OPENROUTER_KEY vs OPENROUTER_API_KEY warning callout - Add Docker/Local restart Tabs and verification step - Add customization section and reference Cards - Remove deprecated GitHub screenshot image * docs(setup): rewrite Docker install with first-login flow and troubleshooting - Add Steps-based installation with clone, env, start, and verify steps - Document first account = admin behavior at localhost:3080 - Add librechat.yaml volume mounting section with override file pattern - Add troubleshooting for port conflicts, container crashes, missing env vars - Replace deprecated Additional Links with Cards component for next steps - Cross-link to librechat.yaml guide, Docker override guide, and .env reference * docs(endpoints): add file context and activation steps to custom endpoints - Add 'Which File Does What' callout explaining librechat.yaml, .env, and docker-compose.override.yml roles - Rewrite Step 4 as 'Restart and Verify' with Docker/Local Tabs - Add troubleshooting callout for missing endpoints - Replace deprecated AdditionalLinks with Cards for next steps - Link to Configuration Overview for file relationship context * docs(endpoints): fix OpenRouter Step tag indentation * fix(docs): replace empty user guides hub with Cards and remove stale screenshot - Rewrite user_guides/index.mdx as Cards hub with Guides and Popular Features sections - Add cross-links to Agents, Image Gen, Web Search, and MCP feature pages - Remove stale screenshot from LiteLLM page (110412045 asset) - Verify auth section Next button works (SAML/auth0 -> pre_configured_ai) - Verify S3 page has all required sections (no changes needed) * docs(features): add Quick Start guide and cross-links to image generation * docs(tools): rewrite Google Search with agent-first Steps and cross-links * chore: update .gitignore * fix: make Docker/Local tabs switch content when clicked The TabCompat wrapper was rendering <Tabs.Tab> as plain <div> elements, which never registered with fumadocs' internal tab context. Clicking tab triggers had no effect because the content panels didn't respond to state changes. Fix: assign the real fumadocs Tab component as TabsCompat.Tab via Object.assign, so <Tabs.Tab> in MDX renders the real Tab that registers with the parent Tabs context. Keep standalone <Tab> (from auto-generated code blocks with filename=) as a plain div fallback to avoid crashes when there is no parent Tabs context.
191 lines
4.9 KiB
Plaintext
191 lines
4.9 KiB
Plaintext
---
|
|
title: Docker
|
|
icon: Container
|
|
description: How to install LibreChat locally with Docker, verify your setup, and configure custom endpoints
|
|
---
|
|
|
|
For most scenarios, Docker Compose is the recommended installation method due to its simplicity, ease of use, and reliability.
|
|
|
|
## Prerequisites
|
|
|
|
- [`Git`](https://git-scm.com/downloads)
|
|
- [`Docker`](https://www.docker.com/products/docker-desktop/)
|
|
|
|
Docker Desktop is recommended for most users. For remote server installations, see the [Ubuntu Docker Deployment Guide](/docs/remote/docker_linux).
|
|
|
|
## Installation
|
|
|
|
<Steps>
|
|
<Step>
|
|
|
|
### Clone the Repository
|
|
|
|
```bash
|
|
git clone https://github.com/danny-avila/LibreChat.git
|
|
cd LibreChat
|
|
```
|
|
|
|
</Step>
|
|
<Step>
|
|
|
|
### Create Your Environment File
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
```
|
|
|
|
The default `.env` file works out of the box for a basic setup. For in-depth configuration, see the [.env reference](/docs/configuration/dotenv).
|
|
|
|
<Callout type="info" title="Windows">
|
|
|
|
On Windows, use `copy .env.example .env` if `cp` is not available.
|
|
|
|
</Callout>
|
|
|
|
</Step>
|
|
<Step>
|
|
|
|
### Start LibreChat
|
|
|
|
```bash
|
|
docker compose up -d
|
|
```
|
|
|
|
The first launch pulls Docker images and may take a few minutes. Subsequent starts are much faster.
|
|
|
|
</Step>
|
|
<Step>
|
|
|
|
### Verify and Log In
|
|
|
|
Open your browser and visit [http://localhost:3080](http://localhost:3080). You should see the LibreChat login page.
|
|
|
|
<Callout type="info" title="First Account = Admin">
|
|
|
|
The first account you register becomes the admin account. There are no default credentials -- you create your own username and password during registration.
|
|
|
|
</Callout>
|
|
|
|
Click **Register** to create your account and start using LibreChat.
|
|
|
|
</Step>
|
|
</Steps>
|
|
|
|
## Mounting librechat.yaml
|
|
|
|
To use a custom `librechat.yaml` configuration file with Docker, you need to mount it as a volume so the container can access it.
|
|
|
|
Copy the example override file and edit it:
|
|
|
|
```bash
|
|
cp docker-compose.override.yml.example docker-compose.override.yml
|
|
```
|
|
|
|
Ensure the librechat.yaml volume mount is uncommented in `docker-compose.override.yml`:
|
|
|
|
```yaml filename="docker-compose.override.yml"
|
|
services:
|
|
api:
|
|
volumes:
|
|
- type: bind
|
|
source: ./librechat.yaml
|
|
target: /app/librechat.yaml
|
|
```
|
|
|
|
Restart for changes to take effect:
|
|
|
|
```bash
|
|
docker compose down && docker compose up -d
|
|
```
|
|
|
|
For full setup instructions including creating the file from scratch, see the [librechat.yaml guide](/docs/configuration/librechat_yaml). For more override options, see the [Docker override guide](/docs/configuration/docker_override).
|
|
|
|
## Updating LibreChat
|
|
|
|
The following commands will fetch the latest LibreChat project changes, including any necessary changes to the docker compose files, as well as the latest prebuilt images.
|
|
|
|
<Callout type="info" title="Permissions">
|
|
|
|
You may need to prefix commands with `sudo` according to your environment permissions.
|
|
|
|
</Callout>
|
|
|
|
```bash filename="Stop the running container(s)"
|
|
docker compose down
|
|
```
|
|
|
|
```bash filename="Remove all existing docker images"
|
|
# Linux/Mac
|
|
docker images -a | grep "librechat" | awk '{print $3}' | xargs docker rmi
|
|
|
|
# Windows (PowerShell)
|
|
docker images -a --format "{{.ID}}" --filter "reference=*librechat*" | ForEach-Object { docker rmi $_ }
|
|
```
|
|
|
|
```bash filename="Pull latest project changes"
|
|
git pull
|
|
```
|
|
|
|
```bash filename="Pull the latest LibreChat image"
|
|
docker compose pull
|
|
```
|
|
|
|
```bash filename="Start LibreChat"
|
|
docker compose up
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
### Port Already in Use
|
|
|
|
If you see an error like `bind: address already in use` for port 3080, another application is using that port.
|
|
|
|
Either stop the conflicting application, or change the port in `docker-compose.override.yml`:
|
|
|
|
```yaml filename="docker-compose.override.yml"
|
|
services:
|
|
api:
|
|
ports:
|
|
- "3081:3080"
|
|
```
|
|
|
|
Then visit `http://localhost:3081` instead.
|
|
|
|
### Container Crashes on Startup
|
|
|
|
If containers exit immediately after starting, check the logs:
|
|
|
|
```bash
|
|
docker compose logs api
|
|
```
|
|
|
|
Common causes:
|
|
|
|
- Invalid `librechat.yaml` syntax -- validate with the [YAML Validator](/toolkit/yaml_checker)
|
|
- Missing `.env` file -- ensure `.env` exists in the project root
|
|
- Docker not running -- ensure Docker Desktop is open and running
|
|
|
|
### Missing Environment Variables
|
|
|
|
If features are not working as expected, check that required environment variables are set in your `.env` file.
|
|
|
|
```bash
|
|
docker compose exec api env | grep -i "your_variable"
|
|
```
|
|
|
|
See the [.env reference](/docs/configuration/dotenv) for all available variables and their defaults.
|
|
|
|
## Next Steps
|
|
|
|
<Cards num={3}>
|
|
<Cards.Card title="Custom Endpoints" href="/docs/quick_start/custom_endpoints" arrow>
|
|
Add OpenRouter, Ollama, and other AI providers
|
|
</Cards.Card>
|
|
<Cards.Card title="Configuration Overview" href="/docs/configuration" arrow>
|
|
Understand how LibreChat's config files work together
|
|
</Cards.Card>
|
|
<Cards.Card title="Authentication Setup" href="/docs/configuration/authentication" arrow>
|
|
Configure OAuth, LDAP, and other login methods
|
|
</Cards.Card>
|
|
</Cards>
|