airflow standalone creates a user called admin with a random password. It prints the password only
the first time, and the line is easy to miss among the logs of four components. The password is also
saved in a file in AIRFLOW_HOME.
Copy and paste
cat "${AIRFLOW_HOME:-$HOME/airflow}/simple_auth_manager_passwords.json.generated"
{"admin": "Xq7RtB2mPw9LkV4s"}
Sign in at http://localhost:8080 with the user admin and that password.
Why it is not printed again
On the first start the terminal shows the password:
Simple auth manager | Password for user 'admin': Xq7RtB2mPw9LkV4s
On every later start it shows only where to find it:
standalone | Password for the admin user has been previously generated in /Users/you/airflow/simple_auth_manager_passwords.json.generated. Not echoing it here.
If the file is not where you expect, check AIRFLOW_HOME. Each Airflow home has its own file, so a
terminal where AIRFLOW_HOME points elsewhere starts a different Airflow with a different password.
There is no airflow users create
Airflow 3 uses the Simple auth manager by default. It reads users from the configuration and passwords
from that file. The airflow users create command of Airflow 2 belongs to the FAB auth manager, which
is now a separate provider.
Set your own password or users
The file is plain JSON. Airflow generates a password only for configured users that are missing from it, so you can write your own and restart:
echo '{"admin": "local-password"}' > "$AIRFLOW_HOME/simple_auth_manager_passwords.json.generated"
Users and their roles come from simple_auth_manager_users, admin:admin by default. The roles are
viewer, user, op and admin:
export AIRFLOW__CORE__SIMPLE_AUTH_MANAGER_USERS="admin:admin,analyst:viewer"
On the next start Airflow adds a password for analyst to the file and prints it.
For a laptop where nobody else can reach Airflow, you can also turn the login off:
export AIRFLOW__CORE__SIMPLE_AUTH_MANAGER_ALL_ADMINS=True
The Simple auth manager stores passwords in plain text and is meant for development. Airflow logs a warning when it looks like a production deployment.
Tested with Airflow 3.3.2.