### Local Development Setup Source: https://www.librechat.ai/docs/features/admin_panel Clone the repository, set up environment variables, install dependencies, and start the development server for local administration panel 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 ``` -------------------------------- ### Install Git, Node.js, and npm Source: https://www.librechat.ai/docs/remote/docker_linux Installs Git, Node.js, and npm, which are useful for managing projects and dependencies, though not strictly required for Docker-based setups. ```bash sudo apt install git nodejs npm ``` -------------------------------- ### Copy Example librechat.yaml Source: https://www.librechat.ai/docs/configuration/librechat_yaml Copy the example configuration file to `librechat.yaml` as a starting point for your custom configuration. ```bash cp librechat.example.yaml librechat.yaml ``` -------------------------------- ### Copy Environment Example Source: https://www.librechat.ai/docs/local Copy the example environment file to create your own configuration. ```bash $cp .env.example .env ``` -------------------------------- ### Build and Start LibreChat Source: https://www.librechat.ai/docs/local/npm Perform a clean dependency install and build LibreChat using 'npm run reinstall'. Then, start the backend server with 'npm run backend'. ```bash npm run reinstall ``` ```bash npm run backend ``` -------------------------------- ### Allowed Domains - Full Example Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/actions A comprehensive example showing various allowed domain configurations, including internal services. ```yaml allowedDomains: - "swapi.dev" - "librechat.ai" - "google.com" - "https://secure-api.example.com:443" - "192.168.1.50" # Internal service (explicitly allowed) ``` -------------------------------- ### Standalone Admin Panel Setup Source: https://www.librechat.ai/docs/features/admin_panel Deploy the admin panel using its published image from GHCR. This involves creating an environment file and starting the Docker container. ```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 and Use Node.js Version Source: https://www.librechat.ai/docs/development/get_started Use nvm to install and switch to the recommended Node.js version. Ensure npm is also updated to the specified version. ```bash nvm install 24.16.0 nvm use 24.16.0 npm install -g npm@11.16.0 ``` -------------------------------- ### Copy Environment Example Source: https://www.librechat.ai/docs/development/testing Copy the example environment file to be used for local testing. Ensure this is done before setting NODE_ENV. ```bash cp .env.example ./api/.env ``` -------------------------------- ### Install Dependencies and Build with Turborepo Source: https://www.librechat.ai/docs/development/architecture Use `smart-reinstall` to install dependencies and build the project via Turborepo, especially if the lockfile has changed. `reinstall` is a clean install option. ```bash npm run smart-reinstall ``` ```bash npm run reinstall ``` -------------------------------- ### Create Docker Compose Override File Source: https://www.librechat.ai/docs/configuration/docker_override Copy the example override file to start customizing your Docker Compose setup. Docker Compose automatically detects this file. ```bash cp docker-compose.override.yml.example docker-compose.override.yml ``` -------------------------------- ### Summarization Configuration Example Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/summarization Configure the summarization provider, model, token limits, and context pruning settings. This setup replaces per-endpoint summarization fields. ```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]' ``` -------------------------------- ### Example MCP Settings Configuration Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/mcp_settings This example demonstrates how to configure mcpSettings, showing both strict domain whitelisting and default SSRF protection with private service exemptions. ```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 ``` -------------------------------- ### Interactive Banner Creation Prompts Source: https://www.librechat.ai/docs/configuration/banner Example of the interactive prompts guiding the user through banner creation, including date formats and visibility options. ```bash -------------------------- Update the banner! -------------------------- Display From (Format: yyyy-mm-ddTHH:MM:SSZ, Default: now): > 2025-12-02T09:00:00Z Display To (Format: yyyy-mm-ddTHH:MM:SSZ, Default: not specified): > 2025-12-31T23:59:59Z Enter your message (Enter a single dot "." on a new line to finish): > πŸŽ‰ Welcome to LibreChat! Check out our new features. > . Is public (y/N): > n Is persistable (cannot be dismissed) (y/N): > n ``` -------------------------------- ### Example Traversaal Prompts Source: https://www.librechat.ai/docs/configuration/tools/traversaal Use these example prompts to query Traversaal for specific information. Ensure your query is a complete sentence. ```text Find recent reporting about open source AI coding agents. ``` ```text Search for sources comparing renewable energy adoption in Europe and North America. ``` -------------------------------- ### Copy Environment Example File Source: https://www.librechat.ai/docs/local/npm Copy the example environment file to create a new environment file. Note: Use 'copy' instead of 'cp' on Windows 10. ```bash cp .env.example .env ``` -------------------------------- ### Install Dependencies and Build Workspaces Source: https://www.librechat.ai/docs/development Use this command to install dependencies and build compiled workspaces. It's recommended when needed or after significant changes. ```bash npm run smart-reinstall ``` -------------------------------- ### Verify Git, Node.js, and npm Installation Source: https://www.librechat.ai/docs/remote/docker_linux Confirms the successful installation of Git, Node.js, and npm by displaying their respective version numbers. ```bash git --version node -v npm -v ``` -------------------------------- ### Start MongoDB Community Server Source: https://www.librechat.ai/docs/configuration/mongodb/mongodb_community Use this command to start the MongoDB server, specifying the data directory. Ensure the path is correct for your system. ```bash ./mongod --dbpath=/path/to/data/directory ``` -------------------------------- ### Full Speech Configuration Example Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/speech This example demonstrates how to configure multiple TTS providers (OpenAI, ElevenLabs) and an STT provider (OpenAI), along with default UI settings for speech features. ```yaml speech: tts: openai: apiKey: "${TTS_API_KEY}" model: "tts-1" voices: ["alloy", "echo", "fable", "onyx", "nova", "shimmer"] elevenlabs: apiKey: "${ELEVENLABS_API_KEY}" model: "eleven_multilingual_v2" voices: ["voice-id-1", "voice-id-2"] stt: openai: apiKey: "${STT_API_KEY}" model: "whisper-1" speechTab: conversationMode: true advancedMode: false speechToText: true textToSpeech: true ``` -------------------------------- ### MCP Servers Configuration Example Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/config This example demonstrates how to configure various MCP servers with different connection types, timeouts, and instructions. It covers 'sse', 'stdio', and 'streamable-http' connection types, along with custom user variables for authentication. ```yaml mcpServers: everything: # type: sse # type can optionally be omitted url: http://localhost:3001/sse timeout: 30000 initTimeout: 10000 serverInstructions: true # Use server-provided instructions puppeteer: type: stdio command: npx args: - -y - '@modelcontextprotocol/server-puppeteer' timeout: 30000 initTimeout: 10000 serverInstructions: 'Do not access any local files or local/internal IP addresses' filesystem: # type: stdio command: npx args: - -y - '@modelcontextprotocol/server-filesystem' - /home/user/LibreChat/ iconPath: /home/user/LibreChat/client/public/assets/logo.svg mcp-obsidian: command: npx args: - -y - 'mcp-obsidian' - /path/to/obsidian/vault streamable-http-example: type: streamable-http url: https://example.com/mcp headers: Authorization: 'Bearer ${API_TOKEN}' timeout: 30000 per-user-crendentials-example: type: sse url: 'https//some.mcp/sse' headers: X-Custom-Auth-Token: '{{USER_API_KEY}}' # Placeholder for the user-provided API key, defined in `customUserVars` below. customUserVars: USER_API_KEY: title: 'Service API Key' description: "Your personal API key for this service. You can get it here." serverInstructions: true ``` -------------------------------- ### Install LibreChat Helm Chart (OCI) Source: https://www.librechat.ai/docs/local/helm_chart Install the official LibreChat Helm chart from the OCI registry. Replace `` with your desired release name. ```bash helm install oci://ghcr.io/danny-avila/librechat-chart/librechat ``` -------------------------------- ### Install and Run Azurite using npm Source: https://www.librechat.ai/docs/configuration/cdn/azure Install the Azurite package globally and run it with specified silent, location, and debug options for local Azure Storage emulation. ```bash npm install -g azurite azurite --silent --location /path/to/azurite/workspace --debug /path/to/debug/log ``` -------------------------------- ### Example MCP Servers Object Structure Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/mcp_servers This snippet shows a comprehensive example of how to configure various MCP servers within the LibreChat YAML configuration. It includes examples for different server types, authentication methods, and custom parameters. ```yaml # Example MCP Servers Object Structure mcpServers: everything: # type: sse # type can optionally be omitted url: http://localhost:3001/sse googlesheets: type: sse url: https://mcp.composio.dev/googlesheets/some-endpoint requiresOAuth: true headers: X-User-ID: '{{LIBRECHAT_USER_ID}}' X-API-Key: '${SOME_API_KEY}' serverInstructions: true # Use server-provided instructions puppeteer: type: stdio command: npx args: - -y - '@modelcontextprotocol/server-puppeteer' serverInstructions: 'Do not access any local files or local/internal IP addresses' filesystem: # type: stdio command: npx args: - -y - '@modelcontextprotocol/server-filesystem' - /home/user/LibreChat/ iconPath: /home/user/LibreChat/client/public/assets/logo.svg # The β€œwrench” icon shows up if no icon is provided as it is the default rendering. mcp-obsidian: command: npx args: - -y - 'mcp-obsidian' - /path/to/obsidian/vault streamable-http-server: type: streamable-http url: https://example.com/api/ proxy: '${MCP_PROXY_URL}' per-user-credentials-example: type: streamable-http url: 'https://example.com/api/' headers: X-Auth-Token: '{{MY_SERVICE_API_KEY}}' customUserVars: MY_SERVICE_API_KEY: title: 'My Service API Key' description: "Enter your personal API key for the service. You can generate one at Service Developer Portal." sensitive: true MY_SERVICE_PROJECT: title: 'Project ID' description: 'Enter the project ID used by this service.' sensitive: false oauth-example: type: streamable-http url: https://api.example.com/mcp/ oauth: authorization_url: https://example.com/oauth/authorize token_url: https://example.com/oauth/token client_id: your_client_id client_secret: your_client_secret redirect_uri: http://localhost:3080/api/mcp/oauth-example/oauth/callback scope: 'read execute' obo-example: type: streamable-http url: https://api.example.com/mcp/ obo: scopes: 'api://mcp-server-id/Mcp.Tools.ReadWrite' ``` -------------------------------- ### Example SAML Certificate File Content Source: https://www.librechat.ai/docs/configuration/authentication/SAML This is an example of the content expected in a SAML certificate file (PEM format). ```text -----BEGIN CERTIFICATE----- MIIDazCCAlOgAwIBAgIUKhXaFJGJJPx466rl... -----END CERTIFICATE----- ``` -------------------------------- ### Example Registration Object Structure Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/registration This is a complete example of the registration object structure, showing how to define social login providers and allowed email domains. ```yaml # Example Registration Object Structure registration: socialLogins: ["google", "facebook", "github", "discord", "openid"] allowedDomains: - "gmail.com" - "protonmail.com" ``` -------------------------------- ### Start Docker Compose Services Source: https://www.librechat.ai/docs/remote/docker_linux Starts the Docker services defined in the deploy-compose.yml file. This command may rebuild images if necessary. ```bash docker compose -f ./deploy-compose.yml up ``` -------------------------------- ### Install and Build LibreChat Source: https://www.librechat.ai/docs/development/get_started Run the smart reinstall command for dependencies and then build the project. If Node.js or npm versions were recently changed, use `npm run reinstall` for a clean installation. ```bash npm run smart-reinstall npm run build ``` -------------------------------- ### Calculate Token Value Example Source: https://www.librechat.ai/docs/configuration/token_usage Example calculation demonstrating how to compute the token value using the provided raw amount and rate. ```plaintext 137 \times 1.5 = 205.5 ``` -------------------------------- ### Clean Install Dependencies Source: https://www.librechat.ai/docs/development Perform a clean installation of dependencies. Use this after changing Node/npm versions or if the dependency state becomes suspect. ```bash npm run reinstall ``` -------------------------------- ### Combined AWS Bedrock Configuration Example Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/aws_bedrock A comprehensive example demonstrating the configuration of Bedrock models and their corresponding inference profiles, including cross-region model IDs and environment variable interpolation. ```yaml endpoints: bedrock: models: - 'us.anthropic.claude-sonnet-4-20250514-v1:0' - 'us.anthropic.claude-haiku-4-20250514-v1:0' inferenceProfiles: 'us.anthropic.claude-sonnet-4-20250514-v1:0': '${BEDROCK_CLAUDE_SONNET_PROFILE}' 'us.anthropic.claude-haiku-4-20250514-v1:0': '${BEDROCK_CLAUDE_HAIKU_PROFILE}' ``` -------------------------------- ### Install LibreChat Helm Chart (Local Development) Source: https://www.librechat.ai/docs/local/helm_chart Install the LibreChat Helm chart from a local directory, typically used during development. Navigate to the repo's root directory first. ```bash helm install ./helm/librechat ``` -------------------------------- ### Enable Marketplace Access Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/interface.mdx Example of how to enable access to the Agent Marketplace by setting 'use' to true. ```yaml interface: marketplace: use: true # Enable marketplace access ``` -------------------------------- ### Rate Limits Configuration Example Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/config This example demonstrates how to configure rate limits for various operations including file uploads, conversation imports, STT, and TTS. It shows settings for IP-based and user-based limits with specified time windows. ```yaml rateLimits: fileUploads: ipMax: 100 ipWindowInMinutes: 60 userMax: 50 userWindowInMinutes: 60 conversationsImport: ipMax: 100 ipWindowInMinutes: 60 userMax: 50 userWindowInMinutes: 60 stt: ipMax: 100 ipWindowInMinutes: 1 userMax: 50 userWindowInMinutes: 1 tts: ipMax: 100 ipWindowInMinutes: 1 userMax: 50 userWindowInMinutes: 1 ``` -------------------------------- ### Huggingface API Key Setup Source: https://www.librechat.ai/docs/configuration/librechat_yaml/ai_endpoints/huggingface Set your Huggingface API token in the .env file for authentication. ```shell HUGGINGFACE_TOKEN=your-api-key ``` -------------------------------- ### Example ngrok URL for Auth0 Callback Source: https://www.librechat.ai/docs/configuration/authentication/OAuth2-OIDC/auth0 This is an example of an ngrok URL that can be used for local development and testing. Ensure this matches the 'Allowed Callback URLs' in your Auth0 application settings. ```bash ngrok http 3080 # This will give you a URL like: https://abc123.ngrok.io ``` -------------------------------- ### Start Backend and Frontend Development Servers Source: https://www.librechat.ai/docs/development/architecture Start the backend server for API requests and the frontend development server with Hot Module Replacement (HMR). The frontend dev server requires the backend to be running. ```bash npm run backend ``` ```bash npm run backend:dev ``` ```bash npm run frontend:dev ``` -------------------------------- ### Initialize Environment File Source: https://www.librechat.ai/docs/remote/docker_linux Copy the example environment file to `.env` and update sensitive values. This file holds application secrets and configurations. ```bash # Copies the example file as your global env file cp .env.example .env ``` -------------------------------- ### Azure OpenAI Group Configuration Example Source: https://www.librechat.ai/docs/configuration/azure Example of a group-level configuration for Azure OpenAI in the `librechat.yaml` file. This demonstrates setting up a group with API key, instance name, deployment details, custom headers, parameters, and model mappings. ```yaml endpoints: azureOpenAI: # ... (endpoint-level configurations) groups: - group: "my-resource-group" apiKey: "${AZURE_API_KEY}" instanceName: "my-instance" deploymentName: "gpt-35-turbo" version: "2023-03-15-preview" baseURL: "https://my-instance.openai.azure.com/" additionalHeaders: CustomHeader: "HeaderValue" addParams: max_tokens: 2048 temperature: 0.7 dropParams: - "frequency_penalty" - "presence_penalty" models: # ... (model-level configurations) ``` -------------------------------- ### Perplexity API Key Setup Source: https://www.librechat.ai/docs/configuration/librechat_yaml/ai_endpoints/perplexity Add your Perplexity API key to your `.env` file for authentication. ```dotenv PERPLEXITY_API_KEY=your-api-key ``` -------------------------------- ### Complete Balance Configuration Settings Source: https://www.librechat.ai/docs/configuration/token_usage Use this complete example to configure all aspects of the token credit balance system. Ensure your YAML file is correctly formatted. ```yaml version: 1.3.5 # Balance settings balance: enabled: true # Enable token credit balances for users startBalance: 20000 # Initial tokens credited upon registration autoRefillEnabled: false # Enable automatic token refills refillIntervalValue: 30 # Numerical value for refill interval refillIntervalUnit: 'days' # Time unit for refill interval (days, hours, etc.) refillAmount: 10000 # Tokens added during each refill ``` -------------------------------- ### Start Backend Development Server Source: https://www.librechat.ai/docs/development Launches the backend server with file watching enabled for rapid development cycles. ```bash npm run backend:dev ``` -------------------------------- ### Delete User Script (Deploy Compose) Source: https://www.librechat.ai/docs/configuration/authentication Use this command to delete a user by email when using the deploy-compose.yml setup, as per the Ubuntu Docker Guide. ```bash docker exec -it LibreChat-API /bin/sh -c "cd .. && npm run delete-user email@domain.com" ``` -------------------------------- ### Create User Script (Deploy Compose) Source: https://www.librechat.ai/docs/configuration/authentication Use this command to create a new user via the API when using the deploy-compose.yml setup, as per the Ubuntu Docker Guide. ```bash docker exec -it LibreChat-API /bin/sh -c "cd .. && npm run create-user" ``` -------------------------------- ### Switch to New User Source: https://www.librechat.ai/docs/remote/digitalocean Log out of the root user and log in as the newly created user to continue with the setup using their permissions. ```bash # example: su - danny su - ``` -------------------------------- ### Configure Anthropic Claude Compatible Custom Endpoint Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/custom_endpoint Example configuration for integrating an Anthropic Claude compatible model as a custom endpoint. This setup uses the native Messages API and specifies required headers. ```yaml # Example using the native Anthropic Messages API - name: 'Claude-Compatible' provider: 'anthropic' apiKey: '${ANTHROPIC_API_KEY}' baseURL: 'https://api.anthropic.com' headers: anthropic-version: '2023-06-01' models: default: ['claude-sonnet-4-5', 'claude-opus-4-5'] fetch: false titleConvo: true titleModel: 'claude-sonnet-4-5' modelDisplayLabel: 'Claude (Compatible)' ``` -------------------------------- ### Configure Spotify MCP Server with OAuth Client Discovery and Refresh Tokens Source: https://www.librechat.ai/docs/features/mcp Example configuration for a self-hosted Spotify MCP server using streamable-http transport and OAuth Client Discovery. This setup automatically refreshes authentication tokens, providing a more seamless user experience. ```yaml mcpServers: # Example self-hosted remote MCP server for Spotify, uses OAuth Client Discovery # βœ… Refresh Tokens: refreshes token for authentication automatically # Hosted on Cloudflare Workers, more info: https://github.com/LibreChat-AI/spotify-mcp spotify: type: 'streamable-http' initTimeout: 150000 url: 'https://mcp-spotify-oauth-example.account.workers.dev/mcp' ``` -------------------------------- ### Verify Docker Compose Installation Source: https://www.librechat.ai/docs/remote/docker_linux Checks the installed version of Docker Compose to confirm successful installation. ```bash docker compose version ``` -------------------------------- ### Start Meilisearch Process Source: https://www.librechat.ai/docs/configuration/meilisearch Run the Meilisearch binary with your generated master key. It will listen on port 7700 by default. ```bash ./meilisearch --master-key= ``` -------------------------------- ### Run Frontend in Development Mode Source: https://www.librechat.ai/docs/development/get_started Start the frontend development server to monitor changes. Ensure the backend is running first. The frontend is accessible at http://localhost:3090/. ```bash npm run frontend:dev ``` -------------------------------- ### Anyscale API Key Setup Source: https://www.librechat.ai/docs/configuration/librechat_yaml/ai_endpoints/anyscale Add your Anyscale API key to your `.env` file for authentication. ```shell ANYSCALE_API_KEY=your-api-key ``` -------------------------------- ### Install Node.js Dependencies Source: https://www.librechat.ai/docs/local Install all project dependencies for LibreChat using npm ci. ```bash $npm ci ``` -------------------------------- ### Example Shared Endpoint Configuration Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/shared_endpoint_settings Demonstrates how to configure shared settings for various endpoints like OpenAI, Azure OpenAI, Anthropic, Bedrock, and Google. Includes individual endpoint settings and a global 'all' configuration for overriding defaults. ```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} ``` -------------------------------- ### Start MongoDB Container Source: https://www.librechat.ai/docs/configuration/mongodb/mongodb_auth Stops all running containers and then starts only the MongoDB container in detached mode. ```bash docker compose down docker compose up -d mongodb ``` -------------------------------- ### Install Docker Dependencies Source: https://www.librechat.ai/docs/remote/docker_linux Installs necessary packages for Docker to function, including transport-https, curl, and software-properties-common. ```bash sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release ``` -------------------------------- ### Vertex AI Setup Source: https://www.librechat.ai/docs/features/image_gen Configure environment variables for Vertex AI, including the service account key file and optional cloud location. ```bash GOOGLE_SERVICE_KEY_FILE=/path/to/service-account.json GOOGLE_CLOUD_LOCATION=us-central1 # optional, default: global ``` -------------------------------- ### Install Certbot for CentOS Source: https://www.librechat.ai/docs/remote/nginx Installs Certbot and the Nginx plugin on CentOS systems for obtaining SSL/TLS certificates. ```bash sudo yum install certbot python2-certbot-nginx ``` -------------------------------- ### Install Certbot for Ubuntu Source: https://www.librechat.ai/docs/remote/nginx Installs Certbot and the Nginx plugin on Ubuntu systems for obtaining SSL/TLS certificates. ```bash sudo apt-get install certbot python3-certbot-nginx ``` -------------------------------- ### Example Actions Object Structure Source: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/actions Demonstrates the configuration of allowed domains and addresses for agent actions. Use 'allowedDomains' for a strict whitelist or rely on default SSRF protection with specific '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 LibreChat with Docker Compose Source: https://www.librechat.ai/docs/local Start all necessary services for LibreChat using Docker Compose in detached mode. ```bash $docker compose up -d ``` -------------------------------- ### Create a Dismissible Welcome Banner Source: https://www.librechat.ai/docs/configuration/banner Example of creating a simple welcome message banner that users can dismiss. Dates are left empty to use default 'now' and 'forever'. ```bash npm run update-banner "" "" "πŸ‘‹ Welcome to LibreChat!" "false" "false" ``` -------------------------------- ### Start LibreChat with Updated Images Source: https://www.librechat.ai/docs/local/docker Start LibreChat services using Docker Compose, applying any newly pulled images. ```bash docker compose up ``` -------------------------------- ### Start Backend Server Source: https://www.librechat.ai/docs/development/get_started Use `npm run backend` for normal operation or `npm run backend:dev` to enable watch mode for active development. The backend is accessible at http://localhost:3080/. ```bash npm run backend npm run backend:dev ``` -------------------------------- ### Enable Meilisearch in .env (Source Install) Source: https://www.librechat.ai/docs/configuration/meilisearch Configure LibreChat for a source installation by setting the Meilisearch host and master key in the .env file. ```env SEARCH=true MEILI_NO_ANALYTICS=true MEILI_HOST=http://localhost:7700 MEILI_MASTER_KEY= ``` -------------------------------- ### MongoDB Atlas Connection String Example Source: https://www.librechat.ai/docs/configuration/mongodb/mongodb_atlas This is an example of a MongoDB Atlas connection string. Replace placeholders with your actual credentials and cluster URL. ```text mongodb+srv://username:password@cluster-url.mongodb.net/LibreChat?retryWrites=true ``` -------------------------------- ### Start Docker Service Source: https://www.librechat.ai/docs/remote/docker_linux Ensure the Docker service is running on your Linux system. This command starts the Docker daemon if it's not already active. ```bash # should already be running, but just to be safe sudo systemctl start docker # confirm docker is running docker info ``` -------------------------------- ### Install Docker CE Source: https://www.librechat.ai/docs/remote/docker_linux Installs the Docker Community Edition (CE) package. This is the recommended version for most users, providing up-to-date features and security patches. ```bash sudo apt install docker-ce ``` -------------------------------- ### Docker Ngrok Installation Source: https://www.librechat.ai/docs/remote/ngrok Run ngrok as a Docker container to tunnel a local server. Ensure you replace '' with your actual ngrok auth token. ```bash docker run -d -it -e NGROK_AUTHTOKEN= ngrok/ngrok http 80 ``` -------------------------------- ### Production Redirect URI Example Source: https://www.librechat.ai/docs/mcp_servers/google_workspace Example of a production redirect URI for the OAuth 2.0 callback. Replace `https://chat.example.com` with your actual LibreChat domain. ```text https://chat.example.com/api/mcp/gmail/oauth/callback ``` -------------------------------- ### Calculate USD Spend Example Source: https://www.librechat.ai/docs/configuration/token_usage Example calculation showing the conversion of token value to USD. This illustrates the actual monetary cost of token usage. ```plaintext \frac{205.5}{1,000,000} = \$0.0002055 \text{ USD} ``` -------------------------------- ### Development Redis Setup Source: https://www.librechat.ai/docs/configuration/redis Configure Redis for local development using a simple URI and a development-specific key prefix. ```env USE_REDIS=true REDIS_URI=redis://127.0.0.1:6379 REDIS_KEY_PREFIX=librechat-dev ``` -------------------------------- ### Azure OpenAI Endpoint Configuration Example Source: https://www.librechat.ai/docs/configuration/azure Example configuration for Azure OpenAI endpoints in `librechat.yaml`. This includes settings for title generation, plugins, and assistants. ```yaml endpoints: azureOpenAI: titleModel: "gpt-3.5-turbo-1106" plugins: true assistants: true summarize: true summaryModel: "gpt-3.5-turbo-1106" titleConvo: true titleMethod: "functions" groups: # ... (group-level and model-level configurations) ```