Installation & Setup
Requirements
| Component | Version |
|---|---|
| Apache Airflow | ≥ 3.1 (uses the react_apps + fastapi_apps plugin APIs; no Airflow 2.x support) |
| Python | ≥ 3.10 |
| Metadata DB | PostgreSQL recommended (DagSmith stores drafts in its own dagsmith_* tables) |
| File access | to deploy, the Airflow api-server needs write access to the DAG bundle directory; working on drafts needs no file access at all |
Install
pip install airflow-dagsmith # in the environment running the Airflow api-serverThe plugin registers itself via the airflow.plugins entry point — don't copy anything into $AIRFLOW_HOME/plugins. After restarting the api-server, DagSmith appears in the Airflow navigation. Its dagsmith_* tables are created automatically on startup (or run python -m dagsmith db upgrade manually).
Enabling Deploy
For safety, writing .py files is off by default — without it DagSmith works in read-and-draft mode only. Enable it consciously in airflow.cfg:
[dagsmith]
deploy_enabled = True
# optional hardening / team split:
# editors = data-platform-team # who can create and edit drafts
# deployers = admin # who can write .py files
# admins = admin # who manages teams
# git_commit = True # commit to the bundle checkout on deploy(or the equivalent AIRFLOW__DAGSMITH__DEPLOY_ENABLED=True environment variable, etc.)
Security note: deploying DAGs from the UI is equivalent to executing arbitrary code in your Airflow environment — exactly like shipping a DAG file any other way. Enable deploy_enabled only with proper access control on the Airflow UI. Import validation executes the file's top level in an isolated, time-limited subprocess. See Security & Permissionsfor the full model.
Dag