Skip to content

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.

ActionEffect
NameClick it to edit the storage
ActiveToggle to enable or disable the storage for new uploads
SearchOpens a search for the files in this storage (storage:<id>)
DeleteDeletes 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:

PropertyValue
Bucketmy-bucket
URLhttps://s3.amazonaws.com/my-bucket/
Stored fileimage.jpg
Mapped URLhttps://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):

PropertyValue
Bucketimg.domain.com
URLhttps://img.domain.com/
Stored file2020/10/06/image.jpg
Mapped URLhttps://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:

text
https://s3.amazonaws.com/my-bucket/

Your CDN will provide a URL such as:

text
https://pullzone-url.at.cdn-service.com/

Adding a CNAME record for the CDN URL lets you use a custom storage URL like:

text
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_PROVIDERS is set to 0, only Local can be selected.
  • If CHEVERETO_ENABLE_LOCAL_STORAGE is set to 0, Local isn't offered and files can't be stored on your website's server, so uploads fail with No storage available unless there's an active storage for the uploaded file type.
  • CHEVERETO_MAX_STORAGES limits how many storages can be added (0 for no limit). See Limits.

Storage values (common) ​

API ​

The storage provider. See Providers.

TypeExample
SelectAmazon S3

Name ​

The name for the storage.

TypeAccepted
Stringmax 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.

TypeDescription
StringThe bucket name

Key ​

The API key to access storage.

TypeDescription
StringPublic key

Secret ​

The API secret to access storage.

TypeDescription
StringSecret key

Storage capacity ​

The maximum space this storage can use. Leave it blank or 0 for no limit.

TypeExample
String20 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.

TypeExample
Stringhttps://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.

ValueDescription
ImageStore image uploads
VideoStore video uploads

Alibaba Cloud OSS ​

Storage type: oss

Uses Bucket, Key, Secret and URL, plus the endpoint.

ValueDescription
EndpointAlibaba 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.

ValueDescription
RegionAmazon S3 region, selected from a list
Use path style endpointUse 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:

ValueDescription
KeykeyID
SecretMaster Application Key

FTP ​

Storage type: ftp

ValueDescriptionExample
ServerIP address or hostname127.0.0.1 ftp.chevereto.com
PathAbsolute path in the context of the FTP login (/ for root)/path/in/server/
UserFTP userusername
PasswordFTP passwordpassword
URLSee URL

Google Cloud ​

Storage type: gcloud

Uses Bucket and URL, plus a service account key in JSON format.

ValueDescription
Private keyGoogle Cloud JSON key

Local ​

Storage type: local

Stores the files in a path on the server running Chevereto.

ValueDescription
PathLocal path where files will be stored
URLSee URL

Microsoft Azure ​

Storage type: azure

Uses Bucket (the container) and URL, plus:

ValueDescription
AccountMicrosoft Azure AccountName
KeyMicrosoft Azure AccountKey
EndpointMicrosoft Azure endpoint (optional)

OpenStack ​

Storage type: openstack

ValueDescription
Service nameFor example, swift
Identity URLIdentity API endpoint
UsernameThe username
PasswordThe password
RegionStorage region
ContainerStorage container
Tenant idTenant id (account id), optional
Tenant nameTenant name (account name), optional
URLSee URL

S3 compatible ​

Storage type: s3compatible

Uses Bucket, Key, Secret and URL, plus:

ValueDescription
RegionStorage region
EndpointStorage endpoint, starting with http:// or https://
Use path style endpointUse 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.

Released under the Apache-2.0 License.