Hi, I wanted to deploy Dagster on local with the D...
# ask-community
r
Hi, I wanted to deploy Dagster on local with the DAGSTER_HOME environment variable set in .env file following the documentation: https://docs.dagster.io/guides/dagster/using-environment-variables-and-secrets#declaring-environment-variables, however, after I ran the Dagster service using "dagster dev" command, the log said that DAGSTER_HOME was not set. How should I resolve this thread ?
🤖 1
d
Hi Ramii - the .env file will help with enviroment variables used in your Dagster code, but not with a Dagster system environment variable like DAGSTER_HOME. Would something like this work to set the environment variable ?
Copy code
DAGSTER_HOME=/your/directory/goes/here dagster dev
s
@Ramii, you might also want to look at using a system like [direnv](https://direnv.net/) that will give you the benefits of a .env(rc) file and also automatically export those variables when you enter the directory. Note, it is just a convenience. In practice, it just automates what @daniel noted above about exporting the DAGSTER_HOME variable.
🙏 1