|
| 1 | +--- |
| 2 | +title: Volumes |
| 3 | +description: Learn how to configure persistent volumes on Stormkit to upload, manage and share files. |
| 4 | +--- |
| 5 | + |
| 6 | +# Volumes |
| 7 | + |
| 8 | +Stormkit's Volumes feature allows you to maintain persistent files across deployments. This feature is perfect for applications that need to store and manage persistent data such as configuration files, user-uploaded content, and other types of files that need to persist between updates. |
| 9 | + |
| 10 | +## Enabling Volumes (self-hosted) |
| 11 | + |
| 12 | +This step is necessary only for self-hosted users. |
| 13 | + |
| 14 | +To start using Volumes: |
| 15 | + |
| 16 | +1. Navigate to your application's environment |
| 17 | +2. Click on the "Volumes" tab in the navigation bar |
| 18 | +3. Click on "Configure" to set up your volume storage |
| 19 | + |
| 20 | +You will need `Admin` rights in order to configure the volumes configuration. |
| 21 | + |
| 22 | +<div class="img-wrapper"> |
| 23 | + <img src="/assets/docs/features/demo-volumes.png" alt="Persistent volumes configuration" /> |
| 24 | +</div> |
| 25 | + |
| 26 | +## Configuration |
| 27 | + |
| 28 | +Currently Stormkit supports file systems as persistent volumes. If you have a specific request (such as AWS S3, Alibaba OSS, Hetzner OSS or other storages), please [create a feature request](https://github.com/stormkit-io/app-stormkit-io/issues). |
| 29 | + |
| 30 | +### File System |
| 31 | + |
| 32 | +- **Root path**: The base path where your files will be stored (default: `/shared/volumes`) |
| 33 | + |
| 34 | +These settings will apply to all applications across your instance. |
| 35 | + |
| 36 | +## Managing Files |
| 37 | + |
| 38 | +- To upload files click on `Upload file` button. |
| 39 | +- To upload folders click on `Upload folders` button. The folder structure is maintained. |
| 40 | + |
| 41 | +For each file in your volume, you can: |
| 42 | + |
| 43 | +- Change file visibility (public or private) |
| 44 | +- Download the file |
| 45 | +- Delete the file |
| 46 | + |
| 47 | +<div class="img-wrapper"> |
| 48 | + <img src="/assets/docs/features/demo-volumes-files.png" alt="File explorer" /> |
| 49 | +</div> |
| 50 | + |
| 51 | +### Making Files Public |
| 52 | + |
| 53 | +By default, all uploaded files in your volume are private files. To make them public: |
| 54 | + |
| 55 | +1. Click the three dots menu (...) |
| 56 | +2. Select "Make public" |
| 57 | +3. Confirm your choice in the dialog |
| 58 | +4. Once public, you'll receive a URL to access the file |
| 59 | + |
| 60 | +## Accessing Files (self-hosted, file system) |
| 61 | + |
| 62 | +Self-hosted users using a File System volume can access files directly. |
| 63 | + |
| 64 | +The folder structure is as follows: |
| 65 | + |
| 66 | +``` |
| 67 | +# Folder structure |
| 68 | +<root-path>/a<app-id>e<env-id>/<path-to-file> |
| 69 | +
|
| 70 | +# Example |
| 71 | +root path: /shared/volumes |
| 72 | +app id : 152 |
| 73 | +env id : 235 |
| 74 | +file name: example/file-name.png |
| 75 | +
|
| 76 | +# Result |
| 77 | +/shared/volumes/a152e235/example/file-name.png |
| 78 | +``` |
| 79 | + |
| 80 | +## Note |
| 81 | + |
| 82 | +The Volumes feature is currently in beta. It's recommended to regularly backup important data and monitor storage usage. |
0 commit comments