Big Data 6 min read

Installing Apache Airflow, Creating Users, and Using Basic Commands

This guide explains how to install Apache Airflow in a virtual environment, set up the Airflow home, create an admin user, understand role‑based access control, and run essential Airflow CLI commands for managing DAGs and tasks.

DevOps Cloud Academy
DevOps Cloud Academy
DevOps Cloud Academy
Installing Apache Airflow, Creating Users, and Using Basic Commands

Installation of Apache Airflow is best performed inside a Python virtual environment that requires the latest Python and pip.

First, create a virtual environment with virtualenv apache_airflow , activate it via cd apache_airflow/bin and source activate , then set the Airflow home directory with export AIRFLOW_HOME=~/airflow . Install Airflow using pip install apache-airflow , initialize its metadata database with airflow db init , and start the web server on port 8081 using airflow webserver -p 8081 . Verify the installation by opening http://localhost:8081/ .

To access the Airflow UI, create an admin user via the CLI: airflow users create -e [email protected] -f John -l Doe -p admin -r Admin -u admin . After logging in, you may see a warning that the scheduler is not running; start it with airflow scheduler and refresh the page.

Airflow provides built‑in roles—Admin, User, Op, Viewer, and Public—each with specific permissions. Admins can manage all permissions, while other roles have progressively limited access.

Common Airflow commands include airflow dags list to list DAGs, airflow tasks list <dag_id> to view tasks, and airflow dags trigger -e <date> <dag_id> to trigger a DAG execution.

The article concludes that these steps allow you to install Airflow locally, create an initial admin user, understand role‑based access control, and operate basic Airflow commands.

cliInstallationuser-managementdata pipelinesApache AirflowAirflow Roles
DevOps Cloud Academy
Written by

DevOps Cloud Academy

Exploring industry DevOps practices and technical expertise.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.