### Local Development Setup Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/features/admin_panel.mdx Instructions for cloning the repository, setting up the environment, installing dependencies, and running the admin panel locally for development. ```bash git clone https://github.com/ClickHouse/librechat-admin-panel.git cd librechat-admin-panel cp .env.example .env # then edit bun install bun dev # http://localhost:3000 ``` -------------------------------- ### Copy Example librechat.yaml Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/index.mdx Copy the example configuration file to use as a starting point for your custom setup. ```bash cp librechat.example.yaml librechat.yaml ``` -------------------------------- ### Build and Start Project Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/blog/2024-04-17_blog_guide.mdx Commands to build the project for production and then start the application. ```bash pnpm build pnpm start ``` -------------------------------- ### Example MCP Settings Configuration Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/mcp_settings.mdx This example demonstrates the structure of the mcpSettings configuration, showing commented-out options for allowedDomains and an active example for allowedAddresses. ```yaml mcpSettings: # Strict whitelist mode: # allowedDomains: # - "example.com" # Specific domain # - "*.example.com" # All subdomains using wildcard # - "https://api.example.com:8443" # With protocol and port # - "http://mcp-server:3000" # Internal service, explicitly whitelisted # Default SSRF mode with private service exemptions: allowedAddresses: - "host.docker.internal:8080" # Permit one private host on one port - "10.0.0.5:8000" # Permit one private IP on one port ``` -------------------------------- ### Clone and Run LibreChat.ai Source: https://github.com/librechat-ai/librechat.ai/blob/main/README.md Steps to clone the repository, set up environment variables, install dependencies, and start the development server. ```bash git clone https://github.com/LibreChat-AI/librechat.ai.git cd librechat.ai # (Optional) create a local env file for Ask AI, rate limiting, etc. cp .env.template .env.local # Install dependencies pnpm install # Start the dev server pnpm dev ``` -------------------------------- ### Standalone Admin Panel Setup Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/features/admin_panel.mdx Steps to set up the admin panel as a standalone service using Docker Compose. This involves creating an environment file and starting the service. ```bash # 1. Create an env file cp .env.example .env # 2. Edit .env and set at minimum: # SESSION_SECRET= # VITE_API_BASE_URL=http://host.docker.internal:3080 # 3. Start it docker compose up -d # http://localhost:3000 docker compose down # stop ``` -------------------------------- ### Install Helm Chart Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/local/helm_chart.mdx Install the LibreChat Helm chart from the official OCI registry. ```bash helm install oci://ghcr.io/danny-avila/librechat-chart/librechat ``` -------------------------------- ### Interface Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/interface.mdx This snippet shows a comprehensive example of the `interface` configuration block, demonstrating various settings for UI elements and functionalities. ```yaml interface: mcpServers: placeholder: 'MCP Servers' use: true create: true share: false public: false configureObo: false trustCheckbox: label: 'I trust this server' subLabel: 'Only enable servers you trust' privacyPolicy: externalUrl: 'https://example.com/privacy' openNewTab: true termsOfService: externalUrl: 'https://example.com/terms' openNewTab: true modalAcceptance: true modalTitle: 'Terms of Service' modalContent: | # Terms of Service ## Introduction Welcome to LibreChat! modelSelect: false parameters: true contextUsage: true contextCost: true currency: code: EUR rate: 0.92 presets: false prompts: use: true create: true share: true public: false bookmarks: true multiConvo: true agents: use: true create: true share: true public: false skills: use: true create: true share: false public: false defaultActiveOnShare: false sharedLinks: create: true share: true public: false snapshotFiles: true customWelcome: 'Hey {{user.name}}! Welcome to LibreChat' runCode: true webSearch: true fileSearch: true fileCitations: true defaultPinnedTools: - artifacts - execute_code - mcp ``` -------------------------------- ### Successful Connection Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/mongodb/mongodb_auth.mdx Example log output indicating a successful connection and server listening status after applying the new configuration. ```text LibreChat | 2024-02-04 20:59:43 info: Server listening on all interfaces at port 3080. Use http://localhost:3080 to access it chat-mongodb | {"t":{"$date":"2024-02-04T20:59:53.880+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"192.168.160.4:58114","uuid":{"uuid":{" $uuid":"027bdc7b-a3f4-429a-80ee-36cd172058ec"}},"connectionId":17,"connectionCount":10}} ``` -------------------------------- ### Balance Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/balance.pl.mdx This snippet shows a complete example of the balance configuration object, demonstrating how to enable or disable various balance management features. ```yaml balance: enabled: false startBalance: 20000 autoRefillEnabled: false refillIntervalValue: 30 refillIntervalUnit: "days" refillAmount: 10000 ``` -------------------------------- ### Verify Git, Node.js, and npm Installation Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/docker_linux.mdx Confirms that Git, Node.js, and npm have been installed successfully by displaying their respective versions. ```bash git --version node -v npm -v ``` -------------------------------- ### Start Deployed Docker Container Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/docker_linux.mdx Use this command to start the deployed Docker container. ```bash npm run start:deployed ``` -------------------------------- ### Example Traversaal Prompts Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/tools/traversaal.mdx Use these example prompts to test the Traversaal tool's search capabilities. ```text Find recent reporting about open source AI coding agents. ``` ```text Search for sources comparing renewable energy adoption in Europe and North America. ``` -------------------------------- ### Install LibreChat Components as Systemd Services Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/blog/2023-08-18_podman.mdx These commands use the previously defined './install.sh' script to register LibreChat's MongoDB, MeiliSearch, and the main application as systemd user services, enabling them to start on boot. ```bash ./install.sh librechat-mongodb ``` ```bash ./install.sh librechat-meilisearch ``` ```bash ./install.sh librechat ``` -------------------------------- ### Start Meilisearch Process (npm) Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/meilisearch.mdx Start the Meilisearch process with your generated master key. It will listen on port 7700 by default. ```bash ./meilisearch --master-key= ``` -------------------------------- ### Web Search Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/web_search.mdx Configure web search providers, scrapers, and rerankers using environment variables. This example shows how to set API keys and select providers for Serper, SearxNG, Tavily, Firecrawl, Jina, and Cohere. ```yaml webSearch: # Search Provider Configuration serperApiKey: "${SERPER_API_KEY}" searxngInstanceUrl: "${SEARXNG_INSTANCE_URL}" searxngApiKey: "${SEARXNG_API_KEY}" searchProvider: "serper" # Options: "serper", "searxng", "tavily" # Tavily Configuration (search and/or scraper) tavilyApiKey: "${TAVILY_API_KEY}" # Optional: custom Tavily-compatible endpoints tavilySearchUrl: "${TAVILY_SEARCH_URL}" tavilyExtractUrl: "${TAVILY_EXTRACT_URL}" # Scraper Configuration firecrawlApiKey: "${FIRECRAWL_API_KEY}" firecrawlApiUrl: "${FIRECRAWL_API_URL}" firecrawlVersion: "${FIRECRAWL_VERSION}" scraperProvider: "firecrawl" # Options: "firecrawl", "serper", "tavily" # Reranker Configuration jinaApiKey: "${JINA_API_KEY}" jinaApiUrl: "${JINA_API_URL}" cohereApiKey: "${COHERE_API_KEY}" rerankerType: "jina" # Options: "jina", "cohere", "none" # General Settings scraperTimeout: 7500 # Timeout in milliseconds for scraper requests (default: 7500) safeSearch: 1 # Options: 0 (OFF), 1 (MODERATE - default), 2 (STRICT) ``` -------------------------------- ### Start MongoDB Server with Configuration File Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/mongodb/mongodb_community.mdx Start the MongoDB server using a configuration file to apply network settings for remote access. Ensure the --config path is correct. ```yaml ./mongod --config /path/to/mongodb/config/mongodb.conf ``` -------------------------------- ### Complete Speech Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/speech.mdx A comprehensive example demonstrating the configuration of multiple TTS providers (OpenAI, ElevenLabs), STT, and speech tab defaults within the LibreChat YAML file. ```yaml version: 1.3.10 cache: true speech: tts: openai: apiKey: "${TTS_API_KEY}" model: "tts-1-hd" voices: ["alloy", "echo", "fable", "onyx", "nova", "shimmer"] elevenlabs: apiKey: "${ELEVENLABS_API_KEY}" model: "eleven_multilingual_v2" voices: ["21m00Tcm4TlvDq8ikWAM", "AZnzlk1XvdvUeBnXmlld"] voice_settings: stability: 0.5 similarity_boost: 0.75 stt: openai: apiKey: "${STT_API_KEY}" model: "whisper-1" speechTab: conversationMode: false advancedMode: false speechToText: true textToSpeech: engineTTS: "openai" voice: "nova" automaticPlayback: false ``` -------------------------------- ### Start Backend Server in Development Mode Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/development/get_started.mdx Starts the backend server with hot-reloading enabled, monitoring for changes. Access the backend at http://localhost:3080/. ```sh npm run backend:dev ``` -------------------------------- ### Summarization Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/summarization.mdx Configure the summarization provider, model, token limits, and context pruning behavior. This example shows how to set up OpenAI for summarization with specific token ratios and pruning strategies. ```yaml summarization: provider: 'openAI' model: 'gpt-4o-mini' maxSummaryTokens: 4096 reserveRatio: 0.05 trigger: type: 'token_ratio' value: 0.8 contextPruning: enabled: true keepLastAssistants: 3 softTrimRatio: 0.3 hardClearRatio: 0.5 minPrunableToolChars: 50000 softTrim: maxChars: 4000 headChars: 1500 tailChars: 1500 hardClear: enabled: true placeholder: '[Old tool result content cleared]' ``` -------------------------------- ### Install Development Version of Helm Chart Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/local/helm_chart.mdx Install the development version of the Helm chart from the local repository. ```bash helm install ./helm/librechat ``` -------------------------------- ### Registration Object Structure Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/registration.mdx An example demonstrating the overall structure of the registration object, including social logins and allowed domains. ```yaml # Example Registration Object Structure registration: socialLogins: ["google", "facebook", "github", "discord", "openid"] allowedDomains: - "gmail.com" - "protonmail.com" ``` -------------------------------- ### Copy Example Override File Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/docker_override.mdx Create a local docker-compose.override.yml file by copying the example provided in the repository. This file is automatically detected by Docker Compose. ```bash cp docker-compose.override.yml.example docker-compose.override.yml ``` -------------------------------- ### Production Redirect URI Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/mcp_servers/google_workspace.mdx Provides an example of a redirect URI for a production environment. Replace `chat.example.com` with your actual LibreChat domain. ```text https://chat.example.com/api/mcp/gmail/oauth/callback ``` -------------------------------- ### MCP Servers Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/interface.mdx This snippet provides a specific example for configuring `mcpServers`, including internationalized labels for the trust checkbox. ```yaml interface: mcpServers: placeholder: 'Select MCP Server' use: true create: true share: false configureObo: false trustCheckbox: label: en: 'I trust this server' es: 'Confío en este servidor' subLabel: en: 'Only enable servers you trust' es: 'Solo habilite servidores en los que confíe' ``` -------------------------------- ### Example Prompts for OpenWeather Tool Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/tools/openweather.mdx These example prompts demonstrate how to query different types of weather information using the OpenWeather tool. They cover current conditions, historical data, summaries, and unit preferences. ```text What's the current weather in London? What was the weather like in Paris on 2023-01-01? Give me a weather summary for Tokyo. What's the temperature in New York in Fahrenheit? ``` -------------------------------- ### Install Git, Node.js, and npm Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/docker_linux.mdx Installs Git, Node.js, and npm on Debian/Ubuntu systems. These tools are useful for managing the LibreChat project and its dependencies. ```bash sudo apt install git nodejs npm ``` -------------------------------- ### USD Spend Calculation Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/token_usage.mdx Demonstrates the calculation of USD spend using the provided token values and rate. This practical example helps in verifying the accuracy of the formulas and understanding the real-world cost. ```math \frac{205.5}{1,000,000} = \$0.0002055 \text{ USD} ``` -------------------------------- ### Azure OpenAI Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/ai_endpoints/azure.mdx An example librechat.yaml configuration demonstrating endpoint, group, and model-level settings for Azure OpenAI, including multiple regions and deployments. ```yaml endpoints: azureOpenAI: # Endpoint-level configuration titleModel: "llama-70b-chat" plugins: true assistants: true groups: # Group-level configuration - group: "my-resource-westus" apiKey: "${WESTUS_API_KEY}" instanceName: "my-resource-westus" version: "2024-03-01-preview" # Model-level configuration models: gpt-4-vision-preview: deploymentName: gpt-4-vision-preview version: "2024-03-01-preview" gpt-3.5-turbo: deploymentName: gpt-35-turbo gpt-4-1106-preview: deploymentName: gpt-4-1106-preview # Group-level configuration - group: "mistral-inference" apiKey: "${AZURE_MISTRAL_API_KEY}" baseURL: "https://Mistral-large-vnpet-serverless.region.inference.ai.azure.com/v1/chat/completions" serverless: true # Model-level configuration models: mistral-large: true # Group-level configuration - group: "my-resource-sweden" apiKey: "${SWEDEN_API_KEY}" instanceName: "my-resource-sweden" deploymentName: gpt-4-1106-preview version: "2024-03-01-preview" assistants: true # Model-level configuration models: gpt-4-turbo: true ``` -------------------------------- ### Set Node.js and npm Versions Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/local/npm.mdx Use nvm to install and select Node.js v24.16.0, then install npm v11.16.0 globally. Verify the versions using `node -v` and `npm -v`. ```bash nvm install 24.16.0 nvm use 24.16.0 npm install -g npm@11.16.0 node -v npm -v ``` -------------------------------- ### Start MongoDB Server with Data Directory Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/mongodb/mongodb_community.mdx Use this command to start the MongoDB server, specifying the directory for data storage. Ensure the --dbpath points to your created data directory. ```sh ./mongod --dbpath=/path/to/data/directory ``` -------------------------------- ### mcpSettings Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/config.mdx Demonstrates how to configure mcpSettings in the LibreChat YAML file. It shows examples for both strict allowedDomains whitelisting and the default SSRF mode with allowedAddresses exemptions for private services. ```yaml mcpSettings: # Strict whitelist mode: # allowedDomains: # - "example.com" # Specific domain # - "*.example.com" # All subdomains # - "http://mcp-server:3000" # Internal service, explicitly whitelisted # Default SSRF mode with private service exemptions: allowedAddresses: - 'host.docker.internal:8080' # Permit one private host on one port - '10.0.0.5:8000' # Permit one private IP on one port ``` -------------------------------- ### Actions Object Structure Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/actions.mdx Demonstrates the basic structure of the Actions object, showing commented-out examples for strict whitelist mode (`allowedDomains`) and default SSRF mode with private service exemptions (`allowedAddresses`). ```yaml # Example Actions Object Structure actions: # Strict whitelist mode: # allowedDomains: # - "swapi.dev" # - "librechat.ai" # - "google.com" # - "https://api.example.com:8443" # With protocol and port # Default SSRF mode with private service exemptions: allowedAddresses: - "host.docker.internal:11434" # Permit one private host on one port - "10.0.0.5:8080" # Permit one private IP on one port ``` -------------------------------- ### Start MongoDB Container Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/mongodb/mongodb_auth.mdx Start only the MongoDB container in detached mode to prepare for authentication setup. The `-d` flag runs the container in the background. ```bash docker compose up -d mongodb ``` -------------------------------- ### Start ngrok HTTP Tunnel on Windows Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/ngrok.mdx Start an ngrok HTTP tunnel to expose your local server running on port 3080. This command is used after ngrok is installed and configured on Windows. ```bash ngrok http 3080 ``` -------------------------------- ### Create Banner (Direct Command Examples) Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/banner.mdx These examples demonstrate how to create banners with specific configurations using direct command-line arguments. They cover different scenarios like welcome messages, maintenance notices, and security alerts, specifying display times, messages, public visibility, and persistence. ```bash npm run update-banner "" "" "👋 Welcome to LibreChat!" "false" "false" ``` ```bash npm run update-banner "2025-12-20T00:00:00Z" "2025-12-21T06:00:00Z" "⚠️ Scheduled maintenance on Dec 20th, 2-6 AM UTC" "true" "true" ``` ```bash npm run update-banner "" "" "🔒 Please update your password by January 1st" "true" "true" ``` -------------------------------- ### Start Development Server Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/blog/2024-04-17_blog_guide.mdx Use this command to launch the local development server for real-time previewing of changes. ```bash pnpm dev ``` -------------------------------- ### Build Compiled Code Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/development/get_started.mdx Compiles all necessary code for the LibreChat project. This command should be run after installing dependencies and before starting the development servers. ```sh npm run build ``` -------------------------------- ### Groq API Key Setup Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/ai_endpoints/groq.mdx Add your Groq API key to the `.env` file for authentication. ```bash GROQ_API_KEY=your-api-key ``` -------------------------------- ### MCP Server Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx Demonstrates a basic configuration for an MCP server using the 'stdio' type, including command and arguments. ```yaml mcpServers: myServer: type: "stdio" command: "npx" args: ["-y", "@modelcontextprotocol/server-puppeteer"] ``` -------------------------------- ### Example AWS Bedrock Object Structure Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/aws_bedrock.mdx This configuration sets up an AWS Bedrock endpoint, specifying the title model, stream rate, available regions, and guardrail settings. It demonstrates a comprehensive setup for Bedrock integration. ```yaml endpoints: bedrock: titleModel: 'anthropic.claude-3-haiku-20240307-v1:0' streamRate: 35 availableRegions: - 'us-east-1' - 'us-west-2' guardrailConfig: guardrailIdentifier: 'your-guardrail-id' guardrailVersion: '1' trace: 'enabled' streamProcessingMode: 'sync' ``` -------------------------------- ### Install pnpm Globally Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/blog/2024-04-17_blog_guide.mdx If pnpm is not installed globally, you can install it using npm. This is a prerequisite for installing project dependencies. ```bash npm install -g pnpm ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/blog/2024-04-17_blog_guide.mdx Install project dependencies using pnpm. Ensure Node.js and pnpm are installed globally. ```bash pnpm install ``` -------------------------------- ### Create /api/.env File Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/development/testing.mdx Copy the example environment file to create a local .env file for the API. This is a prerequisite for running local tests. ```bash cp .env.example ./api/.env ``` -------------------------------- ### Install and Use Node.js Version 24 Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/development/get_started.mdx Installs and sets the Node.js version to 24.16.0 and globally installs npm version 11.16.0. Use this when a specific Node.js version is required. ```sh nvm install 24.16.0 nvm use 24.16.0 npm install -g npm@11.16.0 ``` -------------------------------- ### Copy Environment File Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/docker_linux.mdx Copies the example environment file (`.env.example`) to `.env`. This file will store sensitive credentials and configuration settings. ```bash # Copies the example file as your global env file cp .env.example .env ``` -------------------------------- ### Create .env File Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/local/npm.mdx Copy the example environment file to create your active .env file. Note: Windows users may need to use `copy` instead of `cp`. ```bash cp .env.example .env ``` -------------------------------- ### File Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/file_config.mdx Demonstrates the structure of the fileConfig object, including endpoint-specific settings for assistants, OpenAI, and custom endpoints, as well as global limits for server file size, avatar size, file token limits, image generation, and file processing for OCR, text, and STT. ```yaml fileConfig: endpoints: assistants: fileLimit: 5 fileSizeLimit: 10 totalSizeLimit: 50 supportedMimeTypes: - "image/.*" - "application/pdf" openAI: disabled: true default: totalSizeLimit: 20 YourCustomEndpointName: fileLimit: 5 fileSizeLimit: 1000 supportedMimeTypes: - "image/.*" serverFileSizeLimit: 1000 avatarSizeLimit: 2 fileTokenLimit: 100000 imageGeneration: percentage: 100 px: 1024 ocr: supportedMimeTypes: - "^image/(jpeg|gif|png|webp|heic|heif)$" - "^application/pdf$" - "^application/vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation|spreadsheetml\.sheet)$" - "^application/vnd\.ms-(word|powerpoint|excel)$" - "^application/epub\+zip$" text: supportedMimeTypes: - "^text/(plain|markdown|csv|json|xml|html|css|javascript|typescript|x-python|x-java|x-csharp|x-php|x-ruby|x-go|x-rust|x-kotlin|x-swift|x-scala|x-perl|x-lua|x-shell|x-sql|x-yaml|x-toml)$" stt: supportedMimeTypes: - "^audio/(mp3|mpeg|mpeg3|wav|wave|x-wav|ogg|vorbis|mp4|x-m4a|flac|x-flac|webm)$" ``` -------------------------------- ### Install Docker Dependencies Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/docker_linux.mdx Installs essential packages required for Docker to function correctly on Ubuntu. ```bash sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release ``` -------------------------------- ### Install Certbot for CentOS Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/nginx.mdx Installs Certbot and the Nginx plugin on CentOS systems for managing SSL/TLS certificates. ```bash sudo yum install certbot python2-certbot-nginx ``` -------------------------------- ### Install Certbot for Ubuntu Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/nginx.mdx Installs Certbot and the Nginx plugin on Ubuntu systems for managing SSL/TLS certificates. ```bash sudo apt-get install certbot python3-certbot-nginx ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/blog/2023-08-18_podman.mdx Copies the example environment file to the root directory and updates specific configuration keys required for container networking. ```bash cp ./LibreChat/.env.example .env ``` ```sh HOST=0.0.0.0 MONGO_URI=mongodb://librechat-mongodb:27017/LibreChat MEILI_HOST=http://librechat-meilisearch:7700 MEILI_NO_ANALYTICS=true ``` -------------------------------- ### Example LibreChat URL Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/huggingface.mdx An example of a fully formed URL for accessing a LibreChat deployment, based on the template. ```text https://cooluser-librechat.hf.space/ ``` -------------------------------- ### MCP Server with Custom Instructions Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/mcp_servers.mdx Demonstrates how to provide custom instructions for an MCP server to be injected into the agent context. ```yaml mcpServers: customInstructionsServer: serverInstructions: "Custom instructions for this server." ``` -------------------------------- ### Make Installation Script Executable Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/blog/2023-08-18_podman.mdx This command changes the permissions of the installation script to make it executable, allowing it to be run directly. ```bash chmod +x ./install.sh ``` -------------------------------- ### Start LibreChat Docker Services Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/local/docker.mdx Starts the LibreChat services using Docker Compose after pulling the latest changes and images. ```bash docker compose up ``` -------------------------------- ### Run Frontend in Development Mode Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/development/get_started.mdx Starts the frontend development server with hot-reloading, monitoring for changes. Ensure the backend is running. View the frontend at http://localhost:3090/. ```sh npm run frontend:dev ``` -------------------------------- ### Install Docker Compose Plugin Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/docker_linux.mdx Installs the Docker Compose plugin on Debian/Ubuntu-based systems. This is required for managing Docker containers for LibreChat. ```bash sudo apt install docker-compose-plugin ``` -------------------------------- ### Install Helm Chart with Values Override Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/local/helm_chart.mdx Install the Helm chart using a custom values file to override default settings. ```bash helm install librechat oci://ghcr.io/danny-avila/librechat-chart/librechat --values ``` -------------------------------- ### Shared Endpoint Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings.mdx Demonstrates how to configure shared settings for multiple endpoints, including individual endpoint overrides and global defaults using the 'all' key. Headers are merged, with endpoint-specific headers taking precedence. ```yaml endpoints: # Individual endpoint configurations openAI: streamRate: 25 titleModel: 'gpt-4o-mini' titleMethod: 'completion' titleTiming: 'immediate' titlePrompt: "Create a concise title for this conversation:\n\n{convo}" headers: X-Gateway-Metadata: '{"user_email":"{{LIBRECHAT_USER_EMAIL}}"}' azureOpenAI: streamRate: 35 titleModel: 'grok-3' titleMethod: 'structured' titlePrompt: | Analyze this conversation and provide: 1. A concise title in the detected language (5 words or less, no punctuation or quotation) 2. Always provide a relevant emoji at the start of the title {convo} titleConvo: true anthropic: streamRate: 25 titleModel: 'claude-3-5-haiku-20241022' titleMethod: 'completion' headers: X-Conversation-Id: '{{LIBRECHAT_BODY_CONVERSATIONID}}' bedrock: streamRate: 25 titleModel: 'us.amazon.nova-lite-v1:0' titleEndpoint: 'anthropic' google: streamRate: 1 titleModel: 'gemini-2.0-flash-lite' titlePromptTemplate: "Human: {input}\nAssistant: {output}" headers: X-Gateway-Metadata: '{"user_id":"{{LIBRECHAT_USER_ID}}"}' assistants: streamRate: 30 azureAssistants: streamRate: 30 # Global configuration using 'all' - this applies shared settings across endpoints. # Most defined values override endpoint defaults; headers are merged and endpoint values win on collisions. all: headers: X-App: 'librechat' titleConvo: true titleModel: 'gpt-4.1-nano' titleTiming: 'immediate' titlePrompt: | Analyze this conversation and provide: 1. The detected language of the conversation 2. A concise title in the detected language (5 words or less, no punctuation or quotation) 3. Always provide a relevant emoji at the start of the title {convo} ``` -------------------------------- ### Enable Marketplace Access in Interface Configuration Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/object_structure/interface.mdx Example of how to enable marketplace access by setting `use` to `true` within the interface configuration. ```yaml interface: marketplace: use: true # Enable marketplace access ``` -------------------------------- ### Install Docker CE Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/remote/docker_linux.mdx Installs the Docker Community Edition (docker-ce) from the official Docker repository, which is preferred over distribution-provided packages for up-to-date versions. ```bash sudo apt install docker-ce ``` -------------------------------- ### Configure Stable Diffusion URL for Local Install Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/tools/stable_diffusion.mdx Set the SD_WEBUI_URL environment variable in your .env file or directly in the webui for local installations. ```env SD_WEBUI_URL=http://127.0.0.1:7860 ``` -------------------------------- ### Complete LibreChat YAML Configuration Example Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/librechat_yaml/example.mdx This example configuration includes most documented endpoints and settings. It's useful for understanding the full scope of LibreChat's configuration options. Note that Azure, LiteLLM, MLX, and Ollama require additional specific configurations not shown here. ```yaml version: 1.3.13 cache: true # skillSync: # github: # enabled: false # intervalMinutes: 60 # runOnStartup: true # sources: # - id: librechat-skills # owner: your-org # repo: your-skills-repo # ref: main # paths: # - skills # skillDiscoveryDepth: 2 # token: '${GITHUB_SKILLS_TOKEN}' # # credentialKey: production-skills # # tenantId: your-tenant-id interface: # MCP Servers UI configuration mcpServers: placeholder: 'MCP Servers' # configureObo: false # Permission to configure MCP On-Behalf-Of token exchange # Shared Links permissions # sharedLinks: # create: true # share: true # public: false # snapshotFiles: true # Skills permissions and activation defaults # skills: # use: true # create: true # share: false # public: false # defaultActiveOnShare: false # Retention mode: "temporary" applies only to temporary chats; "all" applies to all retained data # retentionMode: "temporary" # retainAgentFiles: false # Keep persistent agent resource files when retentionMode is "all" # Privacy policy settings privacyPolicy: externalUrl: 'https://librechat.ai/privacy-policy' openNewTab: true # Terms of service termsOfService: externalUrl: 'https://librechat.ai/tos' openNewTab: true # Context usage and cost display # contextUsage: true # contextCost: true # currency: # code: EUR # rate: 0.92 # Default prompt-bar pinned tools for users who have not customized pins # defaultPinnedTools: # - artifacts # - execute_code # - mcp registration: socialLogins: ['discord', 'facebook', 'github', 'google', 'openid'] endpoints: custom: # Anyscale - name: 'Anyscale' apiKey: '${ANYSCALE_API_KEY}' baseURL: 'https://api.endpoints.anyscale.com/v1' models: default: ['meta-llama/Llama-2-7b-chat-hf'] fetch: true titleConvo: true titleModel: 'meta-llama/Llama-2-7b-chat-hf' summarize: false summaryModel: 'meta-llama/Llama-2-7b-chat-hf' modelDisplayLabel: 'Anyscale' # APIpie - name: 'APIpie' apiKey: '${APIPIE_API_KEY}' baseURL: 'https://apipie.ai/v1/' models: default: [ 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo', 'claude-3-opus', 'claude-3-sonnet', 'claude-3-haiku', 'llama-3-70b-instruct', 'llama-3-8b-instruct', 'gemini-pro-1.5', 'gemini-pro', 'mistral-large', 'mistral-medium', 'mistral-small', 'mistral-tiny', 'mixtral-8x22b', ] fetch: false titleConvo: true titleModel: 'gpt-3.5-turbo' dropParams: ['stream'] #cohere - name: 'cohere' apiKey: '${COHERE_API_KEY}' baseURL: 'https://api.cohere.ai/v1' models: default: [ 'command-r', 'command-r-plus', 'command-light', 'command-light-nightly', 'command', 'command-nightly', ] fetch: false modelDisplayLabel: 'cohere' titleModel: 'command' dropParams: ['stop', 'user', 'frequency_penalty', 'presence_penalty', 'temperature', 'top_p'] # Fireworks - name: 'Fireworks' apiKey: '${FIREWORKS_API_KEY}' baseURL: 'https://api.fireworks.ai/inference/v1' models: default: ['accounts/fireworks/models/mixtral-8x7b-instruct'] fetch: true titleConvo: true titleModel: 'accounts/fireworks/models/llama-v2-7b-chat' summarize: false summaryModel: 'accounts/fireworks/models/llama-v2-7b-chat' modelDisplayLabel: 'Fireworks' dropParams: ['user'] # groq - name: 'groq' apiKey: '${GROQ_API_KEY}' baseURL: 'https://api.groq.com/openai/v1/' models: default: [ 'llama2-70b-4096', 'llama3-70b-8192', 'llama3-8b-8192', 'mixtral-8x7b-32768', 'gemma-7b-it', ] fetch: false titleConvo: true titleModel: 'mixtral-8x7b-32768' modelDisplayLabel: 'groq' ``` -------------------------------- ### Enable and Configure User Token Balances Source: https://github.com/librechat-ai/librechat.ai/blob/main/content/docs/configuration/dotenv.mdx Enable token credit balances for OpenAI/Plugins endpoints and set an initial balance for new users upon registration. Defaults to false for CHECK_BALANCE and 20000 for START_BALANCE. ```bash CHECK_BALANCE=false START_BALANCE=20000 ```