Upload storage
/dashboard/settings/upload-storage
Upload storage is where Chevereto keeps the files uploaded by users. You can add one or more storage servers to take these files off your website's server, which reduces its load and makes it easier to scale.
Site storage
Check the Site storage documentation to control where website assets (logo, covers, avatars, etc.) are stored.
How it works
When a file is uploaded, Chevereto sends it to an active storage server, along with its thumbnail (.th.) and medium (.md.) versions. That server exposes the files over HTTP, so visitors load them from the storage URL instead of from your website.
- If there's one active storage, all uploads go there.
- If there are several active storages, each upload goes to a random storage other than the one used last, spreading files across them.
- Each storage only takes the file types selected in its Enabled types.
- If no active storage takes the uploaded file type, the file is stored on your website's server, at the File path configured in File uploads.
The Storage mode and File naming method settings in File uploads also apply to upload storages.
Existing files are not moved
Adding, disabling or editing a storage only affects files uploaded from then on. Files already stored stay where they are. To move them, copy the files yourself and then use Migrate upload storage records.
Storage list
The page lists every storage with its ID, name, API, quota (capacity and space used) and status.
| Action | Effect |
|---|---|
| Name | Click it to edit the storage |
| Active | Toggle to enable or disable the storage for new uploads |
| Search | Opens a search for the files in this storage (storage:<id>) |
| Delete | Deletes the storage and all the files stored there. Can't be undone. |
Below the list, Chevereto shows the disk used by files stored on your website's server (Local), by upload storages (External) and by both (All), each with a link to search those files (storage:local, storage:external).
Deleting a storage deletes its files
Deleting a storage deletes every file in it, both from the storage server and from your website. To stop using a storage while keeping its files, disable it instead.
Adding storages
Click Add storage, choose the API and fill in the values it requires.
When you add a storage, enable a disabled one, or change its API or credentials, Chevereto uploads and then deletes a test file (Chevereto_test_<date>.png) to check the connection. If the test fails, the provider's error is shown and nothing is saved.
When encryption is enabled, Chevereto stores the storage credentials encrypted.
Storage URL
The storage server must provide a publicly accessible URL for reading files. Check your service provider's documentation for the correct URL format.
Chevereto uses the storage URL as a base URL to map stored files to their public location: the mapped URL is the storage URL followed by the file's path in the storage.
Amazon S3 with Direct storage mode:
| Property | Value |
|---|---|
| Bucket | my-bucket |
| URL | https://s3.amazonaws.com/my-bucket/ |
| Stored file | image.jpg |
| Mapped URL | https://s3.amazonaws.com/my-bucket/image.jpg |
Use a CNAME
It is recommended to use a URL that matches your own domain. Take advantage of a CNAME record to avoid exposing your storage provider's domain directly.
Amazon S3 with Datefolders storage mode and a custom CNAME (img.domain.com):
| Property | Value |
|---|---|
| Bucket | img.domain.com |
| URL | https://img.domain.com/ |
| Stored file | 2020/10/06/image.jpg |
| Mapped URL | https://img.domain.com/2020/10/06/image.jpg |
Storage URL with CDN
To use a CDN, create a pull zone at your CDN provider pointing to the origin storage URL.
For Amazon S3, the origin URL looks like:
https://s3.amazonaws.com/my-bucket/Your CDN will provide a URL such as:
https://pullzone-url.at.cdn-service.com/Adding a CNAME record for the CDN URL lets you use a custom storage URL like:
https://s3-cdn.domain.com/Files are uploaded with Cache-Control: public, max-age=31536000, so CDNs and browsers can cache them for up to one year.
Providers
Upload storage supports Alibaba Cloud OSS, Amazon S3, Backblaze B2 (legacy API), FTP, Google Cloud, Local, Microsoft Azure, OpenStack, S3 compatible and SFTP. Check Storage providers for setup instructions for each one.
Chevereto Free and Lite can use Local, Amazon S3 and S3 compatible. All providers are available in Chevereto Pro. Providers not available in your edition are listed with a * and can't be selected.
- If
CHEVERETO_ENABLE_EXTERNAL_STORAGE_PROVIDERSis set to0, only Local can be selected. - If
CHEVERETO_ENABLE_LOCAL_STORAGEis set to0, Local isn't offered and files can't be stored on your website's server, so uploads fail withNo storage availableunless there's an active storage for the uploaded file type. CHEVERETO_MAX_STORAGESlimits how many storages can be added (0for no limit). See Limits.
Storage values (common)
API
The storage provider. See Providers.
| Type | Example |
|---|---|
| Select | Amazon S3 |
Name
The name for the storage.
| Type | Accepted |
|---|---|
| String | max length 32 |
Bucket
The bucket where the files will be stored. Used by Alibaba Cloud OSS, Amazon S3, Backblaze B2, Google Cloud and S3 compatible. Microsoft Azure and OpenStack call it Container.
| Type | Description |
|---|---|
| String | The bucket name |
Key
The API key to access storage.
| Type | Description |
|---|---|
| String | Public key |
Secret
The API secret to access storage.
| Type | Description |
|---|---|
| String | Secret key |
Storage capacity
The maximum space this storage can use. Leave it blank or 0 for no limit.
| Type | Example |
|---|---|
| String | 20 GB, 1 TB |
When an upload doesn't fit in the space left, Chevereto sends it to another active storage with enough space. If none has enough space, the upload fails with No space left on storage.
Space used is the combined size of the original, medium and thumbnail of every file in the storage. If it gets out of sync, use Rebuild upload storage stats.
URL
The URL where the files in this storage are publicly available. See Storage URL.
| Type | Example |
|---|---|
| String | https://storage1.demo.chevereto.com/bucket/ |
WARNING
For the example above, a file at https://storage1.demo.chevereto.com/bucket/example.jpg should be resolving.
Enabled types
The file types this storage takes. All types are selected by default.
| Value | Description |
|---|---|
| Image | Store image uploads |
| Video | Store video uploads |
Alibaba Cloud OSS
Storage type: oss
Uses Bucket, Key, Secret and URL, plus the endpoint.
| Value | Description |
|---|---|
| Endpoint | Alibaba Cloud OSS endpoint |
Amazon S3
Storage type: s3
Uses Bucket, Key, Secret and URL, plus the region. If your S3 provider isn't AWS, use S3 compatible.
| Value | Description |
|---|---|
| Region | Amazon S3 region, selected from a list |
| Use path style endpoint | Use endpoint/bucket instead of bucket.endpoint |
Chevereto doesn't set an ACL on uploaded files, so the bucket must make its objects publicly readable.
Backblaze B2 (legacy)
Storage type: b2
This is for the deprecated B2 API. For new buckets, use S3 compatible as described in Storage providers.
Uses Bucket and URL. Key and Secret take the B2 credentials:
| Value | Description |
|---|---|
| Key | keyID |
| Secret | Master Application Key |
FTP
Storage type: ftp
| Value | Description | Example |
|---|---|---|
| Server | IP address or hostname | 127.0.0.1 ftp.chevereto.com |
| Path | Absolute path in the context of the FTP login (/ for root) | /path/in/server/ |
| User | FTP user | username |
| Password | FTP password | password |
| URL | See URL |
Google Cloud
Storage type: gcloud
Uses Bucket and URL, plus a service account key in JSON format.
| Value | Description |
|---|---|
| Private key | Google Cloud JSON key |
Local
Storage type: local
Stores the files in a path on the server running Chevereto.
| Value | Description |
|---|---|
| Path | Local path where files will be stored |
| URL | See URL |
Microsoft Azure
Storage type: azure
Uses Bucket (the container) and URL, plus:
| Value | Description |
|---|---|
| Account | Microsoft Azure AccountName |
| Key | Microsoft Azure AccountKey |
| Endpoint | Microsoft Azure endpoint (optional) |
OpenStack
Storage type: openstack
| Value | Description |
|---|---|
| Service name | For example, swift |
| Identity URL | Identity API endpoint |
| Username | The username |
| Password | The password |
| Region | Storage region |
| Container | Storage container |
| Tenant id | Tenant id (account id), optional |
| Tenant name | Tenant name (account name), optional |
| URL | See URL |
S3 compatible
Storage type: s3compatible
Uses Bucket, Key, Secret and URL, plus:
| Value | Description |
|---|---|
| Region | Storage region |
| Endpoint | Storage endpoint, starting with http:// or https:// |
| Use path style endpoint | Use endpoint/bucket instead of bucket.endpoint |
Files are uploaded with the public-read ACL, except on Cloudflare R2, which doesn't support ACLs. For Cloudflare R2, if the endpoint ends with /<bucket>, Chevereto removes that part.
SFTP
Storage type: sftp
Same as FTP, but using the SSH File Transfer Protocol.
