diff --git a/SECURITY.md b/SECURITY.md
index d4f3cb15d384..275df1f23c85 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -59,4 +59,4 @@ Setting `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=true` and `LANGFLOW_AUTO_LOGIN=true` skip
`LANGFLOW_SKIP_AUTH_AUTO_LOGIN=true` is the default behavior, so users do not need to change existing workflows in 1.5. To update your workflows to require authentication, set `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=false`.
-For more information, see [Authentication](https://docs.langflow.org/configuration-authentication).
\ No newline at end of file
+For more information, see [API keys and authentication](https://docs.langflow.org/api-keys-and-authentication).
\ No newline at end of file
diff --git a/docs/docs/API-Reference/api-reference-api-examples.mdx b/docs/docs/API-Reference/api-reference-api-examples.mdx
index 29f30b14077e..0f64dfa83699 100644
--- a/docs/docs/API-Reference/api-reference-api-examples.mdx
+++ b/docs/docs/API-Reference/api-reference-api-examples.mdx
@@ -59,11 +59,8 @@ You can configure the Langflow port number in the `LANGFLOW_PORT` [environment v
### Authentication
-In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is set to `True`.
-The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.
-
-To authenticate a Langflow API request, provide a Langflow API key in either an `x-api-key` header or query parameter.
-For more information, see [API keys](/configuration-api-keys).
+In Langflow versions 1.5 and later, most API endpoints require authentication with a Langflow API key in either an `x-api-key` header or query parameter.
+For more information, see [API keys and authentication](/api-keys-and-authentication).
As with any API, follow industry best practices for storing and referencing sensitive credentials.
For example, you can [set environment variables](#set-environment-variables) for your API keys, and then reference those environment variables in your API requests.
@@ -117,7 +114,7 @@ curl --request POST \
}'
```
-Commonly used values in Langflow API requests include your [Langflow server URL](#base-url), [Langflow API keys](/configuration-api-keys), flow IDs, and [project IDs](/api-projects#read-projects).
+Commonly used values in Langflow API requests include your [Langflow server URL](#base-url), [Langflow API keys](#authentication), flow IDs, and [project IDs](/api-projects#read-projects).
You can retrieve flow IDs from the [**API access** pane](/concepts-publish#api-access), in a flow's URL, and with [`GET /flows`](/api-flows#read-flows).
diff --git a/docs/docs/Agents/agents.mdx b/docs/docs/Agents/agents.mdx
index 5ab6e88a2a19..ed6aecbfabd9 100644
--- a/docs/docs/Agents/agents.mdx
+++ b/docs/docs/Agents/agents.mdx
@@ -115,7 +115,7 @@ For example, to use the default OpenAI model, you must provide a valid OpenAI AP
You can enter the key directly, but it is recommended that you follow industry best practices for storing and referencing API keys.
For example, you can use a [global variable](/configuration-global-variables) or [environment variables](/environment-variables).
-For more information, see [Add component API keys to Langflow](/configuration-api-keys#add-component-api-keys-to-langflow).
+For more information, see [Add component API keys to Langflow](/api-keys-and-authentication#component-api-keys).
If you select **Custom** as the model provider, authentication is handled in the incoming **Language Model** component.
diff --git a/docs/docs/Components/bundles-lmstudio.mdx b/docs/docs/Components/bundles-lmstudio.mdx
index 0ab60f9d6a14..6b2baac2ccad 100644
--- a/docs/docs/Components/bundles-lmstudio.mdx
+++ b/docs/docs/Components/bundles-lmstudio.mdx
@@ -31,7 +31,7 @@ You can toggle parameters through the `.
+* **`name`**: The internal variable name, accessed with `self.`.
* **`display_name`**: The label shown to users in the UI.
* **`info`** *(optional)*: A tooltip or short description.
* **`value`** *(optional)*: The default value.
@@ -489,8 +489,8 @@ When using typed annotations, consider the following best practices:
In **Langflow**, dynamic fields allow inputs to change or appear based on user interactions. You can make an input dynamic by setting `dynamic=True`.
Optionally, setting `real_time_refresh=True` triggers the `update_build_config` method to adjust the input's visibility or properties in real time, creating a contextual UI that only displays relevant fields based on the user's choices.
-In this example, the operator field triggers updates via `real_time_refresh=True`.
-The `regex_pattern` field is initially hidden and controlled via `dynamic=True`.
+In this example, the operator field triggers updates with `real_time_refresh=True`.
+The `regex_pattern` field is initially hidden and controlled with `dynamic=True`.
```python
from langflow.io import DropdownInput, StrInput
diff --git a/docs/docs/Concepts/concepts-flows.mdx b/docs/docs/Concepts/concepts-flows.mdx
index 4193d36660cc..5153207b349c 100644
--- a/docs/docs/Concepts/concepts-flows.mdx
+++ b/docs/docs/Concepts/concepts-flows.mdx
@@ -88,7 +88,7 @@ By default, flows and [flow logs](/logging) are stored on local disk at the foll
- **OSS macOS/Windows/Linux/WSL (uv pip install)**: `/lib/python3.12/site-packages/langflow/cache`
- **OSS macOS/Windows/Linux/WSL (git clone)**: `/src/backend/base/langflow/cache`
-The flow storage location can be customized with the [`LANGFLOW_CONFIG_DIR`](/environment-variables#LANGFLOW_CONFIG_DIR) environment variable, and the flow log storage location can be customized with the [`LANGFLOW_LOG_FILE`](/environment-variables#LANGFLOW_LOG_FILE) environment variable.
+The overall storage location can be customized with the `LANGFLOW_CONFIG_DIR` environment variable, and the flow log storage location can be customized separately with the `LANGFLOW_LOG_FILE` environment variable.
## See also
diff --git a/docs/docs/Concepts/concepts-overview.mdx b/docs/docs/Concepts/concepts-overview.mdx
index bce9cd7b75d8..d80a49db2eff 100644
--- a/docs/docs/Concepts/concepts-overview.mdx
+++ b/docs/docs/Concepts/concepts-overview.mdx
@@ -74,4 +74,4 @@ The **Share** menu provides the following options for integrating your flow into
* [Manage files in Langflow](/concepts-file-management)
* [Global variables](/configuration-global-variables)
-* [Langflow API keys](configuration-api-keys)
\ No newline at end of file
+* [API keys and authentication](/api-keys-and-authentication)
\ No newline at end of file
diff --git a/docs/docs/Concepts/concepts-publish.mdx b/docs/docs/Concepts/concepts-publish.mdx
index 2570e5c6b953..fdb5e5166ed1 100644
--- a/docs/docs/Concepts/concepts-publish.mdx
+++ b/docs/docs/Concepts/concepts-publish.mdx
@@ -51,8 +51,7 @@ For more information and examples of other Langflow API endpoints, see [Get star
### Langflow API authentication
-In Langflow versions 1.5 and later, most API endpoints require authentication with a Langflow API key, even if `AUTO_LOGIN` is set to `True`.
-The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.
+In Langflow versions 1.5 and later, most API endpoints require authentication with a Langflow API key.
Code snippets generated in the **API access** pane include a script that checks for a `LANGFLOW_API_KEY` environment variable set in the local terminal session.
This script doesn't check for Langflow API keys set anywhere besides the local terminal session.
@@ -61,7 +60,7 @@ For this script to work, you must set a `LANGFLOW_API_KEY` variable in the termi
Alternatively, you can edit the code snippet to include an `x-api-key` header and ensure that the request can authenticate to the Langflow API.
-For more information, see [API keys](/configuration-api-keys) and [Get started with the Langflow API](/api-reference-api-examples)
+For more information, see [API keys and authentication](/api-keys-and-authentication) and [Get started with the Langflow API](/api-reference-api-examples).
### Input Schema (tweaks) {#input-schema}
@@ -357,7 +356,7 @@ To use the embedded chat widget in your HTML, the `langflow-chat` web component
* `host_url`: Your Langflow server URL. Must be `HTTPS`. Don't include a trailing slash (`/`).
* `flow_id`: The ID of the flow you want to embed.
-* `api_key`: A [Langflow API key](/configuration-api-keys).
+* `api_key`: A [Langflow API key](/api-keys-and-authentication).
This prop is recommended to ensure the widget has permission to run the flow.
The minimum inputs are automatically populated in the [**Embed into site** code snippet](#get-a-langflow-chat-snippet) that is generated by Langflow.
diff --git a/docs/docs/Concepts/mcp-server.mdx b/docs/docs/Concepts/mcp-server.mdx
index e398b69c935f..fde1c0036f5b 100644
--- a/docs/docs/Concepts/mcp-server.mdx
+++ b/docs/docs/Concepts/mcp-server.mdx
@@ -143,10 +143,8 @@ For example:
If you have [deployed a public Langflow server](/deployment-public-server), the address is automatically included.
- :::important
- If your Langflow server [requires authentication](/configuration-authentication) ([`LANGFLOW_AUTO_LOGIN=false`](/environment-variables#LANGFLOW_AUTO_LOGIN)), you must include your Langflow API key in the configuration.
+ If your Langflow server requires authentication, you must include your Langflow API key in the configuration.
For more information, see [MCP server authentication and environment variables](#authentication).
- :::
5. Save and close the `mcp.json` file in Cursor.
The newly added MCP server will appear in the **MCP Servers** section.
@@ -160,7 +158,8 @@ For more information, see the [Cursor's MCP documentation](https://docs.cursor.c
### MCP server authentication and environment variables {#authentication}
-If your Langflow server [requires authentication](/configuration-authentication) ([`LANGFLOW_AUTO_LOGIN`](/environment-variables#LANGFLOW_AUTO_LOGIN) is set to `false`), then you must supply a [Langflow API key](/configuration-api-keys) in your MCP client configuration.
+You must provide a Langflow API key in your MCP client configuration if your [Langflow server has authentication enabled](/api-keys-and-authentication#start-a-langflow-server-with-authentication-enabled).
+
When this is the case, the code template in your project's **MCP Server** tab automatically includes the `--header` and `x-api-key` arguments:
```json
@@ -185,7 +184,7 @@ Alternatively, you can replace `YOUR_API_KEY` with an existing Langflow API key.

-To include environment variables with your MCP server command, include them like this:
+To include other environment variables with your MCP server command, use the `env` object with key-value pairs of environment variables:
```json
{
@@ -204,8 +203,6 @@ To include environment variables with your MCP server command, include them like
}
```
-Replace `KEY` and `VALUE` with the environment variable name and value you want to include.
-
{/* The anchor on this section (deploy-your-server-externally) is currently a link target in the Langflow UI. Do not change. */}
### Deploy your MCP server externally {#deploy-your-server-externally}
diff --git a/docs/docs/Configuration/api-keys-and-authentication.mdx b/docs/docs/Configuration/api-keys-and-authentication.mdx
new file mode 100644
index 000000000000..0cf2c4f7ef07
--- /dev/null
+++ b/docs/docs/Configuration/api-keys-and-authentication.mdx
@@ -0,0 +1,359 @@
+---
+title: API keys and authentication
+slug: /api-keys-and-authentication
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import Icon from "@site/src/components/icon";
+
+:::warning
+Never expose Langflow ports directly to the internet without proper security measures.
+Set `LANGFLOW_AUTO_LOGIN=False`, use a non-default `LANGFLOW_SECRET_KEY`, and deploy your Langflow server behind a reverse proxy with authentication enabled.
+For more information, see [Start a Langflow server with authentication enabled](#start-a-langflow-server-with-authentication-enabled).
+:::
+
+Authentication credentials help prevent unauthorized access to your Langflow server, flows, and services connected through components.
+
+There are three types of credentials that you use in Langflow:
+
+* [Langflow API keys](#langflow-api-keys): For authentication with the Langflow API and authorizing server-side Langflow actions like running flows and uploading files.
+* [Component API keys](#component-api-keys): For authentication between Langflow and a service connected through a component, such as a model provider or third-party API.
+* [Authentication environment variables](#authentication-environment-variables): These environment variables configure how Langflow handles user authentication and authorization.
+
+## Langflow API keys {#langflow-api-keys}
+
+You can use Langflow API keys to interact with Langflow programmatically.
+
+A Langflow API key has the same permissions and access as the user who created it.
+This means your API key can only access your own flows, components, and database.
+You cannot access other users' resources with your own Langflow API keys.
+
+If you create a key as a superuser, then that key has superuser privileges within your Langflow server.
+
+In Langflow version 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is `True`.
+For more information, see [`LANGFLOW_AUTO_LOGIN`](#langflow-auto-login).
+
+### Create a Langflow API key
+
+You can generate a Langflow API key with the UI or the CLI.
+
+The UI-generated key is appropriate for most cases. The CLI-generated key is needed when your Langflow server is running in `--backend-only` mode.
+
+
+
+
+1. In the Langflow UI header, click your profile icon, and then select **Settings**.
+2. Click **Langflow API Keys**, and then click **Add New**.
+3. Name your key, and then click **Create API Key**.
+4. Copy the API key and store it securely.
+
+
+
+
+If you're serving your flow with `--backend-only=true`, you can't create API keys in the UI, because the frontend is not running.
+
+Depending on your authentication settings, note the following requirements for creating API keys with the Langflow CLI:
+
+* If `AUTO_LOGIN` is `FALSE`, you must be logged in as a superuser.
+* If `AUTO LOGIN` is `TRUE`, you're already logged in as superuser.
+
+To create an API key for a user from the CLI, do the following:
+
+1. In your `.env` file, set `AUTO_LOGIN=FALSE`, and set superuser credentials for your server.
+
+ ```text
+ LANGFLOW_AUTO_LOGIN=False
+ LANGFLOW_SUPERUSER=administrator
+ LANGFLOW_SUPERUSER_PASSWORD=securepassword
+ ```
+
+2. To confirm your superuser status, call [`GET /users/whoami`](/api-users#get-current-user), and then check that the response contains `"is_superuser": true`:
+
+ ```bash
+ curl -X GET \
+ "$LANGFLOW_URL/api/v1/users/whoami" \
+ -H "accept: application/json" \
+ -H "x-api-key: $LANGFLOW_API_KEY"
+ ```
+
+
+ Result
+
+ ```json
+ {
+ "id": "07e5b864-e367-4f52-b647-a48035ae7e5e",
+ "username": "langflow",
+ "profile_image": null,
+ "store_api_key": null,
+ "is_active": true,
+ "is_superuser": true,
+ "create_at": "2025-05-08T17:59:07.855965",
+ "updated_at": "2025-05-29T15:06:56.157860",
+ "last_login_at": "2025-05-29T15:06:56.157016",
+ }
+ ```
+
+
+
+3. Create an API key:
+
+ ```shell
+ uv run langflow api-key
+ ```
+
+
+
+
+### Use a Langflow API key
+
+To authenticate Langflow API requests, pass your Langflow API key an `x-api-key` header or query parameter.
+
+
+
+
+```shell
+curl -X POST \
+ "http://$LANGFLOW_SERVER_ADDRESS/api/v1/run/$FLOW_ID?stream=false" \
+ -H "Content-Type: application/json" \
+ -H "x-api-key: $LANGFLOW_API_KEY" \
+ -d '{"inputs": {"text":""}, "tweaks": {}}'
+```
+
+
+
+
+```shell
+curl -X POST \
+ "http://$LANGFLOW_SERVER_ADDRESS/api/v1/run/$FLOW_ID?x-api-key=$LANGFLOW_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{"inputs": {"text":""}, "tweaks": {}}'
+```
+
+
+
+
+For more information about forming Langflow API requests, see [Get started with the Langflow API](/api-reference-api-examples) and [Trigger flows with the Langflow API](/concepts-publish).
+
+### Revoke an API key
+
+To revoke and delete an API key, do the following:
+
+1. In the Langflow UI header, click your profile icon, and then select **Settings**.
+2. Click **Langflow API Keys**.
+3. Select the keys you want to delete, and then click **Delete**.
+
+This action immediately invalidates the key and prevents it from being used again.
+
+## Component API keys
+
+Component API keys authorize access to external services that are called by components in your flows. These are not general application credentials, but specifically the API keys required by individual components to connect to services like model providers, databases, or third-party APIs.
+
+Component API keys are added as global variables with the Langflow UI, or sourced from the `.env` file. When stored as global variables, use the **Credential** type for secure handling of sensitive information.
+
+Component API keys are created and managed within the service provider's platform. Deleting a global variable from Langflow does not delete or invalidate the actual API key in the service provider's system. You must delete or rotate component API keys directly within the service provider's interface or API. Langflow only stores the encrypted value of your keys; it does not have control over the actual credentials.
+
+For more information, see [Global variables](/configuration-global-variables).
+
+## Authentication environment variables
+
+This section describes the available authentication configuration variables.
+
+You can use the [`.env.example`](https://github.com/langflow-ai/langflow/blob/main/.env.example) file in the Langflow repository as a template for your own `.env` file.
+
+### LANGFLOW_AUTO_LOGIN {#langflow-auto-login}
+
+Langflow doesn't allow users to have simultaneous or shared access to flows in the Langflow UI.
+
+If `LANGFLOW_AUTO_LOGIN=False`, automatic login is disabled. The login form is required to access the Langflow UI, and Langflow API requests require a Langflow API key.
+If `false`, you must also set [`LANGFLOW_SUPERUSER` and `LANGFLOW__SUPERUSER_PASSWORD`](#langflow-superuser).
+
+If `LANGFLOW_AUTO_LOGIN=True`, Langflow bypasses UI authentication.
+If you also disable user management (`LANGFLOW_NEW_USER_IS_ACTIVE=true`), users can access the same environment without password protection. If two users access the same flow, Langflow saves only the work of the most recent user.
+
+#### AUTO_LOGIN and API authentication in version 1.5 and later
+
+In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is `True`.
+The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.
+
+
+LANGFLOW_AUTO_LOGIN and LANGFLOW_SKIP_AUTH_AUTO_LOGIN options
+
+In Langflow versions earlier than 1.5, if `LANGFLOW_AUTO_LOGIN=true`, then Langflow automatically logs users in as a superuser without requiring authentication.
+In this case, API requests don't require a Langflow API key.
+
+In Langflow version 1.5, you can set `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=true` _and_ `LANGFLOW_AUTO_LOGIN=true` to skip authentication for API requests _and_ allow automatic login as a superuser for all users.
+This is a temporary bypass for backwards compatibility, and the `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` option will be removed in a future release.
+
+If either `LANGFLOW_AUTO_LOGIN` or `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` are set to `false`, then authentication is required.
+
+
+### LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD {#langflow-superuser}
+
+These variables specify the username and password for the Langflow server's superuser.
+
+```text
+LANGFLOW_SUPERUSER=administrator
+LANGFLOW_SUPERUSER_PASSWORD=securepassword
+```
+
+They are required if `LANGFLOW_AUTO_LOGIN=false`.
+Otherwise, they aren't relevant.
+
+If required and not set, the default values are `langflow` and `langflow`.
+
+For more information, see [Start a Langflow server with authentication enabled](#start-a-langflow-server-with-authentication-enabled) and the CLI command [`langflow superuser`](/configuration-cli#langflow-superuser).
+
+### LANGFLOW_SECRET_KEY {#langflow-secret-key}
+
+This environment variable stores a secret key used for encrypting sensitive data like API keys.
+Langflow uses the [Fernet](https://pypi.org/project/cryptography/) library for secret key encryption.
+
+If no secret key is provided, Langflow automatically generates one.
+
+However, you should generate and explicitly set your own key in production environments.
+This is particularly important for multi-instance deployments like Kubernetes to ensure consistent encryption across instances.
+
+To generate a secret encryption key for `LANGFLOW_SECRET_KEY`, do the following:
+
+1. Run the command to generate and copy a secret to the clipboard.
+
+
+
+
+ * **macOS**: Generate a secret key and copy it to the clipboard:
+
+ ```bash
+ python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | pbcopy
+ ```
+
+ * **Linux**: Generate a secret key and copy it to the clipboard:
+
+ ```bash
+ python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | xclip -selection clipboard
+ ```
+
+ * **Unix**: Generate a secret key and print it to the terminal to manually copy it:
+
+ ```bash
+ python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')"
+ ```
+
+
+
+
+ * Generate a secret key and copy it to the clipboard:
+
+ ```bash
+ python -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')"
+ ```
+
+ * Generate a secret key and print it to the terminal to manually copy it:
+
+ ```bash
+
+ # Or just print
+ python -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')"
+ ```
+
+
+
+
+2. Paste the value into your `.env` file:
+
+ ```text
+ LANGFLOW_SECRET_KEY=dBuu...2kM2_fb
+ ```
+
+### LANGFLOW_NEW_USER_IS_ACTIVE {#langflow-new-user-is-active}
+
+When `LANGFLOW_NEW_USER_IS_ACTIVE=False` (default), a superuser must explicitly activate a new user's account before they can sign in to the Langflow UI.
+The superuser can also deactivate a user's account as needed.
+
+When `LANGFLOW_NEW_USER_IS_ACTIVE=True`, new user accounts are automatically activated.
+
+```text
+LANGFLOW_NEW_USER_IS_ACTIVE=False
+```
+
+For more information, see [Start a Langflow server with authentication enabled](#start-a-langflow-server-with-authentication-enabled).
+
+## Start a Langflow server with authentication enabled
+
+This section shows you how to use the [authentication environment variables](/api-keys-and-authentication#authentication-environment-variables) to deploy a Langflow server with authentication enabled.
+This involves disabling automatic login, setting superuser credentials, generating a secret encryption key, and enabling user management.
+
+This configuration is recommended for any deployment where Langflow is exposed to a shared or public network, or where multiple users access the same Langflow server.
+
+With authentication enabled, all users must sign in to the Langflow UI with valid credentials, and API requests require authentication with a Langflow API key.
+Additionally, you must sign in as a superuser to manage users and [create a Langflow API key](#create-a-langflow-api-key) with superuser privileges.
+
+### Start the Langflow server
+
+1. Create a `.env` file with the following variables:
+
+ ```text
+ LANGFLOW_AUTO_LOGIN=False
+ LANGFLOW_SUPERUSER=
+ LANGFLOW_SUPERUSER_PASSWORD=
+ LANGFLOW_SECRET_KEY=
+ LANGFLOW_NEW_USER_IS_ACTIVE=False
+ ```
+
+ Your `.env` file can have other environment variables.
+ This example focuses on authentication variables.
+
+2. Set `LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD` to your desired superuser credentials.
+
+ For a one-time test, you can use basic credentials like `administrator` and `password`.
+ Strong, securely-stored credentials are recommended for true development and production environments.
+
+3. Recommended: Generate and set a `LANGFLOW_SECRET_KEY` for encrypting sensitive data.
+
+ If you don't set a secret key, Langflow generates one automatically, but this isn't recommended for production environments.
+
+ For instructions on generating at setting a secret key, see [`LANGFLOW_SECRET_KEY`](#langflow-secret-key).
+
+4. Save your `.env` file with the populated variables. For example:
+
+ ```text
+ LANGFLOW_AUTO_LOGIN=False
+ LANGFLOW_SUPERUSER=administrator
+ LANGFLOW_SUPERUSER_PASSWORD=securepassword
+ LANGFLOW_SECRET_KEY=dBuu...2kM2_fb
+ LANGFLOW_NEW_USER_IS_ACTIVE=False
+ ```
+
+5. Start Langflow with the configuration from your `.env` file:
+
+ ```text
+ uv run langflow run --env-file .env
+ ```
+
+6. Verify the server is running. The default location is `http://localhost:7860`.
+
+Next, you can add users to your Langflow server to collaborate with others on flows.
+
+### Manage users as an administrator
+
+1. To complete your first-time login as a superuser, go to `http://localhost:7860/login`.
+
+ If you aren't using the default location, replace `localhost:7860` with your server's address.
+
+2. Log in with the superuser credentials you set in your `.env` (`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`).
+
+3. To manage users on your server, navigate to `/admin`, such as `http://localhost:7860/admin`, click your user profile image, and then click **Admin Page**.
+
+ As a superuser, you can add users, set permissions, reset passwords, and delete accounts.
+
+4. To add a user, click **New User**, and then complete the user account form:
+
+ 1. Enter a username and password.
+ 2. To activate the account immediately, select **Active**. Inactive users cannot sign in or access flows they created before becoming inactive.
+ 3. Deselect **Superuser** if you don't want the user to have full administrative privileges.
+ 4. Click **Save**. The new user appears in the **Admin Page**.
+
+5. To test the new user's access, sign out of Langflow, and then sign in with the new user's credentials.
+
+ Try to access the `/admin` page.
+ You are redirected to the `/flows` page if the new user isn't a superuser.
\ No newline at end of file
diff --git a/docs/docs/Configuration/configuration-api-keys.mdx b/docs/docs/Configuration/configuration-api-keys.mdx
deleted file mode 100644
index 1716c0ea6f12..000000000000
--- a/docs/docs/Configuration/configuration-api-keys.mdx
+++ /dev/null
@@ -1,184 +0,0 @@
----
-title: API keys
-slug: /configuration-api-keys
----
-
-import Tabs from '@theme/Tabs';
-import TabItem from '@theme/TabItem';
-import Icon from "@site/src/components/icon";
-
-You can use Langflow API keys to interact with Langflow programmatically.
-
-The API key has the same permissions and access as you do when you launch Langflow. This means your API key can only access your own flows, components, and data. You cannot access other users' resources with your own Langflow API keys.
-An API key represents the user who created it. If you create a key as a superuser, then that key will have superuser privileges.
-Anyone who has that key can authorize superuser actions through the Langflow API, including user management and flow management.
-
-In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is set to `True`.
-The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.
-
-
-AUTO_LOGIN and SKIP_AUTH options
-
-In Langflow versions earlier than 1.5, if `LANGFLOW_AUTO_LOGIN=true`, then Langflow automatically logs users in as a superuser without requiring authentication.
-In this case, API requests don't require a Langflow API key.
-
-In Langflow version 1.5, you can set `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=true` and `LANGFLOW_AUTO_LOGIN=true` to skip authentication for API requests.
-However, the `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` option will be removed in a future release.
-
-
-## Generate a Langflow API key
-
-You can generate a Langflow API key with the UI or the CLI.
-
-The UI-generated key is appropriate for most cases. The CLI-generated key is needed when your Langflow server is running in `--backend-only` mode.
-
-
-
-
-1. In the Langflow UI header, click your profile icon, and then select **Settings**.
-2. Click **Langflow API Keys**, and then click **Add New**.
-3. Name your key, and then click **Create API Key**.
-4. Copy the API key and store it securely.
-
-
-
-
-If you're serving your flow with `--backend-only=true`, you can't create API keys in the UI, because the frontend is not running.
-
-Depending on your authentication settings, note the following requirements for creating API keys with the Langflow CLI:
-
-* If `AUTO_LOGIN` is `FALSE`, you must be logged in as a superuser.
-* If `AUTO LOGIN` is `TRUE`, you're already logged in as superuser.
-
-To create an API key for a user from the CLI, do the following:
-
-1. In your `.env` file, set `AUTO_LOGIN=FALSE`, and set superuser credentials for your server.
-
- ```text
- LANGFLOW_AUTO_LOGIN=False
- LANGFLOW_SUPERUSER=administrator
- LANGFLOW_SUPERUSER_PASSWORD=securepassword
- ```
-
-2. To confirm your superuser status, call [`GET /users/whoami`](/api-users#get-current-user), and then check that the response contains `"is_superuser": true`:
-
- ```bash
- curl -X GET \
- "$LANGFLOW_URL/api/v1/users/whoami" \
- -H "accept: application/json" \
- -H "x-api-key: $LANGFLOW_API_KEY"
- ```
-
-
- Result
-
- ```json
- {
- "id": "07e5b864-e367-4f52-b647-a48035ae7e5e",
- "username": "langflow",
- "profile_image": null,
- "store_api_key": null,
- "is_active": true,
- "is_superuser": true,
- "create_at": "2025-05-08T17:59:07.855965",
- "updated_at": "2025-05-29T15:06:56.157860",
- "last_login_at": "2025-05-29T15:06:56.157016",
- }
- ```
-
-
-
-3. Create an API key:
-
- ```shell
- uv run langflow api-key
- ```
-
-
-
-
-## Authenticate requests with the Langflow API key
-
-Include your API key in API requests to authenticate requests to Langflow.
-
-API keys allow access only to the flows and components of the specific user who created the key.
-
-
-
-
-To use the API key when making API requests, include the API key in the HTTP header:
-
-```shell
-curl -X POST \
- "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID?stream=false" \
- -H 'Content-Type: application/json' \
- -H 'x-api-key: LANGFLOW_API_KEY' \
- -d '{"inputs": {"text":""}, "tweaks": {}}'
-```
-
-
-
-
-To pass the API key as a query parameter:
-
-```shell
-curl -X POST \
- "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID?x-api-key=LANGFLOW_API_KEY" \
- -H 'Content-Type: application/json' \
- -d '{"inputs": {"text":""}, "tweaks": {}}'
-```
-
-
-
-
-## Generate a Langflow secret key
-
-Langflow uses the [Fernet](https://pypi.org/project/cryptography/) library for encrypting sensitive data.
-
-If no `LANGFLOW_SECRET_KEY` is provided, Langflow automatically generates one.
-
-For more information, see [Authentication](/configuration-authentication#langflow_secret_key).
-
-## Revoke an API key
-
-To revoke an API key, delete it from your Langflow settings:
-
-1. In the Langflow UI header, click your profile icon, and then select **Settings**.
-2. Click **Langflow API Keys**.
-3. Select the keys you want to delete, and then click **Delete**.
-
-This action immediately invalidates the key and prevents it from being used again.
-
-## Add component API keys to Langflow
-
-These are credentials for external services like OpenAI. They can be added to Langflow with the `.env` file or in the Langflow UI.
-
-Component API keys that are set in the UI override those that are set in the environment variables.
-
-### Add component API keys with the .env file
-
-To add component API keys to your `.env` file:
-
-```text
-OPENAI_API_KEY=sk-...
-ANTHROPIC_API_KEY=sk-...
-GOOGLE_API_KEY=...
-```
-
-### Add component API keys with the Langflow UI
-
-You can store API keys for Langflow components as [global variables](/configuration-global-variables) in Langflow:
-
-1. In the Langflow UI header, click your profile icon, and then select **Settings**.
-2. Click **Global Variables**.
-3. Click **Add New**.
-4. For **Type**, select **Credential**.
-5. For **Name**, enter a name for the variable that will store the API key.
-6. For **Value**, enter the API key that you want to store.
-7. For **Apply to fields**, you can select component fields to automatically populate with this variable.
-
- You can override automatically set variables by manually entering a different variable name or value when you add the affected component to a flow.
-
- Additionally, you can override all component settings by [running a flow with tweaks](/concepts-publish#input-schema), which are modifications to component settings that you make at runtime and apply to a single flow run only.
-
-8. Click **Save Variable**.
\ No newline at end of file
diff --git a/docs/docs/Configuration/configuration-authentication.mdx b/docs/docs/Configuration/configuration-authentication.mdx
deleted file mode 100644
index ad0c29b1f35f..000000000000
--- a/docs/docs/Configuration/configuration-authentication.mdx
+++ /dev/null
@@ -1,208 +0,0 @@
----
-title: Authentication
-slug: /configuration-authentication
----
-
-import Tabs from '@theme/Tabs';
-import TabItem from '@theme/TabItem';
-
-This guide covers Langflow's authentication system and API key management, including how to secure your deployment and manage access to flows and components.
-
-:::warning
-Never expose Langflow ports directly to the internet without proper security measures.
-
-Disable `LANGFLOW_AUTO_LOGIN`, use a secure `LANGFLOW_SECRET_KEY`, and ensure your Langflow server is behind a reverse proxy with authentication enabled.
-For more information, see [Start a secure Langflow server with authentication](#start-a-secure-langflow-server-with-authentication).
-:::
-
-## Authentication configuration values
-
-The section describes the available authentication configuration variables.
-
-You can use the [`.env.example`](https://github.com/langflow-ai/langflow/blob/main/.env.example) file in the Langflow repository as a template for your own `.env` file.
-
-### LANGFLOW_AUTO_LOGIN
-
-Langflow **does not** allow users to have simultaneous or shared access to flows.
-If `AUTO_LOGIN` is enabled and user management is disabled (`LANGFLOW_NEW_USER_IS_ACTIVE=true`), users can access the same environment, but it is not password protected. If two users access the same flow, Langflow saves only the work of the last user to save.
-
-```bash
-LANGFLOW_AUTO_LOGIN=True
-```
-
-In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is set to `True`.
-The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.
-
-
-AUTO_LOGIN and SKIP_AUTH options
-
-In Langflow versions earlier than 1.5, if `LANGFLOW_AUTO_LOGIN=true`, then Langflow automatically logs users in as a superuser without requiring authentication.
-In this case, API requests don't require a Langflow API key.
-
-In Langflow version 1.5, you can set `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=true` and `LANGFLOW_AUTO_LOGIN=true` to skip authentication for API requests.
-However, the `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` option will be removed in a future release.
-
-
-### LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD
-
-These environment variables are only relevant when `LANGFLOW_AUTO_LOGIN` is set to `False`.
-They specify the username and password for the superuser, which is essential for administrative tasks:
-
-```text
-LANGFLOW_SUPERUSER=administrator
-LANGFLOW_SUPERUSER_PASSWORD=securepassword
-```
-
-### LANGFLOW_SECRET_KEY
-
-This environment variable holds a secret key used for encrypting sensitive data like API keys.
-Langflow uses the [Fernet](https://pypi.org/project/cryptography/) library for secret key encryption.
-
-```text
-LANGFLOW_SECRET_KEY=dBuuuB_FHLvU8T9eUNlxQF9ppqRxwWpXXQ42kM2_fb
-```
-
-:::warning
-If no secret key is provided, Langflow automatically generates one. This is not recommended for production environments, especially in multi-instance deployments like Kubernetes, where auto-generated keys can't decrypt data encrypted by other instances.
-:::
-
-To generate a `LANGFLOW_SECRET_KEY`, follow these steps:
-
-1. Run the command to generate and copy a secret to the clipboard.
-
-
-
-
- ```bash
- # Copy to clipboard (macOS)
- python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | pbcopy
-
- # Copy to clipboard (Linux)
- python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | xclip -selection clipboard
-
- # Or just print
- python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')"
- ```
-
-
-
-
- ```bash
- # Copy to clipboard
- python -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | clip
-
- # Or just print
- python -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')"
- ```
-
-
-
-
-2. Paste the value into your `.env` file:
-
- ```text
- LANGFLOW_SECRET_KEY=dBuuuB_FHLvU8T9eUNlxQF9ppqRxwWpXXQ42kM2_fb
- ```
-
-### LANGFLOW_NEW_USER_IS_ACTIVE
-
-When this option is set to `True`, new users are automatically activated and can log in without requiring explicit activation by the superuser from the **Admin page**.
-By default, this variable is set to `False`.
-
-```text
-LANGFLOW_NEW_USER_IS_ACTIVE=False
-```
-
-## Start a secure Langflow server with authentication
-
-Start a secure Langflow server with authentication enabled and secret key encryption using the variables described in [Authentication configuration values](/configuration-authentication#authentication-configuration-values).
-
-Once you are logged in as a superuser, create a new user on your server.
-
-### Start the Langflow server
-
-1. Create a `.env` file and populate it with values for a secure server.
-This server creates a superuser account, requires users to log in before using Langflow, and encrypts secrets with `LANGFLOW_SECRET_KEY`, which is added in the next step.
-Create a `.env` file with the following configuration:
-
-```text
-LANGFLOW_AUTO_LOGIN=False
-LANGFLOW_SUPERUSER=administrator
-LANGFLOW_SUPERUSER_PASSWORD=securepassword
-LANGFLOW_SECRET_KEY=your_generated_key
-LANGFLOW_NEW_USER_IS_ACTIVE=False
-```
-
-2. Generate a secret key for encrypting sensitive data.
-
- Generate your secret key using one of the following commands:
-
-
-
-
- ```bash
- # Copy to clipboard (macOS)
- python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | pbcopy
-
- # Copy to clipboard (Linux)
- python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | xclip -selection clipboard
-
- # Or just print
- python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')"
- ```
-
-
-
-
- ```bash
- # Copy to clipboard
- python -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | clip
-
- # Or just print
- python -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')"
- ```
-
-
-
-
-3. Paste your `LANGFLOW_SECRET_KEY` into the `.env` file.
-
-4. Start Langflow with the configuration from your `.env` file.
-
- ```text
- uv run langflow run --env-file .env
- ```
-
-5. Verify the server is running. The default location is `http://localhost:7860`.
-
-### Manage users as an administrator
-
-1. To complete your first-time login as a superuser, go to `http://localhost:7860/login`.
-2. Log in with your superuser credentials.
-
- * Username: Value of `LANGFLOW_SUPERUSER` (for example, `administrator`)
- * Password: Value of `LANGFLOW_SUPERUSER_PASSWORD` (for example, `securepassword`)
-
- The default values are both `langflow`.
-
-3. To manage users on your server, navigate to the `/admin` page at `http://localhost:7860/admin`.
-
- Click your user profile image, and then click **Admin Page**.
-
- As a superuser, you can create users, set permissions, reset passwords, and delete accounts.
-
-4. To create a user, in the Langflow UI, click **New User**, and then complete the following fields:
-
- * **Username**
- * **Password** and **Confirm Password**
- * Select **Active** and deselect **Superuser** for the new user.
- **Active** users can log into the system and access their flows. **Inactive** users cannot log in or see their flows.
- A **Superuser** has full administrative privileges.
-
-5. To complete user creation, click **Save**.
-Your new user appears in the **Admin Page**.
-
-6. To confirm your new user's functionality, log out of Langflow, and log back in with your new user's credentials.
-Attempt to access the `/admin` page. You should be redirected to the `/flows` page, because the new user is not a superuser.
-
-You have started a secure Langflow server with authentication enabled and secret key encryption.
\ No newline at end of file
diff --git a/docs/docs/Configuration/configuration-cli.mdx b/docs/docs/Configuration/configuration-cli.mdx
index 0b3a2a41cbe4..05b16a537515 100644
--- a/docs/docs/Configuration/configuration-cli.mdx
+++ b/docs/docs/Configuration/configuration-cli.mdx
@@ -5,13 +5,11 @@ slug: /configuration-cli
import Link from '@docusaurus/Link';
-# Langflow CLI
-
The Langflow command line interface (Langflow CLI) is the main interface for managing and running the Langflow server.
## CLI commands
-The following sections describe the available CLI commands and their options, as well as their corresponding [environment variables](./environment-variables.mdx).
+The following sections describe the available CLI commands and their options.
### langflow
@@ -27,9 +25,9 @@ python -m langflow [OPTIONS]
| Option | Default | Values | Description |
|--------|---------|--------|-------------|
-| `--install-completion` | *Not applicable* | *Not applicable* | Install auto-completion for the current shell. |
-| `--show-completion` | *Not applicable* | *Not applicable* | Show the location of the auto-completion config file, if installed. |
-| `--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
+| `--install-completion` | *Not applicable* | *Not applicable* | Install auto-completion for the current shell. |
+| `--show-completion` | *Not applicable* | *Not applicable* | Show the location of the auto-completion config file, if installed. |
+| `--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
### langflow api-key
@@ -38,7 +36,7 @@ To create API keys with the Langflow CLI, `AUTO_LOGIN` must be set to `TRUE`, or
* If `AUTO_LOGIN` is `FALSE`, you must be logged in as a superuser.
* If `AUTO LOGIN` is `TRUE`, you're already logged in as superuser.
-For more information, see [API keys](/configuration-api-keys).
+For more information, see [API keys and authentication](/api-keys-and-authentication).
```bash
langflow api-key [OPTIONS]
@@ -50,9 +48,9 @@ uv run langflow api-key [OPTIONS]
| Option | Default | Values | Description |
|--------|---------|--------|-------------|
-| `--install-completion` | *Not applicable* | *Not applicable* | Install auto-completion for the current shell. |
-| `--show-completion` | *Not applicable* | *Not applicable* | Show the location of the auto-completion config file (if installed). |
-| `--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
+| `--install-completion` | *Not applicable* | *Not applicable* | Install auto-completion for the current shell. |
+| `--show-completion` | *Not applicable* | *Not applicable* | Show the location of the auto-completion config file (if installed). |
+| `--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
### langflow copy-db
@@ -71,7 +69,7 @@ python -m langflow copy-db
| Option | Default | Values | Description |
|--------|---------|--------|-------------|
-| `--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
+| `--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
### langflow migration
@@ -87,9 +85,9 @@ python -m langflow migration [OPTIONS]
| Option | Default | Values | Description |
|--------|---------|--------|-------------|
-| `--test` | `true` | Boolean | Run migrations in test mode. Use `--no-test` to disable test mode. |
-| `--fix` | `false` (`--no-fix`) | Boolean | Fix migrations. This is a destructive operation, and all affected data will be deleted. Only use this option if you know what you are doing. |
-| `--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
+| `--test` | `true` | Boolean | Run migrations in test mode. Use `--no-test` to disable test mode. |
+| `--fix` | `false` (`--no-fix`) | Boolean | Fix migrations. This is a destructive operation, and all affected data will be deleted. Only use this option if you know what you are doing. |
+| `--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
### langflow run
@@ -105,27 +103,29 @@ python -m langflow run [OPTIONS]
| Option | Default | Values | Description |
|--------|---------|--------|-------------|
-| `--host` | `localhost` | String | The host on which the Langflow server will run. See [`LANGFLOW_HOST` variable](./environment-variables.mdx#LANGFLOW_HOST). |
-| `--workers` | `1` | Integer | Number of worker processes. See [`LANGFLOW_WORKERS` variable](./environment-variables.mdx#LANGFLOW_WORKERS). |
-| `--worker-timeout` | `300` | Integer | Worker timeout in seconds. See [`LANGFLOW_WORKER_TIMEOUT` variable](./environment-variables.mdx#LANGFLOW_WORKER_TIMEOUT). |
-| `--port` | `7860` | Integer | The port on which the Langflow server will run. The server automatically selects a free port if the specified port is in use. See [`LANGFLOW_PORT` variable](./environment-variables.mdx#LANGFLOW_PORT). |
-| `--components-path` | `langflow/components` | String | Path to the directory containing custom components. See [`LANGFLOW_COMPONENTS_PATH` variable](./environment-variables.mdx#LANGFLOW_COMPONENTS_PATH). |
-| `--env-file` | Not set | String | Path to the `.env` file containing environment variables. See [Import environment variables from a .env file](./environment-variables.mdx#configure-variables-env-file). |
-| `--log-level` | `critical` | `debug` `info` `warning` `error` `critical` | Set the logging level. See [`LANGFLOW_LOG_LEVEL` variable](./environment-variables.mdx#LANGFLOW_LOG_LEVEL). |
-| `--log-file` | `logs/langflow.log` | String | Set the path to the log file for Langflow. See [`LANGFLOW_LOG_FILE` variable](./environment-variables.mdx#LANGFLOW_LOG_FILE). |
-| `--cache` | `async` | `async` `redis` `memory` `disk` | Type of cache to use. See [`LANGFLOW_CACHE_TYPE` variable](./environment-variables.mdx#LANGFLOW_CACHE_TYPE). |
-| `--frontend-path` | `./frontend` | String | Path to the frontend directory containing build files. This is for development purposes only. See [`LANGFLOW_FRONTEND_PATH` variable](./environment-variables.mdx#LANGFLOW_FRONTEND_PATH). |
-| `--open-browser` | `true` | Boolean | Open the system web browser on startup. Use `--no-open-browser` to disable opening the system web browser on startup. See [`LANGFLOW_OPEN_BROWSER` variable](./environment-variables.mdx#LANGFLOW_OPEN_BROWSER). |
-| `--remove-api-keys` | `false` (`--no-remove-api-keys`) | Boolean | Remove API keys from the projects saved in the database. See [`LANGFLOW_REMOVE_API_KEYS` variable](./environment-variables.mdx#LANGFLOW_REMOVE_API_KEYS). |
-| `--backend-only` | `false` (`--no-backend-only`) | Boolean | Only run Langflow's backend server (no frontend). See [`LANGFLOW_BACKEND_ONLY` variable](./environment-variables.mdx#LANGFLOW_BACKEND_ONLY). |
-| `--store` | `true` | Boolean | Enable the Langflow Store features. Use `--no-store` to disable the Langflow Store features. See [`LANGFLOW_STORE` variable](./environment-variables.mdx#LANGFLOW_STORE). |
-| `--auto-saving` | `true` | Boolean | Enable flow auto-saving. Use `--no-auto-saving` to disable flow auto-saving. See [`LANGFLOW_AUTO_SAVING` variable](./environment-variables.mdx#LANGFLOW_AUTO_SAVING). |
-| `--auto-saving-interval` | `1000` | Integer | Set the interval for flow auto-saving in milliseconds. See [`LANGFLOW_AUTO_SAVING_INTERVAL` variable](./environment-variables.mdx#LANGFLOW_AUTO_SAVING_INTERVAL). |
-| `--health-check-max-retries` | `5` | Integer | Set the maximum number of retries for the health check. Use `--no-health-check-max-retries` to disable the maximum number of retries for the health check. See [`LANGFLOW_HEALTH_CHECK_MAX_RETRIES` variable](./environment-variables.mdx#LANGFLOW_HEALTH_CHECK_MAX_RETRIES). |
-| `--max-file-size-upload` | `100` | Integer | Set the maximum file size for the upload in megabytes. See [`LANGFLOW_MAX_FILE_SIZE_UPLOAD` variable](./environment-variables.mdx#LANGFLOW_MAX_FILE_SIZE_UPLOAD). |
-| `--ssl-cert-file-path` | Not set | String | Path to the SSL certificate file on the local system. |
-| `--ssl-key-file-path` | Not set | String | Path to the SSL key file on the local system. |
-| `--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
+| `--host` | `localhost` | String | The host on which the Langflow server will run. |
+| `--workers` | `1` | Integer | Number of worker processes. |
+| `--worker-timeout` | `300` | Integer | Worker timeout in seconds. |
+| `--port` | `7860` | Integer | The port on which the Langflow server will run. The server automatically selects a free port if the specified port is in use. |
+| `--components-path` | `langflow/components` | String | Path to the directory containing custom components. |
+| `--env-file` | Not set | String | Path to the `.env` file containing environment variables. |
+| `--log-level` | `critical` | `debug` `info` `warning` `error` `critical` | Set the logging level. |
+| `--log-file` | `logs/langflow.log` | String | Set the path to the log file for Langflow. |
+| `--cache` | `async` | `async` `redis` `memory` `disk` | Type of cache to use. |
+| `--frontend-path` | `./frontend` | String | Path to the frontend directory containing build files. This is for development purposes only. |
+| `--open-browser` | `true` | Boolean | Open the system web browser on startup. Use `--no-open-browser` to disable opening the system web browser on startup. |
+| `--remove-api-keys` | `false` (`--no-remove-api-keys`) | Boolean | Remove API keys from the projects saved in the database. |
+| `--backend-only` | `false` (`--no-backend-only`) | Boolean | Only run Langflow's backend server (no frontend). |
+| `--store` | `true` | Boolean | Enable the Langflow Store features. Use `--no-store` to disable the Langflow Store features. |
+| `--auto-saving` | `true` | Boolean | Enable flow auto-saving. Use `--no-auto-saving` to disable flow auto-saving. |
+| `--auto-saving-interval` | `1000` | Integer | Set the interval for flow auto-saving in milliseconds. |
+| `--health-check-max-retries` | `5` | Integer | Set the maximum number of retries for the health check. Use `--no-health-check-max-retries` to disable the maximum number of retries for the health check. |
+| `--max-file-size-upload` | `100` | Integer | Set the maximum file size for the upload in megabytes. |
+| `--ssl-cert-file-path` | Not set | String | Path to the SSL certificate file on the local system. |
+| `--ssl-key-file-path` | Not set | String | Path to the SSL key file on the local system. |
+| `--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
+
+For information about the environment variables that correspond to these options, see [Supported environment variables](/environment-variables#supported-variables).
### langflow superuser
@@ -141,12 +141,14 @@ python -m langflow superuser [OPTIONS]
| Option | Default | Values | Description |
|--------|---------|--------|-------------|
-| `--username` | Required | String | Specify the name for the superuser. See [`LANGFLOW_SUPERUSER` variable](./environment-variables.mdx#LANGFLOW_SUPERUSER). |
-| `--password` | Required | String | Specify the password for the superuser. See [`LANGFLOW_SUPERUSER_PASSWORD` variable](./environment-variables.mdx#LANGFLOW_SUPERUSER_PASSWORD). |
+| `--username` | Required | String | Specify the name for the superuser. |
+| `--password` | Required | String | Specify the password for the superuser. |
+
+For more information about these values, see [`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`](/api-keys-and-authentication#langflow-superuser).
## Precedence
-Langflow CLI options override the values of corresponding [environment variables](./environment-variables.mdx).
+Langflow CLI options override the values of [environment variables](/environment-variables) set in your terminal or primary `.env` file.
For example, if you have `LANGFLOW_PORT=7860` defined as an environment variable, but you run the CLI with `--port 7880`, Langflow sets the port to **`7880`**, the value passed with the CLI.
@@ -170,4 +172,4 @@ langflow run --remove-api-keys
All boolean options have a corresponding option that negates it.
For example, the negating option for `--remove-api-keys` is `--no-remove-api-keys`.
-These options let you negate boolean options that you may have set using [environment variables](./environment-variables.mdx).
+These options let you negate boolean options that you may have set in your primary `.env` [environment variables](/environment-variables).
diff --git a/docs/docs/Configuration/environment-variables.mdx b/docs/docs/Configuration/environment-variables.mdx
index 1b9d86adb471..0ff7dfaddae8 100644
--- a/docs/docs/Configuration/environment-variables.mdx
+++ b/docs/docs/Configuration/environment-variables.mdx
@@ -7,21 +7,35 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Link from '@docusaurus/Link';
+Langflow uses environment variables to configure certain settings.
+You can also import environment variables for use in your deployment, such as environment variables used by certain components in your flows.
-Langflow lets you configure a number of settings using environment variables.
+You can set Langflow environment variables in your terminal, in `.env`, and with the [Langflow CLI](./configuration-cli).
+
+## Precedence {#precedence}
+
+If an environment variable is set in multiple places, the following hierarchy applies:
+
+1. Langflow CLI options override `.env` and terminal variables.
+2. `.env` overrides terminal variables.
+3. Terminal variables are used only if the variable isn't set in `.env` or Langflow CLI options.
+
+For example, if you set `LANGFLOW_PORT` in `.env` and your terminal, then Langflow uses the value from `.env`.
+Similarly, if you run a Langflow CLI command with `--port`, Langflow uses that port number instead of the `LANGFLOW_PORT` in `.env`.
## Configure environment variables
Langflow recognizes [supported environment variables](#supported-variables) from the following sources:
- Environment variables that you've set in your terminal.
-- Environment variables that you've imported from a `.env` file using the `--env-file` option in the Langflow CLI.
+- Environment variables that you've imported from a `.env` file when starting Langflow or using the `--env-file` option in the Langflow CLI.
-You can choose to use one source exclusively, or use both sources together.
-If you choose to use both sources together, be aware that environment variables imported from a `.env` file take [precedence](#precedence) over those set in your terminal.
+You can choose to use one or both sources.
+However, environment variables imported from a `.env` file take [precedence](#precedence) over those set in your terminal.
### Set environment variables in your terminal {#configure-variables-terminal}
+
Run the following commands to set environment variables for your current terminal session:
@@ -123,128 +137,71 @@ If it detects a supported environment variable, then it automatically adopts the
If your `.env` file isn't in the same directory, provide the path to your `.env` file.
-On startup, Langflow imports the environment variables from your `.env` file, as well as any that you [set in your terminal](#configure-variables-terminal), and adopts their specified values.
-
-## Precedence {#precedence}
-
-You can set Langflow environment variables in your terminal, in `.env`, and with [Langflow CLI options](./configuration-cli.mdx).
-
-If an environment variable is set in multiple places, the following hierarchy applies:
-
-1. Langflow CLI options override `.env` and terminal variables.
-2. `.env` overrides terminal variables.
-3. Terminal variables are used only if the variable isn't set in `.env` or Langflow CLI options.
-
-For example, if you set `LANGFLOW_PORT` in `.env` and your terminal, then Langflow uses the value from `.env`.
-Similarly, if you run a Langflow CLI command with `--port`, Langflow uses that port number instead of the `LANGFLOW_PORT` in `.env`.
+On startup, Langflow imports the environment variables from your `.env` file, as well as any others that you set in your terminal, and then adopts their specified values.
## Supported environment variables {#supported-variables}
The following table lists the environment variables supported by Langflow.
-
-
-
-
| Variable | Format | Default | Description |
|----------|--------|---------|-------------|
-| DO_NOT_TRACK | Boolean | `false` | If this option is enabled, Langflow does not track telemetry. |
-| LANGFLOW_AUTO_LOGIN | Boolean | `true` | Enable automatic login for Langflow. Set to `false` to disable automatic login and require the login form to log into the Langflow UI. Setting to `false` requires [`LANGFLOW_SUPERUSER`](#LANGFLOW_SUPERUSER) and [`LANGFLOW_SUPERUSER_PASSWORD`](environment-variables.mdx#LANGFLOW_SUPERUSER_PASSWORD) to be set. For more information, see [Authentication](/configuration-authentication). |
-| LANGFLOW_AUTO_SAVING | Boolean | `true` | Enable flow auto-saving. See [`--auto-saving` option](./configuration-cli.mdx#run-auto-saving). |
-| LANGFLOW_AUTO_SAVING_INTERVAL | Integer | `1000` | Set the interval for flow auto-saving in milliseconds. See [`--auto-saving-interval` option](./configuration-cli.mdx#run-auto-saving-interval). |
-| LANGFLOW_BACKEND_ONLY | Boolean | `false` | Only run Langflow's backend server (no frontend). See [`--backend-only` option](./configuration-cli.mdx#run-backend-only). |
-| LANGFLOW_BUNDLE_URLS | List[String] | `[]` | A list of URLs from which to load component bundles and flows. Supports GitHub URLs. If LANGFLOW_AUTO_LOGIN is enabled, flows from these bundles are loaded into the database. |
-| LANGFLOW_CACHE_TYPE | String | `async` | Set the cache type for Langflow. Possible values: `async`, `redis`, `memory`, `disk`. If you set the type to `redis`, then you must also set the following environment variables: LANGFLOW_REDIS_HOST, LANGFLOW_REDIS_PORT, LANGFLOW_REDIS_DB, and LANGFLOW_REDIS_CACHE_EXPIRE. |
-| LANGFLOW_COMPONENTS_PATH | String | `langflow/components` | Path to the directory containing custom components. See [`--components-path` option](./configuration-cli.mdx#run-components-path). |
-| LANGFLOW_CONFIG_DIR | String | See description | Set the Langflow configuration directory where files, logs, and the Langflow database are stored. Defaults: **macOS Desktop cache**: `/Users//.langflow/cache` **Windows Desktop cache**: `C:\Users\\AppData\Roaming\com.Langflow\cache` **OSS macOS/Windows/Linux/WSL (uv pip install) cache**: `/lib/python3.12/site-packages/langflow/cache` **OSS macOS/Windows/Linux/WSL (git clone) cache**: `/src/backend/base/langflow/cache` |
-| LANGFLOW_DATABASE_URL | String | Not set | Set the database URL for Langflow. If not provided, Langflow uses a SQLite database. |
-| LANGFLOW_USE_NOOP_DATABASE | Boolean | `false` | Use a no-op database, which avoids database connections and operations. Useful for running flows without a database. |
-| LANGFLOW_DATABASE_CONNECTION_RETRY | Boolean | `false` | If True, Langflow tries to connect to the database again if it fails. |
-| LANGFLOW_DB_POOL_SIZE | Integer | `10` | **DEPRECATED:** Use LANGFLOW_DB_CONNECTION_SETTINGS instead. The number of connections to keep open in the connection pool. |
-| LANGFLOW_DB_MAX_OVERFLOW | Integer | `20` | **DEPRECATED:** Use LANGFLOW_DB_CONNECTION_SETTINGS instead. The number of connections to allow that can be opened beyond the pool size. |
-| LANGFLOW_DB_CONNECT_TIMEOUT | Integer | `20` | The number of seconds to wait before giving up on a lock to be released or establishing a connection to the database. |
-| LANGFLOW_DB_CONNECTION_SETTINGS | JSON | Not set | A JSON dictionary to centralize database connection parameters. Example: `{"pool_size": 10, "max_overflow": 20}` |
-| LANGFLOW_DISABLE_TRACK_APIKEY_USAGE | Boolean | `false` | If set to `true`, disables tracking of API key usage (`total_uses` and `last_used_at`) to avoid database contention under high concurrency. |
-| LANGFLOW_ENABLE_LOG_RETRIEVAL | Boolean | `false` | Enable log retrieval functionality. |
-| LANGFLOW_FALLBACK_TO_ENV_VAR | Boolean | `true` | If enabled, [global variables](../Configuration/configuration-global-variables.mdx) set in the Langflow UI fall back to an environment variable with the same name when Langflow fails to retrieve the variable value. |
-| LANGFLOW_FRONTEND_PATH | String | `./frontend` | Path to the frontend directory containing build files. This is for development purposes only. See [`--frontend-path` option](./configuration-cli.mdx#run-frontend-path). |
-| LANGFLOW_HEALTH_CHECK_MAX_RETRIES | Integer | `5` | Set the maximum number of retries for the health check. See [`--health-check-max-retries` option](./configuration-cli.mdx#run-health-check-max-retries). |
-| LANGFLOW_HOST | String | `localhost` | The host on which the Langflow server will run. See [`--host` option](./configuration-cli.mdx#run-host). |
-| LANGFLOW_LANGCHAIN_CACHE | String | `InMemoryCache` | Type of cache to use. Possible values: `InMemoryCache`, `SQLiteCache`. See [`--cache` option](./configuration-cli.mdx#run-cache). |
-| LANGFLOW_LOG_LEVEL | String | `INFO` | Set the logging level for Langflow. Possible values: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`. |
-| LANGFLOW_LOG_FILE | String | Not set | Path to the log file. If this option is not set, logs are written to stdout. |
-| LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE | Integer | `10000` | Set the buffer size for log retrieval. Only used if `LANGFLOW_ENABLE_LOG_RETRIEVAL` is enabled. |
-| LANGFLOW_MAX_FILE_SIZE_UPLOAD | Integer | `100` | Set the maximum file size for the upload in megabytes. See [`--max-file-size-upload` option](./configuration-cli.mdx#run-max-file-size-upload). |
-| LANGFLOW_MAX_ITEMS_LENGTH | Integer | `100` | Maximum number of items to store and display in the UI. Lists longer than this will be truncated when displayed in the UI. Does not affect data passed between components nor outputs. |
-| LANGFLOW_MAX_TEXT_LENGTH | Integer | `1000` | Maximum number of characters to store and display in the UI. Responses longer than this will be truncated when displayed in the UI. Does not truncate responses between components nor outputs. |
-| LANGFLOW_MCP_SERVER_ENABLED | Boolean | `true` | If this option is set to False, Langflow does not enable the MCP server. |
-| LANGFLOW_MCP_SERVER_ENABLE_PROGRESS_NOTIFICATIONS | Boolean | `false` | If this option is set to True, Langflow sends progress notifications in the MCP server. |
-| LANGFLOW_NEW_USER_IS_ACTIVE | Boolean | `false` | When enabled, new users are automatically activated and can log in without requiring explicit activation by the superuser. |
-| LANGFLOW_OPEN_BROWSER | Boolean | `false` | Open the system web browser on startup. See [`--open-browser` option](./configuration-cli.mdx#run-open-browser). |
-| LANGFLOW_PORT | Integer | `7860` | The port on which the Langflow server runs. The server automatically selects a free port if the specified port is in use. See [`--port` option](./configuration-cli.mdx#run-port). |
-| LANGFLOW_PROMETHEUS_ENABLED | Boolean | `false` | Expose Prometheus metrics. |
-| LANGFLOW_PROMETHEUS_PORT | Integer | `9090` | Set the port on which Langflow exposes Prometheus metrics. |
-| LANGFLOW_REDIS_CACHE_EXPIRE | Integer | `3600` | See LANGFLOW_CACHE_TYPE. |
-| LANGFLOW_REDIS_DB | Integer | `0` | See LANGFLOW_CACHE_TYPE. |
-| LANGFLOW_REDIS_HOST | String | `localhost` | See LANGFLOW_CACHE_TYPE. |
-| LANGFLOW_REDIS_PORT | String | `6379` | See LANGFLOW_CACHE_TYPE. |
-| LANGFLOW_REDIS_PASSWORD | String | Not set | Password for Redis authentication when using Redis cache type. |
-| LANGFLOW_REMOVE_API_KEYS | Boolean | `false` | Remove API keys from the projects saved in the database. See [`--remove-api-keys` option](./configuration-cli.mdx#run-remove-api-keys). |
-| LANGFLOW_SAVE_DB_IN_CONFIG_DIR | Boolean | `false` | Save the Langflow database in LANGFLOW_CONFIG_DIR instead of in the Langflow package directory. Note, when this variable is set to default (`false`), the database isn't shared between different virtual environments and the database is deleted when you uninstall Langflow. |
-| LANGFLOW_SECRET_KEY | String | Auto-generated | Key used for encrypting sensitive data like API keys. If a key is not provided, a secure key is auto-generated. For production environments with multiple instances, you should explicitly set this to ensure consistent encryption across instances. |
-| LANGFLOW_STORE | Boolean | `true` | Enable the Langflow Store. See [`--store` option](./configuration-cli.mdx#run-store). |
-| LANGFLOW_STORE_ENVIRONMENT_VARIABLES | Boolean | `true` | Store environment variables as [global variables](../Configuration/configuration-global-variables.mdx) in the database. |
-| LANGFLOW_CREATE_STARTER_PROJECTS | Boolean | `true` | If this option is enabled, Langflow creates starter projects during initialization. Set to `false` to skip all starter project creation and updates. |
-| LANGFLOW_UPDATE_STARTER_PROJECTS | Boolean | `true` | If this option is enabled, Langflow updates starter projects with the latest component versions when initializing. |
-| LANGFLOW_SUPERUSER | String | `langflow` | Set the name for the superuser. Required if LANGFLOW_AUTO_LOGIN is set to `false`. See [`superuser --username` option](./configuration-cli.mdx#superuser-username). |
-| LANGFLOW_SUPERUSER_PASSWORD | String | `langflow` | Set the password for the superuser. Required if LANGFLOW_AUTO_LOGIN is set to `false`. See [`superuser --password` option](./configuration-cli.mdx#superuser-password). |
-| LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT | String | Not set | Comma-separated list of environment variables to get from the environment and store as [global variables](../Configuration/configuration-global-variables.mdx). |
-| LANGFLOW_LOAD_FLOWS_PATH | String | Not set | Path to a directory containing flow JSON files to be loaded on startup. Note that this feature only works if LANGFLOW_AUTO_LOGIN is enabled. |
-| LANGFLOW_WORKER_TIMEOUT | Integer | `300` | Worker timeout in seconds. See [`--worker-timeout` option](./configuration-cli.mdx#run-worker-timeout). |
-| LANGFLOW_WORKERS | Integer | `1` | Number of worker processes. See [`--workers` option](./configuration-cli.mdx#run-workers). |
-| LANGFLOW_SSL_CERT_FILE | String | Not set | Path to the SSL certificate file on the local system. |
-| LANGFLOW_SSL_KEY_FILE | String | Not set | Path to the SSL key file on the local system. |
-| LANGFLOW_SKIP_AUTH_AUTO_LOGIN | Boolean | `true` | If set to `true`, and `LANGFLOW_AUTO_LOGIN` is set to `true`, skips authentication and allows automatic login as the superuser. If set to `false`, and `LANGFLOW_AUTO_LOGIN` is set to `true`, disables automatic login and enforces authentication. If `LANGFLOW_AUTO_LOGIN` is `false`, has no effect. |
-
-
+| `DO_NOT_TRACK` | Boolean | `false` | If this option is enabled, Langflow does not track telemetry. |
+| `LANGFLOW_AUTO_LOGIN` | Boolean | `true` | See [`LANGFLOW_AUTO_LOGIN`](/api-keys-and-authentication#langflow-auto-login). |
+| `LANGFLOW_AUTO_SAVING` | Boolean | `true` | Enable flow auto-saving. See [`--auto-saving`](./configuration-cli.mdx#run-auto-saving). |
+| `LANGFLOW_AUTO_SAVING_INTERVAL` | Integer | `1000` | Set the interval for flow auto-saving in milliseconds. See [`--auto-saving-interval`](./configuration-cli.mdx#run-auto-saving-interval). |
+| `LANGFLOW_BACKEND_ONLY` | Boolean | `false` | Only run Langflow's backend server (no frontend). See [`--backend-only`](./configuration-cli.mdx#run-backend-only). |
+| `LANGFLOW_BUNDLE_URLS` | List [String] | `[]` | A list of URLs from which to load component bundles and flows. Supports GitHub URLs. If LANGFLOW_AUTO_LOGIN is enabled, flows from these bundles are loaded into the database. |
+| `LANGFLOW_CACHE_TYPE` | String | `async` | Set the cache type for Langflow. Possible values: `async`, `redis`, `memory`, `disk`. If you set the type to `redis`, then you must also set the following environment variables: LANGFLOW_REDIS_HOST, LANGFLOW_REDIS_PORT, LANGFLOW_REDIS_DB, and LANGFLOW_REDIS_CACHE_EXPIRE. |
+| `LANGFLOW_COMPONENTS_PATH` | String | `/components` | Path to the directory containing custom components. See [`--components-path`](./configuration-cli.mdx#run-components-path). |
+| `LANGFLOW_CONFIG_DIR` | String | Varies | Set the Langflow configuration directory where files, logs, and the Langflow database are stored. Default path depends on your installation. See [Flow storage and logs](/concepts-flows#flow-storage-and-logs) |
+| `LANGFLOW_DATABASE_URL` | String | Not set | Set the database URL for Langflow. If not provided, Langflow uses a SQLite database. |
+| `LANGFLOW_USE_NOOP_DATABASE` | Boolean | `false` | Use a no-op database, which avoids database connections and operations. Useful for running flows without a database. |
+| `LANGFLOW_DATABASE_CONNECTION_RETRY` | Boolean | `false` | If True, Langflow tries to connect to the database again if it fails. |
+| `LANGFLOW_DB_POOL_SIZE` | Integer | `10` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to keep open in the connection pool. |
+| `LANGFLOW_DB_MAX_OVERFLOW` | Integer | `20` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to allow that can be opened beyond the pool size. |
+| `LANGFLOW_DB_CONNECT_TIMEOUT` | Integer | `20` | The number of seconds to wait before giving up on a lock to be released or establishing a connection to the database. |
+| `LANGFLOW_DB_CONNECTION_SETTINGS` | JSON | Not set | A JSON dictionary to centralize database connection parameters. Example: `{"pool_size": 10, "max_overflow": 20}` |
+| `LANGFLOW_DISABLE_TRACK_APIKEY_USAGE` | Boolean | `false` | If set to `true`, disables tracking of API key usage (`total_uses` and `last_used_at`) to avoid database contention under high concurrency. |
+| `LANGFLOW_ENABLE_LOG_RETRIEVAL` | Boolean | `false` | Enable log retrieval functionality. |
+| `LANGFLOW_FALLBACK_TO_ENV_VAR` | Boolean | `true` | If enabled, [global variables](/configuration-global-variables) set in the Langflow UI fall back to an environment variable with the same name when Langflow fails to retrieve the variable value. |
+| `LANGFLOW_FRONTEND_PATH` | String | `./frontend` | Path to the frontend directory containing build files. This is for development purposes only. See [`--frontend-path`](./configuration-cli.mdx#run-frontend-path). |
+| `LANGFLOW_HEALTH_CHECK_MAX_RETRIES` | Integer | `5` | Set the maximum number of retries for the health check. See [`--health-check-max-retries`](./configuration-cli.mdx#run-health-check-max-retries). |
+| `LANGFLOW_HOST` | String | `localhost` | The host on which the Langflow server will run. See [`--host`](./configuration-cli.mdx#run-host). |
+| `LANGFLOW_LANGCHAIN_CACHE` | String | `InMemoryCache` | Type of cache to use. Possible values: `InMemoryCache`, `SQLiteCache`. See [`--cache`](./configuration-cli.mdx#run-cache). |
+| `LANGFLOW_LOG_LEVEL` | String | `INFO` | Set the logging level for Langflow. Possible values: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`. |
+| `LANGFLOW_LOG_FILE` | String | Not set | Path to the log file. If this option is not set, logs are written to stdout. |
+| `LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE` | Integer | `10000` | Set the buffer size for log retrieval. Only used if `LANGFLOW_ENABLE_LOG_RETRIEVAL` is enabled. |
+| `LANGFLOW_MAX_FILE_SIZE_UPLOAD` | Integer | `100` | Set the maximum file size for the upload in megabytes. See [`--max-file-size-upload`](./configuration-cli.mdx#run-max-file-size-upload). |
+| `LANGFLOW_MAX_ITEMS_LENGTH` | Integer | `100` | Maximum number of items to store and display in the UI. Lists longer than this will be truncated when displayed in the UI. Does not affect data passed between components nor outputs. |
+| `LANGFLOW_MAX_TEXT_LENGTH` | Integer | `1000` | Maximum number of characters to store and display in the UI. Responses longer than this will be truncated when displayed in the UI. Does not truncate responses between components nor outputs. |
+| `LANGFLOW_MCP_SERVER_ENABLED` | Boolean | `true` | If this option is set to False, Langflow does not enable the MCP server. |
+| `LANGFLOW_MCP_SERVER_ENABLE_PROGRESS_NOTIFICATIONS` | Boolean | `false` | If this option is set to True, Langflow sends progress notifications in the MCP server. |
+| `LANGFLOW_NEW_USER_IS_ACTIVE` | Boolean | `false` | See [`LANGFLOW_NEW_USER_IS_ACTIVE`](/api-keys-and-authentication#langflow-new-user-is-active). |
+| `LANGFLOW_OPEN_BROWSER` | Boolean | `false` | Open the system web browser on startup. See [`--open-browser`](./configuration-cli.mdx#run-open-browser). |
+| `LANGFLOW_PORT` | Integer | `7860` | The port on which the Langflow server runs. The server automatically selects a free port if the specified port is in use. See [`--port`](./configuration-cli.mdx#run-port). |
+| `LANGFLOW_PROMETHEUS_ENABLED` | Boolean | `false` | Expose Prometheus metrics. |
+| `LANGFLOW_PROMETHEUS_PORT` | Integer | `9090` | Set the port on which Langflow exposes Prometheus metrics. |
+| `LANGFLOW_REDIS_CACHE_EXPIRE` | Integer | `3600` | See [`LANGFLOW_CACHE_TYPE`](#LANGFLOW_CACHE_TYPE). |
+| `LANGFLOW_REDIS_DB` | Integer | `0` | See [`LANGFLOW_CACHE_TYPE`](#LANGFLOW_CACHE_TYPE). |
+| `LANGFLOW_REDIS_HOST` | String | `localhost` | See [`LANGFLOW_CACHE_TYPE`](#LANGFLOW_CACHE_TYPE). |
+| `LANGFLOW_REDIS_PORT` | String | `6379` | See [`LANGFLOW_CACHE_TYPE`](#LANGFLOW_CACHE_TYPE). |
+| `LANGFLOW_REDIS_PASSWORD` | String | Not set | Password for Redis authentication when using Redis cache type. |
+| `LANGFLOW_REMOVE_API_KEYS` | Boolean | `false` | Remove API keys from the projects saved in the database. See [`--remove-api-keys`](./configuration-cli.mdx#run-remove-api-keys). |
+| `LANGFLOW_SAVE_DB_IN_CONFIG_DIR` | Boolean | `false` | Save the Langflow database in `LANGFLOW_CONFIG_DIR` instead of in the Langflow package directory. Note, when this variable is set to default (`false`), the database isn't shared between different virtual environments and the database is deleted when you uninstall Langflow. |
+| `LANGFLOW_SECRET_KEY` | String | Automated | See [`LANGFLOW_SECRET_KEY`](/api-keys-and-authentication#langflow-secret-key). |
+| `LANGFLOW_STORE` | Boolean | `true` | Enable the Langflow Store. See [`--store`](/configuration-cli#run-store). |
+| `LANGFLOW_STORE_ENVIRONMENT_VARIABLES` | Boolean | `true` | Store environment variables as [global variables](/configuration-global-variables) in the database. |
+| `LANGFLOW_CREATE_STARTER_PROJECTS` | Boolean | `true` | If this option is enabled, Langflow creates starter projects during initialization. Set to `false` to skip all starter project creation and updates. |
+| `LANGFLOW_UPDATE_STARTER_PROJECTS` | Boolean | `true` | If this option is enabled, Langflow updates starter projects with the latest component versions when initializing. |
+| `LANGFLOW_SUPERUSER` | String | `langflow` | See [`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`](/api-keys-and-authentication#langflow-superuser). |
+| `LANGFLOW_SUPERUSER_PASSWORD` | String | `langflow` | See [`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`](/api-keys-and-authentication#langflow-superuser). |
+| `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` | String | Not set | Comma-separated list of environment variables to get from the environment and store as [global variables](/configuration-global-variables). |
+| `LANGFLOW_LOAD_FLOWS_PATH` | String | Not set | Path to a directory containing flow JSON files to be loaded on startup. Note that this feature only works if `LANGFLOW_AUTO_LOGIN` is enabled. |
+| `LANGFLOW_WORKER_TIMEOUT` | Integer | `300` | Worker timeout in seconds. See [`--worker-timeout`](./configuration-cli.mdx#run-worker-timeout). |
+| `LANGFLOW_WORKERS` | Integer | `1` | Number of worker processes. See [`--workers`](./configuration-cli.mdx#run-workers). |
+| `LANGFLOW_SSL_CERT_FILE` | String | Not set | Path to the SSL certificate file on the local system. |
+| `LANGFLOW_SSL_KEY_FILE` | String | Not set | Path to the SSL key file on the local system. |
+| `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` | Boolean | `true` | See [`LANGFLOW_AUTO_LOGIN`](/api-keys-and-authentication#langflow-auto-login). |
## Configure .env, override.conf, and tasks.json files
diff --git a/docs/docs/Contributing/contributing-telemetry.mdx b/docs/docs/Contributing/contributing-telemetry.mdx
index f74c4f29a559..6ea60c420121 100644
--- a/docs/docs/Contributing/contributing-telemetry.mdx
+++ b/docs/docs/Contributing/contributing-telemetry.mdx
@@ -15,7 +15,7 @@ To opt out of telemetry, set the `LANGFLOW_DO_NOT_TRACK` or `DO_NOT_TRACK` e
### Run {#2d427dca4f0148ae867997f6789e8bfb}
-- **IsWebhook**: Indicates whether the operation was triggered via a webhook.
+- **IsWebhook**: Indicates whether the operation was triggered with a webhook.
- **Seconds**: Duration in seconds for how long the operation lasted, providing insights into performance.
- **Success**: Boolean value indicating whether the operation was successful, helping identify potential errors or issues.
- **ErrorMessage**: Provides error message details if the operation was unsuccessful, aiding in troubleshooting and enhancements.
diff --git a/docs/docs/Develop/Clients/typescript-client.mdx b/docs/docs/Develop/Clients/typescript-client.mdx
index b00a6fc1f79c..838381a85529 100644
--- a/docs/docs/Develop/Clients/typescript-client.mdx
+++ b/docs/docs/Develop/Clients/typescript-client.mdx
@@ -58,7 +58,7 @@ pnpm add @datastax/langflow-client
Replace `BASE_URL` and `API_KEY` with values from your deployment.
The default Langflow base URL is `http://localhost:7860`.
- To create an API key, see [API keys](/configuration-api-keys).
+ To create an API key, see [API keys and authentication](/api-keys-and-authentication).
## Langflow TypeScript client quickstart
diff --git a/docs/docs/Develop/develop-application.mdx b/docs/docs/Develop/develop-application.mdx
index 3fea84ecddbb..228e625d7b4d 100644
--- a/docs/docs/Develop/develop-application.mdx
+++ b/docs/docs/Develop/develop-application.mdx
@@ -75,7 +75,7 @@ However, if you set an environment variable in both `docker.env` and the Dockerf
For simplicity, the examples in the Langflow documentation might use direct references to API keys and other sensitive values.
In your own applications, you should always follow industry best practices for managing secrets, such as using environment variables or secret management tools.
-For information about generating authentication keys and managing secrets in Langflow, see [Authentication](/configuration-authentication).
+For information about generating authentication keys and managing secrets in Langflow, see [API keys and authentication](/api-keys-and-authentication).
### Storage
@@ -206,7 +206,7 @@ For information about publishing your image on Docker Hub and running a Langflow
"session_id": "charizard_test_request"
}'
```
-
+
About this example
diff --git a/docs/docs/Develop/memory.mdx b/docs/docs/Develop/memory.mdx
index d51ddf21f699..b78d32276760 100644
--- a/docs/docs/Develop/memory.mdx
+++ b/docs/docs/Develop/memory.mdx
@@ -26,7 +26,7 @@ For more information, see [Configure external memory](#configure-external-memory
The following tables are stored in `langflow.db`:
-• **User**: Stores user account information including credentials, permissions, and profiles. For more information, see [Authentication](/configuration-authentication).
+• **User**: Stores user account information including credentials, permissions, and profiles. For more information, see [API keys and authentication](/api-keys-and-authentication).
• **Flow**: Contains flow configurations. For more information, see [Build flows](/concepts-flows).
@@ -34,7 +34,7 @@ The following tables are stored in `langflow.db`:
• **Transaction**: Records execution history and results of flow runs. This information is used for [logging](/logging).
-• **ApiKey**: Manages API authentication keys for users. For more information, see [API keys](/configuration-api-keys).
+• **ApiKey**: Manages API authentication keys for Langflow users. Component API keys are stored in the **Variables** table. For more information, see [API keys and authentication](/api-keys-and-authentication).
• **Project**: Provides a structure for flow storage. For more information, see [Projects](/concepts-flows#projects).
@@ -82,6 +82,8 @@ LANGFLOW_CACHE_TYPE=Async
Alternative caching options can be configured, but options other than the default asynchronous, in-memory cache are not supported.
The default behavior is suitable for most use cases.
+For other options, see [`LANGFLOW_CACHE_TYPE`](/environment-variables#LANGFLOW_CACHE_TYPE).
+
## Store chat memory
Chat-based flows with a **Language Model** or **Agent** component have built-in chat memory that is enabled by default.
diff --git a/docs/docs/Get-Started/get-started-quickstart.mdx b/docs/docs/Get-Started/get-started-quickstart.mdx
index 3ddb4d02cbf6..e86341b1f730 100644
--- a/docs/docs/Get-Started/get-started-quickstart.mdx
+++ b/docs/docs/Get-Started/get-started-quickstart.mdx
@@ -13,7 +13,7 @@ Get started with Langflow by loading a template flow, running it, and then servi
- [Install and start Langflow](/get-started-installation)
- Create an [OpenAI API key](https://platform.openai.com/api-keys)
-- Create a [Langflow API key](/configuration-api-keys)
+- Create a [Langflow API key](/api-keys-and-authentication)
Create a Langflow API key
@@ -553,5 +553,4 @@ payload = {
* [Trigger flows with the Langflow API](/concepts-publish)
* [Use Langflow as a Model Context Protocol (MCP) server](/mcp-server)
* [Containerize a Langflow application](/develop-application)
-* [File management](/concepts-file-management)
-* [Credential management](/configuration-api-keys)
\ No newline at end of file
+* [File management](/concepts-file-management)
\ No newline at end of file
diff --git a/docs/docs/Support/release-notes.mdx b/docs/docs/Support/release-notes.mdx
index 54a13033ea4d..d62552d230ab 100644
--- a/docs/docs/Support/release-notes.mdx
+++ b/docs/docs/Support/release-notes.mdx
@@ -54,7 +54,7 @@ The following updates are included in this version:
To enhance security and ensure proper authentication for automatic login features, most API endpoints now require authentication with a Langflow API key, regardless of the `AUTO_LOGIN` setting.
The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.
- For more information, see [API keys](/configuration-api-keys).
+ For more information, see [API keys and authentication](/api-keys-and-authentication).
- Centralized **Language Model** and **Embedding Model** components
diff --git a/docs/docs/Tutorials/agent.mdx b/docs/docs/Tutorials/agent.mdx
index 2a52cc79a5f0..c7b39cc6af4c 100644
--- a/docs/docs/Tutorials/agent.mdx
+++ b/docs/docs/Tutorials/agent.mdx
@@ -14,7 +14,7 @@ With the agent connected, your application can use any connected tools to retrie
## Prerequisites
* [Install and start Langflow](/get-started-installation)
-* Create a [Langflow API key](/configuration-api-keys)
+* Create a [Langflow API key](/api-keys-and-authentication)
* Install the [Langflow JavaScript client](/typescript-client)
* Create an [OpenAI API key](https://platform.openai.com/api-keys)
@@ -69,7 +69,7 @@ With your flow operational, connect it to a JavaScript application to use the ag
* `LANGFLOW_SERVER_ADDRESS`: Your Langflow server's domain. The default value is `127.0.0.1:7860`. You can get this value from the code snippets on your flow's [**API access** pane](/concepts-publish#api-access).
* `FLOW_ID`: Your flow's UUID or custom endpoint name. You can get this value from the code snippets on your flow's [**API access** pane](/concepts-publish#api-access).
- * `LANGFLOW_API_KEY`: A valid Langflow API key. To create an API key, see [API keys](/configuration-api-keys).
+ * `LANGFLOW_API_KEY`: A valid [Langflow API key](/api-keys-and-authentication).
2. Copy the following script into a JavaScript file, and then replace the placeholders with the information you gathered in the previous step.
If you're using the `customer_orders.csv` example file, you can run this example as-is with the example email address in the code sample.
diff --git a/docs/docs/Tutorials/chat-with-files.mdx b/docs/docs/Tutorials/chat-with-files.mdx
index 1c800bf1ce81..f6519eadb6b7 100644
--- a/docs/docs/Tutorials/chat-with-files.mdx
+++ b/docs/docs/Tutorials/chat-with-files.mdx
@@ -16,7 +16,7 @@ The main focus of this tutorial is to show you how to provide files as input to
## Prerequisites
* [Install and start Langflow](/get-started-installation)
-* Create a [Langflow API key](/configuration-api-keys)
+* Create a [Langflow API key](/api-keys-and-authentication)
* Create an [OpenAI API key](https://platform.openai.com/api-keys)
This tutorial uses an OpenAI LLM. If you want to use a different provider, you need a valid credential for that provider.
@@ -81,7 +81,7 @@ For help with constructing file upload requests in Python, JavaScript, and curl,
* `FILE_COMPONENT_ID`: The UUID of the File component in your flow, such as `File-KZP68`. To find the component ID, open your flow in Langflow, click the File component, and then click **Controls**.
* `CHAT_INPUT`: The message you want to send to the Chat Input of your flow, such as `Evaluate this resume for a job opening in my Marketing department.`
* `FILE_NAME` and `FILE_PATH`: The name and path to the local file that you want to send to your flow.
- * `LANGFLOW_API_KEY`: A valid Langflow API key. To create an API key, see [API keys](/configuration-api-keys).
+ * `LANGFLOW_API_KEY`: A valid [Langflow API key](/api-keys-and-authentication).
2. Copy the following script into a Python file, and then replace the placeholders with the information you gathered in the previous step:
diff --git a/docs/docs/Tutorials/chat-with-rag.mdx b/docs/docs/Tutorials/chat-with-rag.mdx
index 8e2852ea57a1..dec329a08c37 100644
--- a/docs/docs/Tutorials/chat-with-rag.mdx
+++ b/docs/docs/Tutorials/chat-with-rag.mdx
@@ -12,7 +12,7 @@ This tutorial demonstrates how you can use Langflow to create a chatbot applicat
## Prerequisites
* [Install and start Langflow](/get-started-installation)
-* Create a [Langflow API key](/configuration-api-keys)
+* Create a [Langflow API key](/api-keys-and-authentication)
* Create an [OpenAI API key](https://platform.openai.com/api-keys)
* Install the [Langflow JavaScript client](/typescript-client)
* Be familiar with vector search concepts and applications, such as [vector databases](https://www.datastax.com/guides/what-is-a-vector-database) and [RAG](https://www.datastax.com/guides/what-is-retrieval-augmented-generation)
@@ -132,7 +132,7 @@ This tutorial uses JavaScript for demonstration purposes.
* `LANGFLOW_SERVER_ADDRESS`: Your Langflow server's domain. The default value is `127.0.0.1:7860`. You can get this value from the code snippets on your flow's [**API access** pane](/concepts-publish#api-access).
* `FLOW_ID`: Your flow's UUID or custom endpoint name. You can get this value from the code snippets on your flow's [**API access** pane](/concepts-publish#api-access).
- * `LANGFLOW_API_KEY`: A valid Langflow API key. To create an API key, see [API keys](/configuration-api-keys).
+ * `LANGFLOW_API_KEY`: A valid [Langflow API key](/api-keys-and-authentication).
2. Copy the following script into a JavaScript file, and then replace the placeholders with the information you gathered in the previous step:
diff --git a/docs/docs/Tutorials/mcp-tutorial.mdx b/docs/docs/Tutorials/mcp-tutorial.mdx
index 1bc7d83ee4fd..92fca8700d16 100644
--- a/docs/docs/Tutorials/mcp-tutorial.mdx
+++ b/docs/docs/Tutorials/mcp-tutorial.mdx
@@ -26,7 +26,7 @@ In this tutorial, you will use the Langflow **MCP Tools** component to connect m
## Prerequisites
* [Install and start Langflow](/get-started-installation)
-* Create a [Langflow API key](/configuration-api-keys)
+* Create a [Langflow API key](/api-keys-and-authentication)
* Create an [OpenAI API key](https://platform.openai.com/api-keys)
This tutorial uses an OpenAI LLM. If you want to use a different provider, you need a valid credential for that provider.
@@ -216,7 +216,7 @@ You can use the same input or a new input that prompts the agent to use other to
* `LANGFLOW_SERVER_ADDRESS`: Your Langflow server's domain. The default value is `127.0.0.1:7860`. You can get this value from the code snippets on your flow's [**API access** pane](/concepts-publish#api-access).
* `FLOW_ID`: Your flow's UUID or custom endpoint name. You can get this value from the code snippets on your flow's [**API access** pane](/concepts-publish#api-access).
- * `LANGFLOW_API_KEY`: A valid Langflow API key. To create an API key, see [API keys](/configuration-api-keys).
+ * `LANGFLOW_API_KEY`: A valid [Langflow API key](/api-keys-and-authentication).
2. Copy the following script into a Python file, and then replace the placeholders with the information you gathered in the previous step:
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js
index 819201d945ed..ca1748a93c16 100644
--- a/docs/docusaurus.config.js
+++ b/docs/docusaurus.config.js
@@ -256,8 +256,10 @@ const config = {
from: "/components-rag",
},
{
- to: "/configuration-authentication",
+ to: "/api-keys-and-authentication",
from: [
+ "/configuration-api-keys",
+ "/configuration-authentication",
"/configuration-security-best-practices",
"/Configuration/configuration-security-best-practices",
],
diff --git a/docs/sidebars.js b/docs/sidebars.js
index 35dcad369281..a99c8649fd81 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -110,13 +110,8 @@ module.exports = {
type: "category",
label: "Develop",
items: [
- {
- type: "doc",
- id: "Develop/install-custom-dependencies",
- label: "Install custom dependencies"
- },
- "Configuration/configuration-api-keys",
- "Configuration/configuration-authentication",
+ "Configuration/api-keys-and-authentication",
+ "Develop/install-custom-dependencies",
"Configuration/configuration-global-variables",
"Configuration/environment-variables",
{
@@ -502,4 +497,4 @@ module.exports = {
`,
},
],
-};
\ No newline at end of file
+};