Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

First time login to Apache Airflow asks for username and password, what is the username and password?

Tags:

airflow

I've just installed Apache Airflow, and I'm launching the webserver for the first time, and it asks me for username and password, I haven't set any username or password.

Can you let me know what is the default username and password for airflow?

enter image description here

like image 991
Manikanta Komuravelli Avatar asked Feb 11 '21 18:02

Manikanta Komuravelli


People also ask

How do I create an airflow user?

Activate you airflow python environment and start python shell. Then with the help of these commands you can easily set a new user in airflow. If you want to create a admin user you can simply do that by adding user. superuser = True It'll do the job.

How do I start an airflow server?

Create a init script and use the command "daemon" to run this as service. Show activity on this post. You can use a ready-made AMI (namely, LightningFLow) from AWS Marketplace which provides Airflow services (webserver, scheduler, worker) which are enabled at startup.

How do I start Apache airflow UI?

To access your Apache Airflow UIOpen the Environments page on the Amazon MWAA console. Choose an environment. Choose Open Airflow UI.


2 Answers

There is no default username and password created if you are just using python wheel.

Run the following to create a user:

For Airflow >=2.0.0:

airflow users  create --role Admin --username admin --email admin --firstname admin --lastname admin --password admin

OR

For Airflow <1.10.14:

airflow create_user -r Admin -u admin -e [email protected] -f admin -l user -p admin
like image 102
kaxil Avatar answered Sep 17 '22 03:09

kaxil


By default if you are using docker-compose example provided by airflow, the user is:

user:airflow 
password: airflow

If you want to create another account with docker use this:

docker-compose run airflow-worker airflow users create --role Admin --username admin --email admin --firstname admin --lastname admin --password admin
like image 29
Mattia Avatar answered Sep 20 '22 03:09

Mattia