Volumes are a feature designed to allow you to share data between containers. This also allows you to store data outside of your application
folder, share data between containers, or provide users with access to specific files.
✕
next to the container name in the Linked Containers field.There are two ways to connect to a volume, both of which are done via SSH and sFTP.
container
folder.
volumes
folder and find your volume.volumes
folder.When you set up a volume, it exists as an extra directory in your container. By default, it is not set up to serve files on your container.
To allow your website to use the files found within the volume, you will need to make a symbolic link inside the container. Below is a set of instructions to do this:
ln -s /container/volumes/[volume-name] [directory name]
For example, if you wished to serve videos on example.com/assets/videos
, which are stored on a volume called assets
under the videos
folder, you would run:
cd /container/application/public
ln -s /container/volumes/assets
This will create a symlink from /container/application/public/assets
to /container/volumes/assets
, allowing you to serve any files in that volumes on your site.
If you wish to only serve the videos within the assets
volume, you can run:
cd /container/application/public
ln -s /container/volumes/assets/videos videos
You cannot use the root (
~
) of your SSH user in the path! You either need to use a relative path or an absolute path with/container
as the root directory.
When you SSH into a volume, or a container with a volume attached to it, you'll be able to find the backups in the backups
folder.
When your SSH user is connected to a volume (or multiple volumes), this folder will be located in the root directory, alongside the volumes
folder.
When your SSH user is connected a container, this folder will be located in the container's files. You will need to navigate into the volumes
subdirectory under backups
to find the backups for each volume.
To delete a volume, you will need to remove it from all connected containers manually. This can be done by following the instructions above regarding Connecting and Removing a Volume.
Once there are no attached containers, you can delete the volume.
Make sure there's no data you wish to keep! Deleting the volume means that you'll lose the data of the volume.