Running Dagster as a Service#

Running Dagit#

The core of any deployment of Dagster is Dagit, a process that serves a user interface and responds to GraphQL queries.

To run dagit locally, first ensure that you are running a recent Python version. Typically, you'll want to run Dagit inside a virtualenv. Then, you can install Dagit and any additional libraries you might need.

pip install dagit

To run Dagit, use a command like the following:

DAGSTER_HOME=/opt/dagster/dagster_home dagit -h -p 3000

In this configuration, Dagit will write execution logs to $DAGSTER_HOME/logs and listen on

Running dagster-daemon#

If you're using schedules or sensors, or want to set limits on the number of runs that can be executed at once, you'll want to also run a dagster-daemon service as part of your deployment. To run this service locally, run the following command:

pip install dagster

DAGSTER_HOME=/opt/dagster/dagster_home dagster-daemon run

The dagster-daemon process will periodically check your instance for any new runs that should be launched from your run queue or triggered by your running schedules or sensors. If you're running dagster-daemon in a different environment than dagit, it must also have access to your dagster.yaml file and be able to access the components defined on your instance, and also be able to load the repositories defined in your workspace.

You can check the status of your dagster-daemon process in Dagit by navigating to the Instance tab in the navigation bar on the left-hand side of the screen. A deployment can have multiple instances of dagit running at once, but should only include a single dagster-daemon process.