Override default navbar color

Is it possible to override the default Astronomer navbar color? I tried setting the AIRFLOW__WEBSERVER__NAVBAR_COLOR variable in Admin > variables and in a .env file while running Astronomer locally but it doesn’t override the default. I’d ideally like to use different colored navbars for different environments.

Hi @christina! Thanks for reaching out. Unfortunately, the Astronomer Core Nav Var is hard-coded and cannot be overrideable on Astronomer, including with an AC 2.0 image.

There’s unfortunately no other easy way to visually distinguish between 2+ Airflow Deployments, but it’s a pain point we’re giving a lot of thought to over the next few months. If you find a workaround, we’re always curious to know! Otherwise, we’ll post back in here with updates as we come up with and ship longer-term solutions.

Note: Related Airflow PR that calls for the ability to customize the DAGs home page in the Airflow UI - https://github.com/apache/airflow/pull/10162. This is likely something we’d support on AC, though I can’t confirm.

Am also interested in this feature! Would like to update the navbar color for better distinguishing the different Airflow deployments we have.

Hey @lawrence_je! Are you running Airflow on Astronomer? I don’t believe you’ll be able to customize that Nav Bar color (we override it with an Astronomer color), but you should be able to add the “name” of your Deployment to appear in the Airflow UI by setting the following Environment Variable:

AIRFLOW__WEBSERVER__INSTANCE_NAME = "<your-Deployment-name>"

If you set this Env Var to Airflow Lab DAGs, for example, you’d see:

Want to try that and let us know if it works?

Hey @paola - I am running Airflow on Astronomer!

I was able to update the Airflow UI name with your suggestion, thanks! However would still be interested in updating the Nav Bar color in the future if possible :slight_smile:

1 Like