diff --git a/docs/css/custom.css b/docs/css/custom.css
index d098bfe7a4..c132825675 100644
--- a/docs/css/custom.css
+++ b/docs/css/custom.css
@@ -480,4 +480,79 @@ body {
.DocSearch-Search-Icon {
color: var(--ifm-color-emphasis-500) !important;
size: 16px !important;
+}
+
+/* Table Styling */
+.markdown table {
+ width: 100%;
+ border-collapse: collapse;
+ border-radius: var(--ifm-global-radius);
+ border: var(--ifm-table-border-width) solid var(--ifm-table-border-color);
+ font-size: 1rem;
+ margin: 1.5rem 0;
+ overflow: scroll;
+ scrollbar-width: none;
+ table-layout: fixed;
+}
+
+/* Table header */
+.markdown table thead th {
+ background-color: var(--ifm-color-emphasis-100);
+ padding: .5rem;
+ text-align: left;
+ font-weight: 600;
+ border-bottom: var(--ifm-table-border-width) solid var(--ifm-table-border-color);
+ border-top: none;
+ border-left: none;
+}
+
+.markdown table thead tr {
+ border: none;
+}
+
+.markdown table thead th:last-child {
+ border: none;
+}
+
+/* Table body */
+.markdown table td {
+ padding: .6rem;
+ vertical-align: top;
+ border-right: var(--ifm-table-border-width) solid var(--ifm-table-border-color);
+ border-left: none;
+ word-wrap: break-word;
+ overflow-wrap: break-word;
+}
+
+.markdown table td:last-child {
+ border: none;
+}
+
+/* Fixed column widths for consistent sizing */
+.markdown table th,
+.markdown table td {
+ width: 20%;
+}
+
+.markdown table th:last-child,
+.markdown table td:last-child {
+ width: auto; /* Final column */
+}
+
+/* Consistent row heights */
+.markdown table tbody tr {
+ height: auto;
+ min-height: 2.2rem;
+}
+
+.markdown table tbody tr:last-child td {
+ border-bottom: none;
+}
+
+/* Code elements in tables */
+.markdown table code {
+ background-color: var(--ifm-color-emphasis-100);
+ border-radius: 4px;
+ padding: 0.1rem 0.3rem;
+ font-family: var(--ifm-font-family-monospace);
}
\ No newline at end of file
diff --git a/docs/docs/Concepts/concepts-file-management.mdx b/docs/docs/Concepts/concepts-file-management.mdx
index ca304408f8..28cf632524 100644
--- a/docs/docs/Concepts/concepts-file-management.mdx
+++ b/docs/docs/Concepts/concepts-file-management.mdx
@@ -59,7 +59,7 @@ To enable file input in your flow, do the following:
2. Click **Share**, select **API access**, and then click **Input Schema** to add [`tweaks`](/concepts-publish#input-schema) to the request payload in the flow's automatically generated code snippets.
3. Expand the **File** section, find the **Files** row, and then enable **Expose Input** to allow the parameter to be set at runtime through the Langflow API.
4. Close the **Input Schema** pane to return to the **API access** pane.
-The payload in each code snippet now includes `tweaks`, your **File** component's ID, and the `path` key that you enabled in **Input Schema**:
+The payload in each code snippet now includes `tweaks` with your **File** component's ID and the `path` key that you enabled in **Input Schema**:
```json
"tweaks": {
@@ -123,6 +123,15 @@ For videos, see the **Twelve Labs** and **YouTube** [bundles](/components-bundle
By default, the maximum file size is 100 MB.
To modify this value, change the `--max-file-size-upload` [environment variable](/environment-variables).
+## File management configuration
+
+You can configure file management behavior using the following [environment variables](/environment-variables):
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `LANGFLOW_MAX_FILE_SIZE_UPLOAD` | Integer | `100` | Set the maximum file size for the upload in megabytes. |
+| `LANGFLOW_STORAGE_TYPE` | String | `local` | Type of storage to use for file uploads and data. |
+
## See also
* [**Data** components](/components-data)
diff --git a/docs/docs/Concepts/mcp-server.mdx b/docs/docs/Concepts/mcp-server.mdx
index b591069b90..b462adc709 100644
--- a/docs/docs/Concepts/mcp-server.mdx
+++ b/docs/docs/Concepts/mcp-server.mdx
@@ -325,5 +325,6 @@ If Claude for Desktop isn't using your server's tools correctly, you may need to
## See also
-- [Use Langflow as an MCP client](/mcp-client)
-- [Use a DataStax Astra DB MCP server](/mcp-component-astra)
\ No newline at end of file
+* [Use Langflow as an MCP client](/mcp-client)
+* [Use a DataStax Astra DB MCP server](/mcp-component-astra)
+* [MCP server environment variables](/environment-variables#mcp)
\ No newline at end of file
diff --git a/docs/docs/Configuration/configuration-global-variables.mdx b/docs/docs/Configuration/configuration-global-variables.mdx
index 2b8977a8f5..30d6c5b7d1 100644
--- a/docs/docs/Configuration/configuration-global-variables.mdx
+++ b/docs/docs/Configuration/configuration-global-variables.mdx
@@ -6,12 +6,15 @@ slug: /configuration-global-variables
import Icon from "@site/src/components/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
+import EnvGlobalVars from '@site/docs/_partial-env-global-vars.mdx';
Global variables let you store and reuse generic input values and credentials across your [Langflow projects](/concepts-flows#projects).
You can use a global variable in any text input field that displays the **Globe** icon.
Langflow stores global variables in its internal database, and encrypts the values using a secret key.
+
+
## Create a global variable
To create a new global variable, follow these steps.
@@ -31,6 +34,7 @@ To create a new global variable, follow these steps.
* Global variables of the **Credential** type are hidden in the visual editor and entered in a password-style input field that masks the value. This type isn't allowed in session ID fields where the value is exposed.
All default environment variables and variables sourced from the environment using `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` are automatically set as **Credential** type.
+ For more information, see [Default environment variables](#default-environment-variables).
6. Enter the **Value** for your global variable.
@@ -54,9 +58,8 @@ You can now select your global variable from any text input field that displays
## Delete a global variable
-:::warning
-Deleting a global variable permanently deletes any references to it from all flows in your Langflow projects.
-:::
+Deleting a global variable permanently deletes the value from the database.
+Flows that reference the deleted global variable will fail.
1. In the Langflow header, click your profile icon, and then select **Settings**.
@@ -66,11 +69,11 @@ Deleting a global variable permanently deletes any references to it from all flo
4. Click **Delete**.
-The global variable, and any existing references to it, are deleted.
+The global variable is deleted from the database.
## Add custom global variables from the environment
-You can use the `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` environment variable to source custom global variables from your runtime environment.
+You can use the `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` [environment variable](/environment-variables#global-variables-and-environment-integration) to source custom global variables from your runtime environment.
All global variables sourced from the environment are automatically set as **Credential** type global variables.
Langflow's [default global variables](#default-environment-variables) are already included in this list and are automatically sourced when detected.
@@ -95,20 +98,25 @@ If you installed Langflow locally, you must define the `LANGFLOW_VARIABLES_TO_GE
LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=["VARIABLE1", "VARIABLE2"]
```
- Replace `VARIABLE1,VARIABLE2` with your additional variables that you want Langflow to source from the environment, such as `my_key,some_string` or `["my_key", "some_string"]`.
- These are added to the default list of variables that Langflow already monitors.
+ Replace `VARIABLE1,VARIABLE2` with your additional variables that you want Langflow to source from the environment, such as `CUSTOM_API_KEY,INTERNAL_SERVICE_URL` or `["CUSTOM_API_KEY", "INTERNAL_SERVICE_URL"]`.
+ These are added to the [default list of variables](#default-environment-variables) that Langflow already monitors, which includes common API keys like `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, and `GOOGLE_API_KEY`.
3. Save and close the file.
4. Start Langflow with the `.env` file:
```bash
- VARIABLE1="VALUE1" VARIABLE2="VALUE2" python -m langflow run --env-file .env
+ uv run langflow run --env-file .env
```
- In this example, the environment variables (`VARIABLE1="VALUE1"` and `VARIABLE2="VALUE2"`) are prefixed to the startup command.
- This is a rudimentary method for exposing environment variables to Python on the command line, and is meant for illustrative purposes.
- Make sure to expose your environment variables to Langflow in a manner that best suits your own environment.
+ Alternatively, you can set environment variables directly in the command line:
+
+ ```bash
+ VARIABLE1="VALUE1" VARIABLE2="VALUE2" uv run langflow run --env-file .env
+ ```
+
+ The command-line variables will override any values in the `.env` file.
+ Expose your environment variables to Langflow in a manner that best suits your own environment.
5. Confirm that Langflow successfully sourced the global variables from the environment:
@@ -146,7 +154,6 @@ docker run -it --rm \
-:::info
When adding global variables from the environment, the following limitations apply:
- You can only source the **Name** and **Value** from the environment.
@@ -154,42 +161,27 @@ When adding global variables from the environment, the following limitations app
To add additional parameters, such as the **Apply To Fields** parameter, you must edit the global variables in your Langflow **Settings**.
- Global variables that you add from the environment always have the **Credential** type.
-:::
+
+## Disallow global variables from the environment
If you want to explicitly prevent Langflow from sourcing global variables from the environment, set `LANGFLOW_STORE_ENVIRONMENT_VARIABLES=False` in your `.env` file.
-If you want to automatically set fallback values for your global variables from environment variables, set `LANGFLOW_FALLBACK_FROM_ENV_VAR=True` in your `.env` file. When this setting is enabled, if a global variable isn't found, Langflow attempts to use an environment variable with the same name as a backup.
+## Use environment variables for missing global variables
-## Default environment variables
+If you want to automatically set fallback values for your global variables to environment variables, set `LANGFLOW_FALLBACK_TO_ENV_VAR=True` in your `.env` file. When this setting is enabled, if a global variable isn't found, Langflow attempts to use an environment variable with the same name as a backup.
-Langflow automatically detects and converts some environment variables into global variables of the type **Credential**, which are applied to the specific fields in components that require them. Currently, the following variables are supported:
+## Global variables automatically set by environment variables {#default-environment-variables}
-- `ANTHROPIC_API_KEY`
-- `ASTRA_DB_API_ENDPOINT`
-- `ASTRA_DB_APPLICATION_TOKEN`
-- `AWS_ACCESS_KEY_ID`
-- `AWS_SECRET_ACCESS_KEY`
-- `AZURE_OPENAI_API_DEPLOYMENT_NAME`
-- `AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME`
-- `AZURE_OPENAI_API_INSTANCE_NAME`
-- `AZURE_OPENAI_API_KEY`
-- `AZURE_OPENAI_API_VERSION`
-- `COHERE_API_KEY`
-- `COMPOSIO_API_KEY`
-- `GOOGLE_API_KEY`
-- `GROQ_API_KEY`
-- `HUGGINGFACEHUB_API_TOKEN`
-- `NOVITA_API_KEY`
-- `OPENAI_API_KEY`
-- `PINECONE_API_KEY`
-- `SAMBANOVA_API_KEY`
-- `SEARCHAPI_API_KEY`
-- `SERPAPI_API_KEY`
-- `TAVILY_API_KEY`
-- `UPSTASH_VECTOR_REST_TOKEN`
-- `UPSTASH_VECTOR_REST_URL`
-- `VECTARA_API_KEY`
-- `VECTARA_CORPUS_ID`
-- `VECTARA_CUSTOMER_ID`
+Langflow automatically detects and converts some environment variables into global variables of the type **Credential**, which are applied to the specific fields in components that require them.
-For information about other environment variables and their usage, see [Environment Variables](/environment-variables).
\ No newline at end of file
+The supported variables are listed in [constants.py](https://github.com/langflow-ai/langflow/blob/main/src/lfx/src/lfx/services/settings/constants.py).
+
+## Configure global variable and environment variable handling
+
+These environment variables configure how Langflow handles the relationship between environment variables and global variables.
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `LANGFLOW_STORE_ENVIRONMENT_VARIABLES` | Boolean | True | Whether to store environment variables as [global variables](/configuration-global-variables) in the database. |
+| `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_FALLBACK_TO_ENV_VAR` | Boolean | True | If enabled, [global variables](/configuration-global-variables) set in your Langflow **Settings** can use an environment variable with the same name if Langflow can't retrieve the variable value from the global variables. |
\ No newline at end of file
diff --git a/docs/docs/Configuration/environment-variables.mdx b/docs/docs/Configuration/environment-variables.mdx
index be1e605e8e..9b50e9cdec 100644
--- a/docs/docs/Configuration/environment-variables.mdx
+++ b/docs/docs/Configuration/environment-variables.mdx
@@ -6,12 +6,15 @@ slug: /environment-variables
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Link from '@docusaurus/Link';
+import EnvGlobalVars from '@site/docs/_partial-env-global-vars.mdx';
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.
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:
@@ -22,9 +25,9 @@ If an environment variable is set in multiple places, the following hierarchy ap
When running a Langflow Docker image, the `-e` flag sets system environment variables.
-For example:
-- If you set `LANGFLOW_PORT=8080` in your system environment and `LANGFLOW_PORT=7860` in `.env`, Langflow uses `7860` from `.env`.
-- If you run `langflow run --port 9000` with `LANGFLOW_PORT=7860` in `.env`, Langflow uses `9000` from the CLI option.
+ For example:
+ * If you set `LANGFLOW_PORT=8080` in your system environment and `LANGFLOW_PORT=7860` in `.env`, Langflow uses `7860` from `.env`.
+ * If you run `langflow run --port 9000` with `LANGFLOW_PORT=7860` in `.env`, Langflow uses `9000` from the CLI option.
## Configure environment variables
@@ -39,7 +42,6 @@ However, environment variables imported from a `.env` file take [precedence](#pr
### Set environment variables in your terminal {#configure-variables-terminal}
-
Run the following commands to set environment variables for your current terminal session:
@@ -123,7 +125,7 @@ If it detects a supported environment variable, then it automatically adopts the
```bash
- python -m langflow run --env-file .env
+ uv run langflow run --env-file .env
```
@@ -145,61 +147,150 @@ On startup, Langflow imports the environment variables from your `.env` file, as
## Supported environment variables {#supported-variables}
-The following table lists the environment variables supported by Langflow.
+The following tables list the environment variables supported by Langflow.
+
+### Authentication and security
| Variable | Format | Default | Description |
|----------|--------|---------|-------------|
-| `DO_NOT_TRACK` | Boolean | False | Whether to report [Langflow telemetry data](/contributing-telemetry). If true, Langflow telemetry is disabled. |
-| `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. |
-| `LANGFLOW_AUTO_SAVING_INTERVAL` | Integer | `1000` | Set the interval for flow auto-saving in milliseconds. |
-| `LANGFLOW_BACKEND_ONLY` | Boolean | False | Run only the Langflow backend service (no frontend). |
-| `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's internal caching system. For detailed cache configuration options, see [Configure cache memory](/memory#configure-cache-memory). |
-| `LANGFLOW_COMPONENTS_PATH` | String | Not set | Path to the directory containing custom components. |
-| `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_AUTO_LOGIN` | Boolean | True | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
+| `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` | Boolean | True | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
+| `LANGFLOW_SECRET_KEY` | String | Automated | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
+| `LANGFLOW_SUPERUSER` | String | `langflow` | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
+| `LANGFLOW_SUPERUSER_PASSWORD` | String | `langflow` | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
+| `LANGFLOW_ENABLE_SUPERUSER_CLI` | Boolean | True | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
+| `LANGFLOW_NEW_USER_IS_ACTIVE` | Boolean | False | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
+| `LANGFLOW_REMOVE_API_KEYS` | Boolean | False | When `true`, automatically removes API keys and tokens from flow data before saving to the database. Fields that contain `api`, `key`, or `token` in their names AND are marked as password fields will have their values set to `null`. This prevents credentials from being stored in the database. |
+| `LANGFLOW_DISABLE_TRACK_APIKEY_USAGE` | Boolean | False | Whether to track API key usage. If true, disables tracking of API key usage (`total_uses` and `last_used_at`) to avoid database contention under high concurrency. |
+| `LANGFLOW_WEBHOOK_AUTH_ENABLE` | Boolean | False | Enable API key authentication for webhook endpoints. If false, webhooks run as flow owner without authentication. |
+
+For detailed information about authentication configuration, see [API keys and authentication](/api-keys-and-authentication).
+
+### Caching configuration
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `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`. See also [`langflow run`](/configuration-cli#langflow-run). |
+| `LANGFLOW_LANGCHAIN_CACHE` | String | `InMemoryCache` | Type of cache storage to use, separate from `LANGFLOW_CACHE_TYPE`. Possible values: `InMemoryCache`, `SQLiteCache`. See [Cache configuration](/memory#configure-cache-memory). |
+| `LANGFLOW_REDIS_HOST` | String | `localhost` | Redis host for cache. See `LANGFLOW_CACHE_TYPE`. |
+| `LANGFLOW_REDIS_PORT` | String | `6379` | Redis port for cache. See `LANGFLOW_CACHE_TYPE`. |
+| `LANGFLOW_REDIS_DB` | Integer | `0` | Redis database number for cache. See `LANGFLOW_CACHE_TYPE`. |
+| `LANGFLOW_REDIS_PASSWORD` | String | Not set | Password for Redis authentication when using Redis cache type. |
+| `LANGFLOW_REDIS_CACHE_EXPIRE` | Integer | `3600` | Cache expiration time in seconds. See `LANGFLOW_CACHE_TYPE`. |
+
+For detailed information about cache configuration, see [Memory management options](/memory#configure-cache-memory).
+
+### Database configuration
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `LANGFLOW_DATABASE_URL` | String | Not set | Set the database URL for Langflow. If not provided, Langflow uses a SQLite database. See [Database configuration](/memory#configure-external-memory). |
| `LANGFLOW_DATABASE_CONNECTION_RETRY` | Boolean | False | Whether to retry lost connections to the Langflow database. If true, Langflow tries to connect to the database again if the connection fails. |
+| `LANGFLOW_DB_CONNECT_TIMEOUT` | Integer | `30` | 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": 20, "max_overflow": 30}`. See [Database configuration](/memory#configure-the-external-database-connection). |
| `LANGFLOW_DB_POOL_SIZE` | Integer | `20` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to keep open in the connection pool. |
| `LANGFLOW_DB_MAX_OVERFLOW` | Integer | `30` | **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 | `30` | 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": 20, "max_overflow": 30}` |
-| `LANGFLOW_DISABLE_TRACK_APIKEY_USAGE` | Boolean | False | Whether to track API key usage. If true, disables tracking of API key usage (`total_uses` and `last_used_at`) to avoid database contention under high concurrency. |
-| `LANGFLOW_ENABLE_SUPERUSER_CLI` | Boolean | True | Allow creation of superusers with the Langflow CLI command [`langflow superuser`](./configuration-cli.mdx#langflow-superuser). Recommended to be disabled (false) in production for security reasons. |
-| `LANGFLOW_FALLBACK_TO_ENV_VAR` | Boolean | True | If enabled, [global variables](/configuration-global-variables) set in your Langflow **Settings** can use an environment variable with the same name if Langflow can't retrieve the variable value from the global variables. |
+| `LANGFLOW_SAVE_DB_IN_CONFIG_DIR` | Boolean | False | If false (default), the Langflow database is saved in the `langflow` root directory. This means the database isn't shared between different virtual environments, and the database is deleted when you uninstall Langflow. If true, the database is saved in the `LANGFLOW_CONFIG_DIR`. |
+| `LANGFLOW_USE_NOOP_DATABASE` | Boolean | False | If true, disables all database operations and uses a no-op session. Useful for testing. |
+
+For detailed information about database configuration, see [Memory management options](/memory).
+
+### File and data management
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `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_COMPONENTS_PATH` | String | Not set | Path to the directory containing custom components. |
| `LANGFLOW_FRONTEND_PATH` | String | `./frontend` | Path to the frontend directory containing build files. This is for development purposes only. See [`langflow run`](/configuration-cli#langflow-run). |
-| `LANGFLOW_HEALTH_CHECK_MAX_RETRIES` | Integer | `5` | Set the maximum number of retries for the health check. See [`langflow run`](/configuration-cli#langflow-run). |
-| `LANGFLOW_HOST` | String | `localhost` | The host on which the Langflow server will run. See [`langflow run`](/configuration-cli#langflow-run). |
-| `LANGFLOW_LANGCHAIN_CACHE` | String | `InMemoryCache` | Set the cache type for Langchain's caching system. For detailed cache configuration options, see [Configure cache memory](/memory#configure-cache-memory). |
-| `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 isn't 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 [`langflow run`](/configuration-cli#langflow-run). |
| `LANGFLOW_MAX_ITEMS_LENGTH` | Integer | `100` | Maximum number of items to store and display in the visual editor. Lists longer than this will be truncated when displayed in the visual editor. Doesn't affect data passed between components nor outputs. |
| `LANGFLOW_MAX_TEXT_LENGTH` | Integer | `1000` | Maximum number of characters to store and display in the visual editor. Responses longer than this will be truncated when displayed in the visual editor. Doesn't truncate responses between components nor outputs. |
-| `LANGFLOW_MCP_SERVER_ENABLED` | Boolean | True | If this option is set to False, Langflow doesn't 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. |
-| `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. |
-| `LANGFLOW_PROMETHEUS_ENABLED` | Boolean | False | Expose Prometheus metrics. |
-| `LANGFLOW_PROMETHEUS_PORT` | Integer | `9090` | Set the port on which Langflow exposes Prometheus metrics. |
-| `LANGFLOW_REMOVE_API_KEYS` | Boolean | False | Remove API keys from the projects saved in the database. |
-| `LANGFLOW_SAVE_DB_IN_CONFIG_DIR` | Boolean | False | If false (default), the Langflow database is saved in the `langflow` root directory. This means the database isn't shared between different virtual environments, and the database is deleted when you uninstall Langflow. If true, the database is saved in the `LANGFLOW_CONFIG_DIR`. |
-| `LANGFLOW_SECRET_KEY` | String | Automated | See [`LANGFLOW_SECRET_KEY`](/api-keys-and-authentication#langflow-secret-key). |
-| `LANGFLOW_STORE` | Boolean | True | Whether to enable the Langflow Store features. |
-| `LANGFLOW_STORE_ENVIRONMENT_VARIABLES` | Boolean | True | Whether to store environment variables as [global variables](/configuration-global-variables) in the database. |
+| `LANGFLOW_STORAGE_TYPE` | String | `local` | Type of storage to use for file uploads and data. |
+| `LANGFLOW_MAX_TRANSACTIONS_TO_KEEP` | Integer | `3000` | Maximum number of transactions to keep in the database. |
+| `LANGFLOW_MAX_VERTEX_BUILDS_TO_KEEP` | Integer | `3000` | Maximum number of vertex builds to keep in the database. |
+| `LANGFLOW_MAX_VERTEX_BUILDS_PER_VERTEX` | Integer | `2` | Maximum number of builds to keep per vertex. Older builds will be deleted. |
+
+### Flow and project management
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `LANGFLOW_AUTO_SAVING` | Boolean | True | Enable flow auto-saving. |
+| `LANGFLOW_AUTO_SAVING_INTERVAL` | Integer | `1000` | Set the interval for flow auto-saving in milliseconds. |
+| `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_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_CREATE_STARTER_PROJECTS` | Boolean | True | Whether to create templates during initialization. If false, Langflow doesn't create templates, and `LANGFLOW_UPDATE_STARTER_PROJECTS` is treated as false. |
| `LANGFLOW_UPDATE_STARTER_PROJECTS` | Boolean | True | Whether to update templates with the latest component versions when initializing after an upgrade. |
-| `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. |
+| `LANGFLOW_LAZY_LOAD_COMPONENTS` | Boolean | False | If true, Langflow only partially loads components at startup and fully loads them on demand. This significantly reduces startup time but may cause a slight delay when a component is first used. |
+| `LANGFLOW_EVENT_DELIVERY` | String | `streaming` | How to deliver build events to the frontend. Can be 'polling', 'streaming' or 'direct'. |
+
+### Global variables and environment variables interaction
+
+For detailed information about how global and environment variables interact, see [Global variables](/configuration-global-variables).
+
+### Logging configuration {#logging}
+
+For detailed information about logging configuration, including environment variables, see [Configure log options](/logging#configure-log-options).
+
+### MCP (Model Context Protocol) {#mcp}
+
+The following environment variables set behaviors related to your Langflow projects' MCP servers.
+For detailed information about MCP server configuration, see [Use Langflow as an MCP server](/mcp-server#mcp-server-configuration).
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `LANGFLOW_MCP_SERVER_ENABLED` | Boolean | True | If this option is set to False, Langflow doesn't 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_MCP_SERVER_TIMEOUT` | Integer | `20` | The number of seconds to wait before timing out MCP server operations. |
+| `LANGFLOW_MCP_MAX_SESSIONS_PER_SERVER` | Integer | `10` | Maximum number of MCP sessions to keep per unique server. |
+
+### Monitoring and metrics
+
+For environment variables for specific monitoring service providers, see the Langflow monitoring integration guides, such as [Langfuse](/integrations-langfuse).
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `LANGFLOW_PROMETHEUS_ENABLED` | Boolean | False | Expose Prometheus metrics. |
+| `LANGFLOW_PROMETHEUS_PORT` | Integer | `9090` | Set the port on which Langflow exposes Prometheus metrics. |
+
+### Other environment variables
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `LANGFLOW_STORE` | Boolean | True | Whether to enable the Langflow Store features. |
+| `LANGFLOW_STORE_URL` | String | `https://api.langflow.store` | URL for the Langflow Store API. |
+| `LANGFLOW_DOWNLOAD_WEBHOOK_URL` | String | Not set | Webhook URL for download events. |
+| `LANGFLOW_LIKE_WEBHOOK_URL` | String | Not set | Webhook URL for like events. |
+| `LANGFLOW_DEV` | Boolean | False | Enable development mode. |
+| `LANGFLOW_DEACTIVATE_TRACING` | Boolean | False | Deactivate tracing functionality. |
+| `LANGFLOW_CELERY_ENABLED` | Boolean | False | Enable Celery for distributed task processing. |
+
+### Public flow settings
+
+Public flows are flows that are exposed in shared Langflow playgrounds.
+For detailed information about shared Playground configuration, see [Share a flow's Playground](/concepts-playground#share-a-flows-playground).
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `LANGFLOW_PUBLIC_FLOW_CLEANUP_INTERVAL` | Integer | `3600` | The interval in seconds at which public temporary flows will be cleaned up. Default is 1 hour (3600 seconds). Minimum is 600 seconds (10 minutes). |
+| `LANGFLOW_PUBLIC_FLOW_EXPIRATION` | Integer | `86400` | The time in seconds after which a public temporary flow will be considered expired and eligible for cleanup. Default is 24 hours (86400 seconds). Minimum is 600 seconds (10 minutes). |
+
+### Server configuration
+
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `LANGFLOW_HOST` | String | `localhost` | The host on which the Langflow server will run. See [`langflow run`](/configuration-cli#langflow-run). |
+| `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. |
+| `LANGFLOW_BACKEND_ONLY` | Boolean | False | Run only the Langflow backend service (no frontend). |
+| `LANGFLOW_OPEN_BROWSER` | Boolean | False | Open the system web browser on startup. |
+| `LANGFLOW_HEALTH_CHECK_MAX_RETRIES` | Integer | `5` | Set the maximum number of retries for the health check. See [`langflow run`](/configuration-cli#langflow-run). |
| `LANGFLOW_WORKERS` | Integer | `1` | Number of worker processes. |
+| `LANGFLOW_WORKER_TIMEOUT` | Integer | `300` | Worker timeout in seconds. |
| `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). |
+
+### Telemetry
+
+For telemetry configuration options, see [Telemetry](/contributing-telemetry).
## Configure .env, override.conf, and tasks.json files
diff --git a/docs/docs/Develop/logging.mdx b/docs/docs/Develop/logging.mdx
index f73ec30081..4b7d68a67f 100644
--- a/docs/docs/Develop/logging.mdx
+++ b/docs/docs/Develop/logging.mdx
@@ -31,22 +31,17 @@ Use [Langflow environment variables](/environment-variables) to configure loggin
The following environment variables are available to configure logging:
-* `LANGFLOW_LOG_LEVEL`: Sets the log level as one of `DEBUG`, `ERROR` (default), `INFO`, `WARNING`, and `CRITICAL`. For example, `LANGFLOW_LOG_LEVEL=DEBUG`.
+### Logging environment variables
-* `LANGFLOW_LOG_FILE`: Sets the log file storage location if you want to use a non-default location.
-For example, `LANGFLOW_LOG_FILE=path/to/logfile.log`.
-
-* `LANGFLOW_LOG_ENV`: Controls log output and formatting.
-
- * `LANGFLOW_LOG_ENV=container`: Outputs serialized JSON to stdout.
- * `LANGFLOW_LOG_ENV=container_csv`: Outputs CSV-formatted plain text to stdout.
- * `LANGFLOW_LOG_ENV=default` or unset: Outputs prettified output with [RichHandler](https://rich.readthedocs.io/en/stable/reference/logging.html).
-
-* `LANGFLOW_LOG_ROTATION` controls when the log file is rotated, either based on time or file size. By default, logs are rotated every 1 day.
-
- * Time-based rotation: "1 day", "12 hours", "1 week"
- * Size-based rotation: "10 MB", "1 GB"
- * Disable rotation: "None" (log files will grow without limit)
+| Variable | Format | Default | Description |
+|----------|--------|---------|-------------|
+| `LANGFLOW_LOG_LEVEL` | String | `ERROR` | Sets the log level as one of `DEBUG`, `ERROR`, `INFO`, `WARNING`, and `CRITICAL`. For example, `LANGFLOW_LOG_LEVEL=DEBUG`. |
+| `LANGFLOW_LOG_FILE` | String | Not set | Sets the log file storage location if you want to use a non-default location. For example, `LANGFLOW_LOG_FILE=path/to/logfile.log`. If this option isn't set, logs are written to stdout. |
+| `LANGFLOW_LOG_ENV` | String | `default` | Controls how logs are formatted and displayed. `container`: JSON format for Docker/structured logging. `container_csv`: CSV format for data analysis. `default` or unset: Pretty, colorful format for development/reading using [RichHandler](https://rich.readthedocs.io/en/stable/reference/logging.html). |
+| `LANGFLOW_LOG_ROTATION` | String | `1 day` | Controls when the log file is rotated, either based on time or file size. Time-based rotation: "1 day", "12 hours", "1 week". Size-based rotation: "10 MB", "1 GB". Disable rotation: "None" (log files will grow without limit). |
+| `LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE` | Integer | `10000` | Set the buffer size for log retrieval. Only used if `LANGFLOW_ENABLE_LOG_RETRIEVAL` is enabled. |
+| `LANGFLOW_LOG_FORMAT` | String | Not set | Set the log format configuration. |
+| `LANGFLOW_PRETTY_LOGS` | Boolean | True | Enable pretty log formatting with colors and rich console output. |
A complete example `.env` file is available in the [Langflow repository](https://github.com/langflow-ai/langflow/blob/main/.env.example).
@@ -135,6 +130,7 @@ Follow the steps for your operating system.
You can use the log file to investigate the issue on your own, add context to a [GitHub Issue](/contributing-github-issues), or send it to [support](/luna-for-langflow) for debugging assistance.
The log file is only created when Langflow Desktop runs. If you don't see a log file, try starting Langflow Desktop first, then check for the log file.
+
## See also
* [Memory management options](/memory)
diff --git a/docs/docs/_partial-env-global-vars.mdx b/docs/docs/_partial-env-global-vars.mdx
new file mode 100644
index 0000000000..79733640d2
--- /dev/null
+++ b/docs/docs/_partial-env-global-vars.mdx
@@ -0,0 +1,10 @@
+
+Environment variables versus global variables
+
+[Environment variables](/environment-variables) like `LANGFLOW_PORT` or `LANGFLOW_LOG_LEVEL` configure how Langflow runs, while [global variables](/configuration-global-variables) are user-defined values stored in Langflow's database for reuse across flows, like `OPENAI_API_KEY`.
+
+Some environment variables are automatically converted to global variables when Langflow starts. For more information, see [Default environment variables](/configuration-global-variables#default-environment-variables).
+
+To add custom global variables, see [Add custom global variables from the environment](/configuration-global-variables#add-custom-global-variables-from-the-environment).
+
+
\ No newline at end of file