.env: no such file or directory


I cannot access my .env file from the config tab !?

I have this error:

'cat: /home/cleavr/exemple.com/.env: no such file or directory`

Depending on the directory structure with deployments versioning, the .env file must be in:

/home/cleavr/exemple.com/current/.env - or - /home/cleavr/exemple.com/shared/.env

I can’t find where I can change the location. (even if the correct location for the .env file is still the root directory :wink: )

Someone has the same problem ? Or do I have a bad configuration ?

Thanks for your help

Hi @ynk, welcome to the Cleavr forum!

You’ll see cat: /home/cleavr/exemple.com/.env: no such file or directory if no .env file is currently present at that location. Though, if you add and save variables, then the message will go away the next time. We’ll update that notice to be more friendly / informative.

During deployment, Cleavr will check for the existence of the .env file in the project root and then will create a symlink to it from the /current folder.

You could create a deployment hook if the symlink needs to be located somewhere else.

For example:

ln -s {{ projectPath}}/.env {{ releasePath }}/path/to/folder/.env