Shared directories

You can specify directories that will be shared amongst all servers that make up your environment and persisted across multiple deployments. One built-in example of this is the assets directory, but you can specify your own.

In this example we will create mydir. We use the mysite key to identify that this will be a shared directory on the base environment, to distinguish between base and virtual stacks:

    mydir: {}

Virtual stacks can also be configured this way too:

    mydir: {}

Your shared directory is accessible from the web root and public by default. For the example above, a file called example.txt within your shared directory can be accessed by visiting

If you use a shared directory with the same name as an existing file or folder within your web root, the shared directory will take precedence and overwrite the existing file or folder.

If you remove a shared directory from .platform.yml it will no longer be symlinked into your web root, but for safety reasons it will not be removed from the storage volume. Please contact the Service Desk if you require data to be purged. 

Caution: Shared directories other than the built-in assets/ are not included in snapshots.

Was this answer helpful? Yes No

Sorry we couldn't be helpful. Help us improve this article with your feedback.