| ########################## | |
| # Server configuration: | |
| ########################## | |
| APP_TITLE=LibreChat | |
| # The server will listen to localhost:3080 by default. You can change the target IP as you want. | |
| # If you want to make this server available externally, for example to share the server with others | |
| # or expose this from a Docker container, set host to 0.0.0.0 or your external IP interface. | |
| # Tips: Setting host to 0.0.0.0 means listening on all interfaces. It's not a real IP. | |
| # Use localhost:port rather than 0.0.0.0:port to access the server. | |
| # Set Node env to development if running in dev mode. | |
| HOST=localhost | |
| PORT=3080 | |
| # Change this to proxy any API request. | |
| # It's useful if your machine has difficulty calling the original API server. | |
| # PROXY= | |
| # Change this to your MongoDB URI if different. I recommend appending LibreChat. | |
| MONGO_URI=mongodb://127.0.0.1:27018/LibreChat | |
| ########################## | |
| # OpenAI Endpoint: | |
| ########################## | |
| # Access key from OpenAI platform. | |
| # Leave it blank to disable this feature. | |
| # Set to "user_provided" to allow the user to provide their API key from the UI. | |
| OPENAI_API_KEY="user_provided" | |
| # Identify the available models, separated by commas *without spaces*. | |
| # The first will be default. | |
| # Leave it blank to use internal settings. | |
| # OPENAI_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-3.5-turbo-0301,text-davinci-003,gpt-4,gpt-4-0314,gpt-4-0613 | |
| # Reverse proxy settings for OpenAI: | |
| # https://github.com/waylaidwanderer/node-chatgpt-api#using-a-reverse-proxy | |
| # OPENAI_REVERSE_PROXY= | |
| ########################## | |
| # AZURE Endpoint: | |
| ########################## | |
| # To use Azure with this project, set the following variables. These will be used to build the API URL. | |
| # Chat completion: | |
| # `https://{AZURE_OPENAI_API_INSTANCE_NAME}.openai.azure.com/openai/deployments/{AZURE_OPENAI_API_DEPLOYMENT_NAME}/chat/completions?api-version={AZURE_OPENAI_API_VERSION}`; | |
| # You should also consider changing the `OPENAI_MODELS` variable above to the models available in your instance/deployment. | |
| # Note: I've noticed that the Azure API is much faster than the OpenAI API, so the streaming looks almost instantaneous. | |
| # Note "AZURE_OPENAI_API_COMPLETIONS_DEPLOYMENT_NAME" and "AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME" are optional but might be used in the future | |
| # AZURE_API_KEY= | |
| # AZURE_OPENAI_API_INSTANCE_NAME= | |
| # AZURE_OPENAI_API_DEPLOYMENT_NAME= | |
| # AZURE_OPENAI_API_VERSION= | |
| # AZURE_OPENAI_API_COMPLETIONS_DEPLOYMENT_NAME= | |
| # AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME= | |
| # Identify the available models, separated by commas *without spaces*. | |
| # The first will be default. | |
| # Leave it blank to use internal settings. | |
| AZURE_OPENAI_MODELS=gpt-3.5-turbo,gpt-4 | |
| # To use Azure with the Plugins endpoint, you need the variables above, and uncomment the following variable: | |
| # NOTE: This may not work as expected and Azure OpenAI may not support OpenAI Functions yet | |
| # Omit/leave it commented to use the default OpenAI API | |
| # PLUGINS_USE_AZURE="true" | |
| ########################## | |
| # BingAI Endpoint: | |
| ########################## | |
| # Also used for Sydney and jailbreak | |
| # To get your Access token for Bing, login to https://www.bing.com | |
| # Use dev tools or an extension while logged into the site to copy the content of the _U cookie. | |
| #If this fails, follow these instructions https://github.com/danny-avila/LibreChat/issues/370#issuecomment-1560382302 to provide the full cookie strings. | |
| # Set to "user_provided" to allow the user to provide its token from the UI. | |
| # Leave it blank to disable this endpoint. | |
| BINGAI_TOKEN="user_provided" | |
| # BingAI Host: | |
| # Necessary for some people in different countries, e.g. China (https://cn.bing.com) | |
| # Leave it blank to use default server. | |
| # BINGAI_HOST=https://cn.bing.com | |
| ########################## | |
| # ChatGPT Endpoint: | |
| ########################## | |
| # ChatGPT Browser Client (free but use at your own risk) | |
| # Access token from https://chat.openai.com/api/auth/session | |
| # Exposes your access token to `CHATGPT_REVERSE_PROXY` | |
| # Set to "user_provided" to allow the user to provide its token from the UI. | |
| # Leave it blank to disable this endpoint | |
| CHATGPT_TOKEN="user_provided" | |
| # Identify the available models, separated by commas. The first will be default. | |
| # Leave it blank to use internal settings. | |
| CHATGPT_MODELS=text-davinci-002-render-sha,gpt-4 | |
| # NOTE: you can add gpt-4-plugins, gpt-4-code-interpreter, and gpt-4-browsing to the list above and use the models for these features; | |
| # however, the view/display portion of these features are not supported, but you can use the underlying models, which have higher token context | |
| # Also: text-davinci-002-render-paid is deprecated as of May 2023 | |
| # Reverse proxy setting for OpenAI | |
| # https://github.com/waylaidwanderer/node-chatgpt-api#using-a-reverse-proxy | |
| # By default it will use the node-chatgpt-api recommended proxy, (it's a third party server) | |
| # CHATGPT_REVERSE_PROXY=<YOUR REVERSE PROXY> | |
| ########################## | |
| # Anthropic Endpoint: | |
| ########################## | |
| # Access key from https://console.anthropic.com/ | |
| # Leave it blank to disable this feature. | |
| # Set to "user_provided" to allow the user to provide their API key from the UI. | |
| # Note that access to claude-1 may potentially become unavailable with the release of claude-2. | |
| ANTHROPIC_API_KEY="user_provided" | |
| ANTHROPIC_MODELS=claude-1,claude-instant-1,claude-2 | |
| ############################# | |
| # Plugins: | |
| ############################# | |
| # Identify the available models, separated by commas *without spaces*. | |
| # The first will be default. | |
| # Leave it blank to use internal settings. | |
| # PLUGIN_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-3.5-turbo-0301,gpt-4,gpt-4-0314,gpt-4-0613 | |
| # For securely storing credentials, you need a fixed key and IV. You can set them here for prod and dev environments | |
| # If you don't set them, the app will crash on startup. | |
| # You need a 32-byte key (64 characters in hex) and 16-byte IV (32 characters in hex) | |
| # Use this replit to generate some quickly: https://replit.com/@daavila/crypto#index.js | |
| # Here are some examples (THESE ARE NOT SECURE!) | |
| CREDS_KEY=f34be427ebb29de8d88c107a71546019685ed8b241d8f2ed00c3df97ad2566f0 | |
| CREDS_IV=e2341419ec3dd3d19b13a1a87fafcbfb | |
| # AI-Assisted Google Search | |
| # This bot supports searching google for answers to your questions with assistance from GPT! | |
| # See detailed instructions here: https://github.com/danny-avila/LibreChat/blob/main/docs/features/plugins/google_search.md | |
| GOOGLE_API_KEY= | |
| GOOGLE_CSE_ID= | |
| # StableDiffusion WebUI | |
| # This bot supports StableDiffusion WebUI, using it's API to generated requested images. | |
| # See detailed instructions here: https://github.com/danny-avila/LibreChat/blob/main/docs/features/plugins/stable_diffusion.md | |
| # Use "http://127.0.0.1:7860" with local install and "http://host.docker.internal:7860" for docker | |
| SD_WEBUI_URL=http://host.docker.internal:7860 | |
| ########################## | |
| # PaLM (Google) Endpoint: | |
| ########################## | |
| # Follow the instruction here to setup: | |
| # https://github.com/danny-avila/LibreChat/blob/main/docs/install/apis_and_tokens.md | |
| PALM_KEY="user_provided" | |
| # In case you need a reverse proxy for this endpoint: | |
| # GOOGLE_REVERSE_PROXY= | |
| ########################## | |
| # Proxy: To be Used by all endpoints | |
| ########################## | |
| PROXY= | |
| ########################## | |
| # Search: | |
| ########################## | |
| # ENABLING SEARCH MESSAGES/CONVOS | |
| # Requires the installation of the free self-hosted Meilisearch or a paid Remote Plan (Remote not tested) | |
| # The easiest setup for this is through docker-compose, which takes care of it for you. | |
| SEARCH=true | |
| # HIGHLY RECOMMENDED: Disable anonymized telemetry analytics for MeiliSearch for absolute privacy. | |
| MEILI_NO_ANALYTICS=true | |
| # REQUIRED FOR SEARCH: MeiliSearch Host, mainly for the API server to connect to the search server. | |
| # Replace '0.0.0.0' with 'meilisearch' if serving MeiliSearch with docker-compose. | |
| MEILI_HOST=http://0.0.0.0:7700 | |
| # REQUIRED FOR SEARCH: MeiliSearch HTTP Address, mainly for docker-compose to expose the search server. | |
| # Replace '0.0.0.0' with 'meilisearch' if serving MeiliSearch with docker-compose. | |
| MEILI_HTTP_ADDR=0.0.0.0:7700 | |
| # REQUIRED FOR SEARCH: In production env., a secure key is needed. You can generate your own. | |
| # This master key must be at least 16 bytes, composed of valid UTF-8 characters. | |
| # MeiliSearch will throw an error and refuse to launch if no master key is provided, | |
| # or if it is under 16 bytes. MeiliSearch will suggest a secure autogenerated master key. | |
| # Using docker, it seems recognized as production so use a secure key. | |
| # This is a ready made secure key for docker-compose, you can replace it with your own. | |
| MEILI_MASTER_KEY=DrhYf7zENyR6AlUCKmnz0eYASOQdl6zxH7s7MKFSfFCt | |
| ########################## | |
| # User System: | |
| ########################## | |
| # Allow Public Registration | |
| ALLOW_REGISTRATION=true | |
| # Allow Social Registration | |
| ALLOW_SOCIAL_LOGIN=false | |
| # JWT Secrets | |
| JWT_SECRET=secret | |
| JWT_REFRESH_SECRET=secret | |
| # Google: | |
| # Add your Google Client ID and Secret here, you must register an app with Google Cloud to get these values | |
| # https://cloud.google.com/ | |
| GOOGLE_CLIENT_ID= | |
| GOOGLE_CLIENT_SECRET= | |
| GOOGLE_CALLBACK_URL=/oauth/google/callback | |
| # OpenID: | |
| # See OpenID provider to get the below values | |
| # Create random string for OPENID_SESSION_SECRET | |
| # For Azure AD | |
| # ISSUER: https://login.microsoftonline.com/(tenant id)/v2.0/ | |
| # SCOPE: openid profile email | |
| OPENID_CLIENT_ID= | |
| OPENID_CLIENT_SECRET= | |
| OPENID_ISSUER= | |
| OPENID_SESSION_SECRET= | |
| OPENID_SCOPE="openid profile email" | |
| OPENID_CALLBACK_URL=/oauth/openid/callback | |
| # If LABEL and URL are left empty, then the default OpenID label and logo are used. | |
| OPENID_BUTTON_LABEL= | |
| OPENID_IMAGE_URL= | |
| # Set the expiration delay for the secure cookie with the JWT token | |
| # Delay is in millisecond e.g. 7 days is 1000*60*60*24*7 | |
| SESSION_EXPIRY=(1000 * 60 * 60 * 24) * 7 | |
| # Github: | |
| # Get the Client ID and Secret from your Discord Application | |
| # Add your Discord Client ID and Client Secret here: | |
| GITHUB_CLIENT_ID=your_client_id | |
| GITHUB_CLIENT_SECRET=your_client_secret | |
| GITHUB_CALLBACK_URL=/oauth/github/callback # this should be the same for everyone | |
| # Discord: | |
| # Get the Client ID and Secret from your Discord Application | |
| # Add your Github Client ID and Client Secret here: | |
| DISCORD_CLIENT_ID=your_client_id | |
| DISCORD_CLIENT_SECRET=your_client_secret | |
| DISCORD_CALLBACK_URL=/oauth/discord/callback # this should be the same for everyone | |
| ########################### | |
| # Application Domains | |
| ########################### | |
| # Note: | |
| # Server = Backend | |
| # Client = Public (the client is the url you visit) | |
| # For the Google login to work in dev mode, you will need to change DOMAIN_SERVER to localhost:3090 or place it in .env.development | |
| DOMAIN_CLIENT=http://localhost:3080 | |
| DOMAIN_SERVER=http://localhost:3080 | |