https://dagster.io/ logo
#ask-community
Title
# ask-community
r

Ramii

02/05/2023, 2:10 PM
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

daniel

02/05/2023, 10:54 PM
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

Sean Davis

02/05/2023, 11:09 PM
@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
2 Views