Where Does Apache Airflow Store DAGs and Config?
Airflow keeps everything under AIRFLOW_HOME, which defaults to ~/airflow: airflow.cfg, the dags folder, logs and the metadata database.
Last updated
Airflow centers on one directory. AIRFLOW_HOME defaults to ~/airflow and holds airflow.cfg, the dags folder the scheduler scans, per task logs, and the metadata database tracking every run. New users sometimes scatter these across the system. Do not. One home keeps upgrades and backups sane.
Native Windows is the exception. Airflow does not run on bare Windows, so Windows shops use WSL2 or Docker and the home lives inside that environment. On macOS and Linux the ~/airflow default just works. Production installs move the database to Postgres and logs to remote storage, leaving this home as the small local case.
Where Apache Airflow stores this, by platform
~/airflow
airflow.cfg, dags/, logs/ and airflow.db all live here. Override with the AIRFLOW_HOME variable. The webserver reads the same home, so point every component at one directory.
~/airflow
Same default layout as Linux. Homebrew and pip installs agree on it. Windows users should look inside WSL2 or their container instead of searching the Windows filesystem.
Frequently asked questions
How do I move an Airflow home directory?
Set AIRFLOW_HOME to the new path before first run, then move airflow.cfg, dags and logs together. The metadata database holds history, so a file copy without it starts you with blank run history.
Where do I put DAG files so the scheduler sees them?
Point dags_folder in airflow.cfg at your repo checkout instead of the default dags dir. The scheduler only scans that one folder, so DAGs anywhere else never load.
Notice an outdated path? Let us know.