环境变量
Langflow 允许您使用环境变量配置多项设置。
配置环境变量
Langflow 从以下来源识别支持的环境变量:
- 您在终端中设置的环境变量。
- 您使用 Langflow CLI 中的
--env-file
选项从.env
文件导入的环境变量。
您可以选择专门使用一个来源,或者将两个来源一起使用。
如果您选择将两个来源一起使用,请注意从 .env
文件导入的环境变量比您在终端中设置的环境变量具有更高的优先级。
在终端中设置环境变量
运行以下命令为当前终端会话设置环境变量:
- Linux or macOS
- Windows
- Docker
_10export VARIABLE_NAME='VALUE'
_10set VARIABLE_NAME='VALUE'
_10docker run -it --rm \_10 -p 7860:7860 \_10 -e VARIABLE_NAME='VALUE' \_10 langflowai/langflow:latest
当您启动 Langflow 时,它会查找您在终端中设置的环境变量。 如果它检测到支持的环境变量,则会自动采用指定的值,遵循优先级规则。
从 .env 文件导入环境变量
-
如果 Langflow 正在运行,请退出 Langflow。
-
创建
.env
文件,然后在您首选 的编辑器中打开它。 -
在
.env
文件中定义 Langflow 环境变量。例如:_30DO_NOT_TRACK=true_30LANGFLOW_AUTO_LOGIN=false_30LANGFLOW_AUTO_SAVING=true_30LANGFLOW_AUTO_SAVING_INTERVAL=1000_30LANGFLOW_BACKEND_ONLY=false_30LANGFLOW_BUNDLE_URLS=["https://github.com/user/repo/commit/hash"]_30LANGFLOW_CACHE_TYPE=async_30LANGFLOW_COMPONENTS_PATH=/path/to/components/_30LANGFLOW_CONFIG_DIR=/path/to/config/_30LANGFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/langflow_30LANGFLOW_DEV=false_30LANGFLOW_FALLBACK_TO_ENV_VAR=false_30LANGFLOW_HEALTH_CHECK_MAX_RETRIES=5_30LANGFLOW_HOST=localhost_30LANGFLOW_LANGCHAIN_CACHE=InMemoryCache_30LANGFLOW_MAX_FILE_SIZE_UPLOAD=10000_30LANGFLOW_MAX_ITEMS_LENGTH=100_30LANGFLOW_MAX_TEXT_LENGTH=1000_30LANGFLOW_LOG_LEVEL=error_30LANGFLOW_OPEN_BROWSER=false_30LANGFLOW_PORT=7860_30LANGFLOW_REMOVE_API_KEYS=false_30LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true_30LANGFLOW_SECRET_KEY=somesecretkey_30LANGFLOW_STORE=true_30LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true_30LANGFLOW_SUPERUSER=adminuser_30LANGFLOW_SUPERUSER_PASSWORD=adminpass_30LANGFLOW_WORKER_TIMEOUT=60000_30LANGFLOW_WORKERS=3有关其他示例,请参阅 Langflow 仓库中的
.env.example
文件。 -
保存并关闭
.env
。 -
使用您的
.env
文件启动 Langflow:- Local
- Docker
_10python -m langflow run --env-file .env_10docker run -it --rm \_10-p 7860:7860 \_10--env-file .env \_10langflowai/langflow:latest如果您的
.env
文件不在同一目录中,请提供您的.env
文件的路径。
在启动时,Langflow 从您的 .env
文件以及您在终端中设置的任何环境变量导入环境变量,并采用它们指定的值。
优先级
您可以在终端、.env
中以及使用 Langflow CLI 选项 设置 Langflow 环境变量。
如果环境变量在多个位置设置,适用以下层次结构:
- Langflow CLI 选项覆盖
.env
和终端变量。 .env
覆盖终端变量。- 只有在
.env
或 Langflow CLI 选项中未设置变量时,才使用终端变量。
例如,如果您在 .env
和终端中都设置了 LANGFLOW_PORT
,则 Langflow 使用 .env
中的值。
同样,如果您使用 --port
运行 Langflow CLI 命令,则 Langflow 使用该端口号而不是 .env
中的 LANGFLOW_PORT
。
支持的环境变量
下表列出了 Langflow 支持的环境变量。
变量 | 格式 | 默认值 | 描述 |
---|---|---|---|
DO_NOT_TRACK | Boolean | false | 如果启用此选项,Langflow 不会跟踪遥测数据。 |
LANGFLOW_AUTO_LOGIN | Boolean | true | 为 Langflow 启用自动登录。设置为 false 可禁用自动登录并需要登录表单来登录 Langflow UI。设置为 false 需要设置 LANGFLOW_SUPERUSER 和 LANGFLOW_SUPERUSER_PASSWORD 。有关更多信息,请参阅身份验证。 |
LANGFLOW_AUTO_SAVING | Boolean | true | 启用 flow 自动保存。 参阅 --auto-saving 选项。 |
LANGFLOW_AUTO_SAVING_INTERVAL | Integer | 1000 | 设置 flow 自动保存的间隔(毫秒)。 参阅 --auto-saving-interval 选项。 |
LANGFLOW_BACKEND_ONLY | Boolean | false | 仅运行 Langflow 的后端服务器(无前端)。 参阅 --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. |
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/<username>/.langflow/cache Windows Desktop cache: C:\Users\<username>\AppData\Roaming\com.Langflow\cache OSS macOS/Windows/Linux/WSL (uv pip install) cache: <path_to_venv>/lib/python3.12/site-packages/langflow/cache OSS macOS/Windows/Linux/WSL (git clone) cache: <path_to_clone>/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 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. |
LANGFLOW_HEALTH_CHECK_MAX_RETRIES | Integer | 5 | Set the maximum number of retries for the health check. See --health-check-max-retries option. |
LANGFLOW_HOST | String | localhost | The host on which the Langflow server will run. See --host option. |
LANGFLOW_LANGCHAIN_CACHE | String | InMemoryCache | Type of cache to use. Possible values: InMemoryCache , SQLiteCache .See --cache option. |
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. |
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. |
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. |
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. |
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. |
LANGFLOW_STORE_ENVIRONMENT_VARIABLES | Boolean | true | Store environment variables as 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 | Set the name for the superuser. Required if LANGFLOW_AUTO_LOGIN is set to false .See superuser --username option. |
LANGFLOW_SUPERUSER_PASSWORD | String | langflow | Set the password for the superuser. Required if LANGFLOW_AUTO_LOGIN is set to false .See superuser --password option. |
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. |
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. |
LANGFLOW_WORKERS | Integer | 1 | Number of worker processes. See --workers option. |
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. |
Configure .env, override.conf, and tasks.json files
The following examples show how to configure Langflow using environment variables in different scenarios.
- .env file
- Systemd service
- VSCode tasks.json
The .env
file is a text file that contains key-value pairs of environment variables.
Create or edit a file named .env
in your project root directory and add your configuration:
_30DO_NOT_TRACK=true_30LANGFLOW_AUTO_LOGIN=false_30LANGFLOW_AUTO_SAVING=true_30LANGFLOW_AUTO_SAVING_INTERVAL=1000_30LANGFLOW_BACKEND_ONLY=false_30LANGFLOW_BUNDLE_URLS=["https://github.com/user/repo/commit/hash"]_30LANGFLOW_CACHE_TYPE=async_30LANGFLOW_COMPONENTS_PATH=/path/to/components/_30LANGFLOW_CONFIG_DIR=/path/to/config/_30LANGFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/langflow_30LANGFLOW_DEV=false_30LANGFLOW_FALLBACK_TO_ENV_VAR=false_30LANGFLOW_HEALTH_CHECK_MAX_RETRIES=5_30LANGFLOW_HOST=localhost_30LANGFLOW_LANGCHAIN_CACHE=InMemoryCache_30LANGFLOW_MAX_FILE_SIZE_UPLOAD=10000_30LANGFLOW_MAX_ITEMS_LENGTH=100_30LANGFLOW_MAX_TEXT_LENGTH=1000_30LANGFLOW_LOG_LEVEL=error_30LANGFLOW_OPEN_BROWSER=false_30LANGFLOW_PORT=7860_30LANGFLOW_REMOVE_API_KEYS=false_30LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true_30LANGFLOW_SECRET_KEY=somesecretkey_30LANGFLOW_STORE=true_30LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true_30LANGFLOW_SUPERUSER=adminuser_30LANGFLOW_SUPERUSER_PASSWORD=adminpass_30LANGFLOW_WORKER_TIMEOUT=60000_30LANGFLOW_WORKERS=3
A systemd service configuration file configures Linux system services.
To add environment variables, create or edit a service configuration file and add an override.conf
file. This file allows you to override the default environment variables for the service.
_33[Service]_33Environment="DO_NOT_TRACK=true"_33Environment="LANGFLOW_AUTO_LOGIN=false"_33Environment="LANGFLOW_AUTO_SAVING=true"_33Environment="LANGFLOW_AUTO_SAVING_INTERVAL=1000"_33Environment="LANGFLOW_BACKEND_ONLY=false"_33Environment="LANGFLOW_BUNDLE_URLS=[\"https://github.com/user/repo/commit/hash\"]"_33Environment="LANGFLOW_CACHE_TYPE=async"_33Environment="LANGFLOW_COMPONENTS_PATH=/path/to/components/"_33Environment="LANGFLOW_CONFIG_DIR=/path/to/config"_33Environment="LANGFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/langflow"_33Environment="LANGFLOW_DEV=false"_33Environment="LANGFLOW_FALLBACK_TO_ENV_VAR=false"_33Environment="LANGFLOW_HEALTH_CHECK_MAX_RETRIES=5"_33Environment="LANGFLOW_HOST=localhost"_33Environment="LANGFLOW_LANGCHAIN_CACHE=InMemoryCache"_33Environment="LANGFLOW_MAX_FILE_SIZE_UPLOAD=10000"_33Environment="LANGFLOW_MAX_ITEMS_LENGTH=100"_33Environment="LANGFLOW_MAX_TEXT_LENGTH=1000"_33Environment="LANGFLOW_LOG_ENV=container_json"_33Environment="LANGFLOW_LOG_FILE=logs/langflow.log"_33Environment="LANGFLOW_LOG_LEVEL=error"_33Environment="LANGFLOW_OPEN_BROWSER=false"_33Environment="LANGFLOW_PORT=7860"_33Environment="LANGFLOW_REMOVE_API_KEYS=false"_33Environment="LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true"_33Environment="LANGFLOW_SECRET_KEY=somesecretkey"_33Environment="LANGFLOW_STORE=true"_33Environment="LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true"_33Environment="LANGFLOW_SUPERUSER=adminuser"_33Environment="LANGFLOW_SUPERUSER_PASSWORD=adminpass"_33Environment="LANGFLOW_WORKER_TIMEOUT=60000"_33Environment="LANGFLOW_WORKERS=3"
For more information on systemd, see the Red Hat documentation.
The tasks.json
file located in .vscode/tasks.json
is a configuration file for development environments using Visual Studio Code.
Create or edit the .vscode/tasks.json
file in your project root:
_48{_48 "version": "2.0.0",_48 "options": {_48 "env": {_48 "DO_NOT_TRACK": "true",_48 "LANGFLOW_AUTO_LOGIN": "false",_48 "LANGFLOW_AUTO_SAVING": "true",_48 "LANGFLOW_AUTO_SAVING_INTERVAL": "1000",_48 "LANGFLOW_BACKEND_ONLY": "false",_48 "LANGFLOW_BUNDLE_URLS": "[\"https://github.com/user/repo/commit/hash\"]",_48 "LANGFLOW_CACHE_TYPE": "async",_48 "LANGFLOW_COMPONENTS_PATH": "D:/path/to/components/",_48 "LANGFLOW_CONFIG_DIR": "D:/path/to/config/",_48 "LANGFLOW_DATABASE_URL": "postgresql://postgres:password@localhost:5432/langflow",_48 "LANGFLOW_DEV": "false",_48 "LANGFLOW_FALLBACK_TO_ENV_VAR": "false",_48 "LANGFLOW_HEALTH_CHECK_MAX_RETRIES": "5",_48 "LANGFLOW_HOST": "localhost",_48 "LANGFLOW_LANGCHAIN_CACHE": "InMemoryCache",_48 "LANGFLOW_MAX_FILE_SIZE_UPLOAD": "10000",_48 "LANGFLOW_MAX_ITEMS_LENGTH": "100",_48 "LANGFLOW_MAX_TEXT_LENGTH": "1000",_48 "LANGFLOW_LOG_ENV": "container_csv",_48 "LANGFLOW_LOG_FILE": "langflow.log",_48 "LANGFLOW_LOG_LEVEL": "error",_48 "LANGFLOW_OPEN_BROWSER": "false",_48 "LANGFLOW_PORT": "7860",_48 "LANGFLOW_REMOVE_API_KEYS": "true",_48 "LANGFLOW_SAVE_DB_IN_CONFIG_DIR": "false",_48 "LANGFLOW_SECRET_KEY": "somesecretkey",_48 "LANGFLOW_STORE": "true",_48 "LANGFLOW_STORE_ENVIRONMENT_VARIABLES": "true",_48 "LANGFLOW_SUPERUSER": "adminuser",_48 "LANGFLOW_SUPERUSER_PASSWORD": "adminpass",_48 "LANGFLOW_WORKER_TIMEOUT": "60000",_48 "LANGFLOW_WORKERS": "3"_48 }_48 },_48 "tasks": [_48 {_48 "label": "langflow backend",_48 "type": "shell",_48 "command": ". ./langflownightly/Scripts/activate && langflow run",_48 "isBackground": true,_48 "problemMatcher": []_48 }_48 ]_48}
To run Langflow using the above VSCode tasks.json
file, in the VSCode command palette, select Tasks: Run Task > langflow backend.
Set environment variables for Langflow Desktop
Environment variables set in your terminal aren't automatically available to GUI-based applications like Langflow Desktop when you launch them from the Windows or macOS GUI.
For Windows, this means any GUI-based app launched from the Start menu, desktop shortcuts, or Windows Explorer.
For macOS, this means any GUI-based app launched from Finder, Spotlight, Launchpad, or the Dock.
To set environment variables for Langflow Desktop, you need to use specific commands or files, depending on your OS.
- macOS
- Window System Properties
- Powershell
Langflow Desktop for macOS cannot automatically use variables set in your terminal, such as those in.zshrc
or .bash_profile
, when launched from the macOS GUI.
To make environment variables available to GUI apps on macOS, you need to use launchctl
with a plist
file:
-
Create the
LaunchAgents
directory if it doesn't exist:_10mkdir -p ~/Library/LaunchAgents -
In the
LaunchAgents
directory, create a.plist
file calleddev.langflow.env
. -
Add the following content to
dev.langflow.env.plist
, and then add, change, or remove Langflow environment variables as needed for your configuration.This example sets the
LANGFLOW_CONFIG_DIR
environment variable for all GUI apps launched from the macOS GUI._18<?xml version="1.0" encoding="UTF-8"?>_18<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"_18"http://www.apple.com/DTDs/PropertyList-1.0.dtd">_18<plist version="1.0">_18<dict>_18<key>Label</key>_18<string>dev.langflow.env</string>_18<key>ProgramArguments</key>_18<array>_18<string>launchctl</string>_18<string>setenv</string>_18<string>LANGFLOW_CONFIG_DIR</string>_18<string>/Users/your_user/custom/config</string>_18</array>_18<key>RunAtLoad</key>_18<true/>_18</dict>_18</plist> -
Load the file with
launchctl
:_10launchctl load ~/Library/LaunchAgents/dev.langflow.env.plist
Langflow Desktop for Windows cannot automatically use variables set in your terminal, such as those defined with set
in cmd
or $env:VAR=...
in PowerShell, when launched from the Windows GUI.
To make environment variables available to the Langflow Desktop app, you must set them at the user or system level using the System Properties interface or the Terminal.
To set environment variables using the System Properties interface, do the following:
-
Press Win + R, enter
SystemPropertiesAdvanced
, and then press Enter. -
Click Environment Variables.
-
Under User variables, click New.
提示To apply the setting to all users, select System variables.
-
Enter the name of the Langflow variable you want to set, such as
LANGFLOW_CONFIG_DIR
, and the desired value, such asC:\Users\your_user\.langflow_config
. -
Click OK to save the variable.
-
Repeat until you have set all necessary Langflow environment variables.
-
Launch or restart Langflow Desktop to apply the environment variables.
To define environment variables for Windows using PowerShell, do the following:
-
Enter the name of the Langflow variable you want to set, such as
LANGFLOW_CONFIG_DIR
, and the desired value, such asC:\Users\your_user\.langflow_config
.To set an environment variable for the current user:
_10[System.Environment]::SetEnvironmentVariable("LANGFLOW_CONFIG_DIR", "C:\Users\your_user\.langflow_config", "User")To set an environment variable for all users (you must have Administrator priveleges):
_10[System.Environment]::SetEnvironmentVariable("LANGFLOW_CONFIG_DIR", "C:\Langflow\Config", "Machine") -
Repeat until you have set all necessary Langflow environment variables.
-
Launch or restart Langflow Desktop to apply the environment variables.