Skip to main content

Global environment variables

This document is a reference for all environment variables on Astronomer with different default values than open source Apache Airflow. You can override default Runtime environment variables, but you can't override system environment variables.

For information on setting your own environment variables, see Environment variables.

System environment variables

On Astro, certain environment variables have special handling. There are three types of special handling:

  • Override variables have their value set by Astro, regardless of what you set in your Deployment.
  • Default Change variables have values that are different from the values in open source Apache Airflow. But, if you specify a value, your value takes precedence.
  • Unsafe to Change variables are environment variables used by Astro to function. Do not override variables listed as Unsafe to Change, because it can break Astro functionality.

The following table provides information about each global environment variable set by Astronomer.

danger

The Astro UI does not currently prevent you from setting the environment variables listed as Unsafe to Change. Attempting to set them can result in unexpected behavior that can include access problems, missing task logs, and failed tasks.

If you need to set one of these variables for a particular use case, contact Astronomer support.

Default Changed

Environment VariableApplicabilityValue
AIRFLOW__TRIGGERER__DEFAULT_CAPACITYBoth Airflow 2 and 31000
AIRFLOW__CORE__PARALLELISMBoth Airflow 2 and 3based on worker queue settings
AIRFLOW__DAG_PROCESSOR__FILE_PARSING_SORT_MODEOnly applies if you use HA or have an extra large size Deployment. Both Airflow 2 and 3.random_seeded_by_host
AIRFLOW__DAG_PROCESSOR__REFRESH_INTERVALAirflow 330
AIRFLOW__SCHEDULER__DAG_DIR_LIST_INTERVALAirflow 230
AIRFLOW__KUBERNETES_EXECUTOR__WORKER_PODS_CREATION_BATCH_SIZEBoth Airflow 2 and 316
AIRFLOW__LOGGING__LOG_FILENAME_TEMPLATEBoth Airflow 2 and 3dag_id={{ ti.dag_id }}/run_id={{ ti.run_id }}/task_id={{ ti.task_id }}/{% if ti.map_index >= 0 %}map_index={{ ti.map_index }}/{% endif %}attempt={{ try_number|default(ti.try_number) }}/{{ ti.id }}.log (for AstroExecutor)
AIRFLOW__SCHEDULER__TASK_QUEUED_TIMEOUTBoth Airflow 2 and 3600 (for <12.5.0,11.15.0), 300 otherwise
OPENLINEAGE_DISABLED=TrueAirflow 3 Remote Deployments
AIRFLOW__SCHEDULER__SCHEDULER_ZOMBIE_TASK_THRESHOLDBoth Airflow 2 and 360, unless on Astro Executor, then 120
AIRFLOW__SCHEDULER__TASK_INSTANCE_HEARTBEAT_TIMEOUTBoth Airflow 2 and 360, unless on Astro Executor, then 120
AIRFLOW__SCHEDULER__SCHEDULE_AFTER_TASK_EXECUTIONAirflow 2FALSE

Override

Environment VariableApplicabilityValue
AIRFLOW__ASTRONOMER__CASBIN_DEPLOYMENTBoth Airflow 2 and 3Your Deployment ID
ASTRO_LOGGING_ROLE_ARNBoth Airflow 2 and 3
AIRFLOW_CONN_ASTRO_GCS_LOGGINGBoth Airflow 2 and 3URI
AIRFLOW_CONN_ASTRO_AZURE_LOGSBoth Airflow 2 and 3
AIRFLOW_CONN_ASTRO_S3_LOGGINGBoth Airflow 2 and 3
AIRFLOW__WEBSERVER__STATIC_CDNBoth Airflow 2 and 3https://cdn.astronomer.io/airflow/
AIRFLOW__API__BASE_URLAirflow 3 onlyhttps://{orgid}.astronomer.run/d{deployment_id_suffix}
AIRFLOW__OPENSEARCH__HOSTAirflow 3 only“”
ASTRO_AGENT_CLIENT_DISALLOW_DEFAULT_SECRET_BACKENDAirflow 3 Astro HostedFALSE
ASTRO_AGENT_CLIENT_DISALLOW_DEFAULT_XCOM_BACKENDAirflow 3 Astro HostedFALSE
AIRFLOW__DAG_PROCESSOR__DAG_BUNDLE_CONFIG_LISTAirflow 3 hosted
AIRFLOW__ASTRO__TASK_LOG_URL_PATTERNAirflow 3 RemoteURI
AIRFLOW__METRICS__STATSD_ALLOW_LISTBoth Airflow 2 and 3Variable is removed
AIRFLOW__METRICS__STATSD_STATSD_CUSTOM_CLIENT_PATHBoth Airflow 2 and 3Variable is removed
AIRFLOW__LOGGING__LOG_FILENAME_TEMPLATEBoth Airflow 2 and 3Variable is removed
AIRFLOW__DAG_PROCESSOR__DAG_BUNDLE_CONFIG_LISTBoth Airflow 2 and 3Variable is removed
AIRFLOW__API__PORTBoth Airflow 2 and 39091
AIRFLOW__API_AUTH__JWT_ALGORITHMBoth Airflow 2 and 3EdDSA
AIRFLOW__API_AUTH__JWT_KIDBoth Airflow 2 and 3
AIRFLOW__API_AUTH__JWT_PRIVATE_KEY_PATHBoth Airflow 2 and 3/var/run/secrets/airflow/api-token-secret/api-token-signing-key
AIRFLOW__API_AUTH__TRUSTED_JWKS_URLBoth Airflow 2 and 3/var/run/secrets/airflow/api-token-secret/api-token-jwks-key
AIRFLOW__CELERY__BROKER_URLBoth Airflow 2 and 3
AIRFLOW__CORE__FERNET_KEYThe secret key for saving connection passwords in the metadata database. Both Airflow 2 and 3.fernetKeySecret
AIRFLOW__CORE__LAZY_LOAD_PLUGINSBoth Airflow 2 and 3FALSE
AIRFLOW__DATABASE__CHECK_MIGRATIONSBoth Airflow 2 and 3FALSE
AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERSBoth Airflow 2 and 3fab in Airflow 2, fab+astro in Airflow 3
AIRFLOW__KUBERNETES_EXECUTOR__NAMESPACEBoth Airflow 2 and 3
AIRFLOW__KUBERNETES__POD_TEMPLATE_FILEBoth Airflow 2 and 3reference to mounted /usr/local/airflow/pod_template_file.yaml
AIRFLOW__LOGGING__COLORED_CONSOLE_LOGBoth Airflow 2 and 3FALSE
AIRFLOW__OPERATORS__DEFAULT_QUEUEBoth Airflow 2 and 3Worker queue defined as default, usually "default"
AIRFLOW__SCHEDULER__STANDALONE_DAG_PROCESSORBoth Airflow 2 and 3True/False depending on Scheduler Size
AIRFLOW__WEBSERVER__SECRET_KEYBoth Airflow 2 and 3
AIRFLOW__CELERY__RESULT_BACKENDBoth Airflow 2 and 3
AIRFLOW__DATABASE__SQL_ALCHEMY_CONNBoth Airflow 2 and 3
AIRFLOW__EXECUTION_API__JWT_AUDIENCEBoth Airflow 2 and 3

Unsafe to Change

Environment VariableDescriptionValue
AIRFLOW__CELERY_BROKER_TRANSPORT_OPTIONS__SOCKET_TIMEOUTThe amount of time that the Celery executor waits for a response from the Celery backend before throwing an error. Both Airflow 2 and 3.30
AIRFLOW__CELERY_BROKER_TRANSPORT_OPTIONS__SOCKET_CONNECT_TIMEOUTThe amount of time that the Celery executor will attempt to connect to the Celery backend before retrying. Both Airflow 2 and 35
AIRFLOW__CELERY_BROKER_TRANSPORT_OPTIONS__SOCKET_KEEPALIVEWhether the Celery executor will check whether the connection to the Celery backend is still alive. Both Airflow 2 and 3TRUE
AIRFLOW__CELERY_BROKER_TRANSPORT_OPTIONS__RETRY_ON_TIMEOUTWhether the Celery executor will retry a connection to the Celery backend when the connection fails. Both Airflow 2 and 3TRUE
AIRFLOW__LOGGING__DAG_PROCESSOR_LOG_TARGETRoutes scheduler logs to stdout. Both Airflow 2 and 3stdout
AIRFLOW__LOGGING__REMOTE_LOGGINGEnables remote logging. Airflow 2 and only Airflow 3 Azure remote Deployments.TRUE
AIRFLOW__LOGGING__REMOTE_BASE_LOG_FOLDERLocation of remote logging storage. Enables remote logging. Airflow 2 and only Airflow 3 Azure remote Deployments.baseLogFolder
AIRFLOW__LOGGING__REMOTE_LOG_CONN_IDID of the connection that provides access to your remote logging location. Enables remote logging. Airflow 2 and only Airflow 3 Azure remote Deployments.
AIRFLOW__LOGGING__LOGGING_CONFIG_CLASSClass name that specifies the logging configuration. Enables remote logging. Airflow 2 and only Airflow 3 Azure remote Deployments.astronomer.runtime.logging.logging_config
AIRFLOW_CONN_ASTRO_S3_LOGGINGConnection URI for writing task logs to Astro's managed S3 bucket. Enables remote logging. Airflow 2 and only Airflow 3 Azure remote Deployments.
AIRFLOW__LOGGING__ENCRYPT_S3_LOGSDetermines whether to use server-side encryption for S3 logs. Both Airflow 2 and 3.FALSE
AIRFLOW__WEBSERVER__BASE_URLThe base URL of the Airflow UI. Both Airflow 2 and 3https://${fullIngressHostname
AIRFLOW__CORE__SQL_ALCHEMY_CONNThe SqlAlchemy connection string for the metadata database. Both Airflow 2 and 3.dbConnSecret.
AIRFLOW__WEBSERVER__UPDATE_FAB_PERMSDetermines whether to update FAB permissions on webserver startup. Airflow 2 Only.TRUE
AIRFLOW__WEBSERVER__ENABLE_PROXY_FIXDetermines whether to enable werkzeug ProxyFix middleware for reverse proxy. Airflow 2 only.TRUE
AIRFLOW__API__ENABLE_PROXY_FIXDetermines whether to enable werkzeug ProxyFix middleware for reverse proxy. Airflow 3 only.TRUE
AIRFLOW_CONN_AIRFLOW_DBThe connection ID for accessing the Airflow metadata database. Both Airflow 2 and 3.dbConnSecret
AIRFLOW__CORE__EXECUTORThe executor class that Airflow uses. Astro supports the Celery and Kubernetes executor. Both Airflow 2 and 3.executor
AIRFLOW_HOMEThe home directory for an Astro project. Both Airflow 2 and 3.usr/local/airflow
AIRFLOW__KUBERNETES__NAMESPACEThe Kubernetes namespace where Airflow workers are created. Both Airflow 2 and 3.namespace
AIRFLOW__CORE__HOSTNAME_CALLABLEPath to a callable, which resolves to the hostname. Both Airflow 2 and 3.airflow.utils.net.get_host_ip_address
AIRFLOW__SCHEDULER__STATSD_ONDetermines whether Statsd is on. Both Airflow 2 and 3.TRUE
AIRFLOW__SCHEDULER__STATSD_HOSTThe hostname for Statsd. Both Airflow 2 and 3.statsd.Hostname
AIRFLOW__SCHEDULER__STATSD_PORTThe port for Statsd. Both Airflow 2 and 3.<statsd-port>
AIRFLOW__METRICS__STATSD_ONDetermines whether metrics are sent to Statsd. Both Airflow 2 and 3.TRUE
AIRFLOW__METRICS__STATSD_HOSTThe hostname for sending metrics to Statsd. Both Airflow 2 and 3.statsd.Hostname
AIRFLOW__METRICS__STATSD_PORTThe port for sending metrics to Statsd. Both Airflow 2 and 3.<statsd-metrics-port>
AIRFLOW__METRICS__STATSD_PREFIXThe prefix for sending the metrics to Statsd. Both Airflow 2 and 3.airflow
AIRFLOW__WEBSERVER__COOKIE_SECURESets a secure flag on server cookies. Airflow 2 only.TRUE
AIRFLOW__WEBSERVER__INSTANCE_NAMEShows the name of your Deployment in the Home view of the Airflow UI. Airflow 2.<Deployment-Name>
AIRFLOW__API__INSTANCE_NAMEShows the name of your Deployment in the Home view of the Airflow UI. Airflow 3.<Deployment-Name>
AIRFLOW__CELERY__WORKER_CONCURRENCYDetermines how many tasks each Celery worker can run at any given time and is the basis of worker auto-scaling logic<Max-Tasks-Per-Worker>
AIRFLOW__WEBSERVER__EXPOSE_CONFIGExposes the Configuration tab of the Airflow UI and hides sensitive values. Airflow 2NON-SENSITIVE-ONLY
AIRFLOW__API__EXPOSE_CONFIGExposes the Configuration tab of the Airflow UI and hides sensitive values. Airflow 3.NON-SENSITIVE-ONLY
AIRFLOW__USAGE_DATA_COLLECTION__ENABLEDDisables the Airflow usage data collection & reporting to Scarf. Both Airflow 2 and 3.FALSE
AWS_DEFAULT_REGION(AWS clusters only) The region where your cluster is located. Both Airflow 2 and 3.The region where you configured your cluster.
AWS_SECRET_ACCESS_KEYThe key secret for accessing Astro's managed S3 bucket¹. Both Airflow 2 and 3
INSTANCE_TYPEProvides the instance size of the node the DAG is scheduled on. Both Airflow 2 and 3(v1:metadata.labels['beta.kubernetes.io/instance-type'])
OPENLINEAGE_URLThe URL for your Astro lineage backend. The destination for lineage metadata sent from external systems to the OpenLineage API. Both Airflow 2 and 3
OPENLINEAGE_API_KEYYour OpenLineage API key. Both Airflow 2 and 3

Was this page helpful?