Environment configuration folder created automatically on server for security.yaml

I recently realized Grav automatically created a bunch of environment folders under user/ on my production server. Nobody actually used the admin and saved configurations. All of the folders contain a config folder with just the security.yaml file with salt: …

The names of these folders are from a bunch of websites and addresses linked in the site on various pages. How do these get created and how can I stop this? I’ve had grave for many years and never had this issue. I need to manually delete these folders in order to properly manage the repo on git.

@filo91, See issue Multiple security.yaml files #3432

The explanation from the devs:

But generally, every host/site should have its own salt as it is used for example for the form nonces and caching the content.

If you create folder /user/env/, the environments folders will be created inside that folder.

For more background information on ‘environments’ please read the thread.

Thank you for pointing that. I didn’t really understand why it happens, but at least we can put everything under one folder which is a nice way to deal with it and exclude it from gitignore.