Skip to main content

Environment variables

In general, environment variables, like ORBISAGENTS_PORT or ORBISAGENTS_LOG_LEVEL, configure how Orbis Studio runs. These are broad settings that apply to your entire Orbis Studio deployment.

In contrast, global variables are user-defined values stored in Orbis Studio's database for use in flows, such as OPENAI_API_KEY. Orbis Studio can also source global variables from environment variables. For more information, see Orbis Studio global variables.

Configure environment variables for Orbis Studio OSS​

Orbis Studio recognizes supported environment variables from the following sources:

  • Environment variables set in your terminal.
  • Environment variables imported from a .env file when starting Orbis Studio.
  • Environment variables set with the Orbis Studio CLI, including the --env-file option and direct options, such as --port.

You can choose to use one or more of these sources.

Precedence​

If the same environment variable is set in multiple places, the following hierarchy applies:

  1. Orbis Studio CLI options override all other sources.
  2. The .env file overrides system environment variables.
  3. System environment variables are used only if not set elsewhere. When running an Orbis Studio Docker image, the -e flag can be used to set additional system environment variables.

For example:

  • If you set ORBISAGENTS_PORT=8080 in your system environment and ORBISAGENTS_PORT=7860 in .env, Orbis Studio uses 7860 from .env.
  • If you use the Orbis Studio CLI to run langflow run --env-file .env --port 9000, and you set ORBISAGENTS_PORT=7860 in .env, then Orbis Studio uses 9000 from the CLI option.

Set environment variables in your terminal​

Run the following commands to set environment variables for your current terminal session:


_10
export VARIABLE_NAME='VALUE'

When you start Orbis Studio, it looks for environment variables that you've set in your terminal. If it detects a supported environment variable, then it automatically adopts the specified value, subject to precedence rules.

Import environment variables from a .env file​

  1. If Orbis Studio is running, quit Orbis Studio.

  2. Create a .env file, and then open it in your preferred editor.

  3. Define Orbis Studio environment variables in the .env file.

    Example: .env

    _30
    DO_NOT_TRACK=True
    _30
    ORBISAGENTS_AUTO_LOGIN=False
    _30
    ORBISAGENTS_AUTO_SAVING=True
    _30
    ORBISAGENTS_AUTO_SAVING_INTERVAL=1000
    _30
    ORBISAGENTS_BACKEND_ONLY=False
    _30
    ORBISAGENTS_BUNDLE_URLS=["https://github.com/user/repo/commit/hash"]
    _30
    ORBISAGENTS_CACHE_TYPE=async
    _30
    ORBISAGENTS_COMPONENTS_PATH=/path/to/components/
    _30
    ORBISAGENTS_COMPONENTS_INDEX_PATH=/path/to/component_index.json
    _30
    ORBISAGENTS_CONFIG_DIR=/path/to/config/
    _30
    ORBISAGENTS_DATABASE_URL=postgresql://user:password@localhost:5432/langflow
    _30
    ORBISAGENTS_DEV=False
    _30
    ORBISAGENTS_FALLBACK_TO_ENV_VAR=False
    _30
    ORBISAGENTS_HEALTH_CHECK_MAX_RETRIES=5
    _30
    ORBISAGENTS_HOST=localhost
    _30
    ORBISAGENTS_LANGCHAIN_CACHE=InMemoryCache
    _30
    ORBISAGENTS_MAX_FILE_SIZE_UPLOAD=10000
    _30
    ORBISAGENTS_MAX_ITEMS_LENGTH=100
    _30
    ORBISAGENTS_MAX_TEXT_LENGTH=1000
    _30
    ORBISAGENTS_LOG_LEVEL=error
    _30
    ORBISAGENTS_OPEN_BROWSER=False
    _30
    ORBISAGENTS_PORT=7860
    _30
    ORBISAGENTS_REMOVE_API_KEYS=False
    _30
    ORBISAGENTS_SAVE_DB_IN_CONFIG_DIR=True
    _30
    ORBISAGENTS_SECRET_KEY=somesecretkey
    _30
    ORBISAGENTS_STORE_ENVIRONMENT_VARIABLES=True
    _30
    ORBISAGENTS_SUPERUSER=adminuser
    _30
    ORBISAGENTS_SUPERUSER_PASSWORD=adminpass
    _30
    ORBISAGENTS_WORKER_TIMEOUT=300
    _30
    ORBISAGENTS_WORKERS=3

    For additional examples, see .env.example in the Orbis Studio repository.

  4. Save and close .env.

  5. Start Orbis Studio with your .env file:


    _10
    uv run langflow run --env-file .env

    If your .env file isn't in the same directory, provide the path to your .env file.

On startup, Orbis Studio 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.

Configure environment variables for development​

The following examples show how to configure Orbis Studio using environment variables in different development scenarios.

The .env file is a text file that contains key-value pairs of environment variables.

Create or edit a .env file in the root directory of your application or Orbis Studio environment, and then add your configuration variables to the file:

Example: .env

_30
DO_NOT_TRACK=True
_30
ORBISAGENTS_AUTO_LOGIN=False
_30
ORBISAGENTS_AUTO_SAVING=True
_30
ORBISAGENTS_AUTO_SAVING_INTERVAL=1000
_30
ORBISAGENTS_BACKEND_ONLY=False
_30
ORBISAGENTS_BUNDLE_URLS=["https://github.com/user/repo/commit/hash"]
_30
ORBISAGENTS_CACHE_TYPE=async
_30
ORBISAGENTS_COMPONENTS_PATH=/path/to/components/
_30
ORBISAGENTS_COMPONENTS_INDEX_PATH=/path/to/component_index.json
_30
ORBISAGENTS_CONFIG_DIR=/path/to/config/
_30
ORBISAGENTS_DATABASE_URL=postgresql://user:password@localhost:5432/langflow
_30
ORBISAGENTS_DEV=False
_30
ORBISAGENTS_FALLBACK_TO_ENV_VAR=False
_30
ORBISAGENTS_HEALTH_CHECK_MAX_RETRIES=5
_30
ORBISAGENTS_HOST=localhost
_30
ORBISAGENTS_LANGCHAIN_CACHE=InMemoryCache
_30
ORBISAGENTS_MAX_FILE_SIZE_UPLOAD=10000
_30
ORBISAGENTS_MAX_ITEMS_LENGTH=100
_30
ORBISAGENTS_MAX_TEXT_LENGTH=1000
_30
ORBISAGENTS_LOG_LEVEL=error
_30
ORBISAGENTS_OPEN_BROWSER=False
_30
ORBISAGENTS_PORT=7860
_30
ORBISAGENTS_REMOVE_API_KEYS=False
_30
ORBISAGENTS_SAVE_DB_IN_CONFIG_DIR=True
_30
ORBISAGENTS_SECRET_KEY=somesecretkey
_30
ORBISAGENTS_STORE_ENVIRONMENT_VARIABLES=True
_30
ORBISAGENTS_SUPERUSER=adminuser
_30
ORBISAGENTS_SUPERUSER_PASSWORD=adminpass
_30
ORBISAGENTS_WORKER_TIMEOUT=300
_30
ORBISAGENTS_WORKERS=3

Set environment variables for Orbis Studio Desktop​

Environment variables set in your terminal aren't automatically available to GUI-based applications like Orbis Studio Desktop when you launch them from the Windows or macOS GUI.

To modify environment variables for Orbis Studio Desktop, set environment variables in a Desktop .env file, and then restart the app.

To modify the macOS .env file, do the following:

  1. Create or edit ~/.langflow/data/.env.

  2. Add your Orbis Studio environment variables, for example:


    _10
    ORBISAGENTS_LOG_LEVEL=info
    _10
    ORBISAGENTS_DOCLING=true

  3. Save the file.

  4. Restart Orbis Studio Desktop.

Supported environment variables​

The following sections provide information about specific Orbis Studio environment variables.

Authentication and security​

See API keys and authentication.

Global variables​

For information about the relationship between Orbis Studio global variables and environment variables, as well as environment variables that control handling of global variables, see Global variables.

Logs​

See Configure log options.

MCP servers​

See Use Orbis Studio as an MCP server.

Multi-worker deployments​

For multi-worker tuning—including the Redis job queue and Gunicorn worker settings—see Deploy Orbis Studio with multiple workers.

Monitoring and metrics​

For environment variables for specific monitoring service providers, see the Orbis Studio monitoring integration guides, such as Langfuse and Best practices for Orbis Studio on Kubernetes.

Server​

The following environment variables set base Orbis Studio server configuration, such as where the server is hosted, required files for SSL encryption, and the deployment type (frontend and backend, backend-only, development mode).

VariableFormatDefaultDescription
ORBISAGENTS_​HOSTStringlocalhostThe host on which the Orbis Studio server will run.
ORBISAGENTS_​PORTInteger7860The port on which the Orbis Studio server runs. The server automatically selects a free port if the specified port is in use.
ORBISAGENTS_​BACKEND_​ONLYBooleanFalseRun only the Orbis Studio backend service (no frontend).
ORBISAGENTS_​DEVBooleanFalseWhether to run Orbis Studio in development mode (may contain bugs).
ORBISAGENTS_​OPEN_​BROWSERBooleanFalseOpen the system web browser on startup.
ORBISAGENTS_​HEALTH_​CHECK_​MAX_​RETRIESInteger5Set the maximum number of retries for Orbis Studio's server status health checks.
ORBISAGENTS_​WORKERSInteger1Number of worker processes. See Deploy Orbis Studio with multiple workers.
ORBISAGENTS_​WORKER_​TIMEOUTInteger300Worker timeout in seconds. See Deploy Orbis Studio with multiple workers.
LANGFLOW_​GUNICORN_​PRELOADBooleanFalseEnables Gunicorn preload_​app. Non-Windows only. Read only as LANGFLOW_​GUNICORN_​PRELOAD; the Orbis-prefixed spelling is not supported. See Deploy Orbis Studio with multiple workers.
ORBISAGENTS_​JOB_​QUEUE_​TYPEStringasyncioJob queue backend. Use redis for multi-worker deployments. See Deploy Orbis Studio with multiple workers.
ORBISAGENTS_​SSL_​CERT_​FILEStringNot setPath to the SSL certificate file for enabling HTTPS on the Orbis Studio web server. This is separate from database SSL connections.
ORBISAGENTS_​SSL_​KEY_​FILEStringNot setPath to the SSL key file for enabling HTTPS on the Orbis Studio web server. This is separate from database SSL connections.
ORBISAGENTS_​DEACTIVATE_​TRACINGBooleanFalseDeactivate tracing functionality.
ORBISAGENTS_​CELERY_​ENABLEDBooleanFalseEnable Celery for distributed task processing.
ORBISAGENTS_​ALEMBIC_​LOG_​TO_​STDOUTBooleanFalseWhether to log Alembic database migration output to stdout instead of a log file. If true, Alembic logs to stdout and the default log file is ignored.

Storage​

For file storage environment variables, see File storage environment variables.

For database environment variables, including PostgreSQL configuration, see Memory management options.

Telemetry​

See Telemetry.

Visual editor and Playground behavior​

VariableFormatDefaultDescription
ORBISAGENTS_​AUTO_​SAVINGBooleanTrueWhether to automatically save the current flow draft. Auto-save only updates the live draft, and doesn't create saved flow versions.
ORBISAGENTS_​AUTO_​SAVING_​INTERVALInteger1000Set the auto-save interval in milliseconds if ORBISAGENTS_​AUTO_​SAVING=True.
ORBISAGENTS_​BUNDLE_​URLSList[String][]A list of URLs from which to load custom bundles. Supports GitHub URLs. If ORBISAGENTS_​AUTO_​LOGIN=True, flows from these bundles are loaded into the database.
ORBISAGENTS_​COMPONENTS_​PATHStringNot setPath to a directory containing custom components. Typically used if you have local custom components or you are building a Docker image with custom components.
ORBISAGENTS_​COMPONENTS_​INDEX_​PATHStringNot setFile path or URL (http:// or https://) to a prebuilt component index JSON file used to populate built-in components in the visual editor. When not set, Orbis Studio uses the included index. Useful for supplying a curated component index, for example in airgapped deployments. For more information, see Block custom components.
ORBISAGENTS_​ALLOW_​CUSTOM_​COMPONENTSBooleanTrueIf false, disables custom components and in-editor editing of component code. This feature is in beta. For more information, see Block custom components.
ORBISAGENTS_​ALLOW_​COMPONENTS_​PATHS_​OVERRIDEBooleanTrueWhen false alongside ORBISAGENTS_​ALLOW_​CUSTOM_​COMPONENTS=false, components contributed by ORBISAGENTS_​COMPONENTS_​PATH and ORBISAGENTS_​COMPONENTS_​INDEX_​PATH no longer bypass the block. Has no effect when ORBISAGENTS_​ALLOW_​CUSTOM_​COMPONENTS=true. For more information, see Block custom components.
ORBISAGENTS_​LOAD_​FLOWS_​PATHStringNot setPath to a directory containing flow JSON files to be loaded on startup. Typically used when creating a Docker image with prepackaged flows. Requires ORBISAGENTS_​AUTO_​LOGIN=True.
ORBISAGENTS_​LOAD_​FLOWS_​OVERWRITE_​ON_​NAME_​MATCHBooleanFalseWhen a flow file in ORBISAGENTS_​LOAD_​FLOWS_​PATH shares a name with an existing DB row but has a different id, controls whether to overwrite the existing row. False (default) skips with a warning so UI edits are preserved on restart when file UUIDs regenerate. Set to True to opt into prepackaged-flows-are-source-of-truth semantics, typically for CI/CD pipelines.
ORBISAGENTS_​CREATE_​STARTER_​PROJECTSBooleanTrueWhether to create templates during initialization. If false, Orbis Studio doesn't create templates, and ORBISAGENTS_​UPDATE_​STARTER_​PROJECTS is treated as false.
ORBISAGENTS_​UPDATE_​STARTER_​PROJECTSBooleanTrueWhether to update templates with the latest component versions when initializing after an upgrade.
ORBISAGENTS_​LAZY_​LOAD_​COMPONENTSBooleanFalseIf true, Orbis Studio only partially loads components at startup and fully loads them on demand. This significantly reduces startup time but can cause a slight delay when a component is first used.
ORBISAGENTS_​EVENT_​DELIVERYStringstreamingHow to deliver build events to the frontend: polling, streaming or direct.
ORBISAGENTS_​FRONTEND_​PATHString./frontendPath to the frontend directory containing build files. For development purposes only when you need to serve specific frontend code.
LANGFLOW_​FS_​TOOL_​BASE_​DIRString~/.langflow/fs_​tool/fs_​sandboxRead only as LANGFLOW_​FS_​TOOL_​BASE_​DIR; the Orbis-prefixed spelling is not supported. Base directory for the File System component sandbox. All agent file operations are confined to this directory.
ORBISAGENTS_​MAX_​ITEMS_​LENGTHInteger100Maximum 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 outputs or data passed between components.
ORBISAGENTS_​MAX_​TEXT_​LENGTHInteger1000Maximum 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 outputs or responses passed between components.
ORBISAGENTS_​MAX_​TRANSACTIONS_​TO_​KEEPInteger3000Maximum number of flow transaction events to keep in the database.
ORBISAGENTS_​MAX_​VERTEX_​BUILDS_​TO_​KEEPInteger3000Maximum number of vertex builds to keep in the database. Relates to Playground functionality.
ORBISAGENTS_​MAX_​VERTEX_​BUILDS_​PER_​VERTEXInteger2Maximum number of builds to keep per vertex. Older builds are deleted. Relates to Playground functionality.
ORBISAGENTS_​PUBLIC_​FLOW_​CLEANUP_​INTERVALInteger3600The interval in seconds at which data for shared Playground flows are cleaned up. Default: 3600 seconds (1 hour). Minimum: 600 seconds (10 minutes).
ORBISAGENTS_​PUBLIC_​FLOW_​EXPIRATIONInteger86400The time in seconds after which a shared Playground flow is considered expired and eligible for cleanup. Default: 86400 seconds (24 hours). Minimum: 600 seconds (10 minutes).

Hide UI elements with embedded mode​

When you embed the Orbis Studio visual editor in another application, such as an iframe within a host portal, you can hide UI elements that are usually visible in the visual editor.

The embedded mode environment variables control which UI elements appear in the visual editor. Embedded mode controls UI visibility only, and does not block API endpoints or deploy Orbis Studio.

Embedded mode is distinct from the embedded chat widget, which embeds a single flow's chat UI in a website.

When ORBISAGENTS_EMBEDDED_MODE=true, Orbis Studio hides the following buttons in the UI:

  • Logout
  • New project
  • New flow
  • Starter projects

You can hide individual elements without enabling the umbrella flag.

VariableFormatDefaultDescription
ORBISAGENTS_​EMBEDDED_​MODEBooleanFalseUmbrella flag for embedded or iframe deployments. When true, hides standalone UI elements: logout, new project, new flow, and starter projects. Individual hide flags can also be set without enabling this flag.
ORBISAGENTS_​HIDE_​LOGOUT_​BUTTONBooleanFalseIf true, hides the logout button in the account menu. Automatically enabled when ORBISAGENTS_​EMBEDDED_​MODE=true.
ORBISAGENTS_​HIDE_​NEW_​PROJECT_​BUTTONBooleanFalseIf true, hides the new project/folder button in the sidebar. Automatically enabled when ORBISAGENTS_​EMBEDDED_​MODE=true.
ORBISAGENTS_​HIDE_​NEW_​FLOW_​BUTTONBooleanFalseIf true, hides the new flow button in the header. Automatically enabled when ORBISAGENTS_​EMBEDDED_​MODE=true.
ORBISAGENTS_​HIDE_​STARTER_​PROJECTSBooleanFalseIf true, hides the starter projects tab in the templates modal. Does not affect database seeding of starter projects. Automatically enabled when ORBISAGENTS_​EMBEDDED_​MODE=true.
LANGFLOW_​HIDE_​GETTING_​STARTED_​PROGRESSBooleanFalseRead only as LANGFLOW_​HIDE_​GETTING_​STARTED_​PROGRESS or HIDE_​GETTING_​STARTED_​PROGRESS; the Orbis-prefixed spelling is not supported. If true, hides the getting-started onboarding progress UI. Not automatically enabled when ORBISAGENTS_​EMBEDDED_​MODE=true.