Airflow Summit 2025 is coming October 07-09. Register now for early bird ticket!

Customizing the UI

Customizing DAG UI Header and Airflow Page Titles

Airflow now allows you to customize the DAG home page header and page title. This will help distinguish between various installations of Airflow or simply amend the page text.

Note

The custom title will be applied to both the page header and the page title.

To make this change, simply:

  1. Add the configuration option of instance_name under the [webserver] section inside airflow.cfg:

[webserver]

instance_name = "DevEnv"
  1. Alternatively, you can set a custom title using the environment variable:

AIRFLOW__WEBSERVER__INSTANCE_NAME = "DevEnv"

Screenshots

Before

../_images/default_instance_name_configuration.png

After

../_images/example_instance_name_configuration.png

Add custom alert messages on the dashboard

Extra alert messages can be shown on the UI dashboard. This can be useful for warning about setup issues or announcing changes to end users. The following example shows how to add alert messages:

  1. Add the following contents to airflow_local_settings.py file under $AIRFLOW_HOME/config. Each alert message should specify a severity level (info, warning, error) using category.

    from airflow.api_fastapi.common.types import UIAlert
    
    DASHBOARD_UIALERTS = [
        UIAlert(text="Welcome to Airflow.", category="info"),
        UIAlert(text="Airflow server downtime scheduled for tomorrow at 10:00 AM.", category="warning"),
        UIAlert(text="Critical error detected!", category="error"),
    ]
    

    See Configuring local settings for details on how to configure local settings.

  2. Restart Airflow Webserver, and you should now see:

../_images/ui-alert-message.png

Alert messages also support Markdown. In the following example, we show an alert message of heading 2 with a link included.

DASHBOARD_UIALERTS = [
    UIAlert(text="## Visit [airflow.apache.org](https://airflow.apache.org)", category="info"),
]
../_images/ui-alert-message-markdown.png

Was this entry helpful?