Skip to content
Media CloudDocs
Happy HolidaysSave 20% with codeValid through December 31Shop the sale
Cloud Storage Variables
On this page

Cloud Storage Variables

These environment variables control how Cloud Storage is configured and used.

4 min read·2 tags

These environment variables control how Cloud Storage is configured and used. Every setting in the plugin maps to an environment variable by uppercasing its option name and replacing hyphens with underscores.

Provider selection

VariableTypeDescription
MCLOUD_TOOL_ENABLED_STORAGEbooleanEnables the Cloud Storage tool.
MCLOUD_STORAGE_PROVIDERstringStorage provider. Valid values: s3, google, cloudflare, do, bunnycdn, dreamhost, minio, other-s3, backblaze-s3, supabase, wasabi, backblaze.

wasabi and backblaze select the deprecated native drivers. Use other-s3 or backblaze-s3 for current S3-compatible connections.

S3 and S3-compatible providers

These variables apply to Amazon S3, Minio, DreamHost, Backblaze S3, Cloudflare R2, and other S3-compatible providers.

VariableTypeDescription
MCLOUD_STORAGE_S3_ACCESS_KEYstringAccess key.
MCLOUD_STORAGE_S3_SECRETstringSecret key.
MCLOUD_STORAGE_S3_USE_CREDENTIAL_PROVIDERbooleanLoad credentials from the environment or ~/.aws/credentials.
MCLOUD_STORAGE_S3_REGIONstringRegion name, or auto to detect it.
MCLOUD_STORAGE_S3_CUSTOM_REGIONstringCustom region when MCLOUD_STORAGE_S3_REGION=custom.
MCLOUD_STORAGE_S3_BUCKETstringBucket name.
MCLOUD_STORAGE_S3_ENDPOINThostEndpoint host for S3-compatible services.
MCLOUD_STORAGE_S3_USE_PATH_STYLE_ENDPOINTbooleanUse path-style requests. Required by most S3-compatible services.
MCLOUD_STORAGE_S3_USE_TRANSFER_ACCELERATIONbooleanEnable S3 transfer acceleration.

Provider-specific variables

VariableTypeDescription
MCLOUD_STORAGE_GOOGLE_BUCKETstringGoogle Cloud Storage bucket.
MCLOUD_STORAGE_GOOGLE_CREDENTIALS_FILEpathPath to the Google service account JSON.
MCLOUD_STORAGE_CLOUDFLARE_R2_PUBLIC_URLurlPublic bucket URL for Cloudflare R2.
MCLOUD_STORAGE_BACKBLAZE_S3_PRIVACYstringpublic-read or authenticated-read, matching the B2 bucket.
MCLOUD_STORAGE_SUPABASE_URLurlSupabase project URL.
MCLOUD_STORAGE_SUPABASE_KEYstringSupabase service_role key.
MCLOUD_STORAGE_SUPABASE_BUCKETstringSupabase bucket name.
MCLOUD_STORAGE_BUNNYCDN_APIKEYstringBunny CDN storage API key.
MCLOUD_STORAGE_BUNNYCDN_STORAGE_ZONEstringBunny storage zone name.
MCLOUD_STORAGE_BUNNYCDN_PULL_ZONEurlBunny pull zone URL.
MCLOUD_STORAGE_BUNNYCDN_REGIONstringBunny storage region.
MCLOUD_STORAGE_BUNNYCDN_TOKEN_AUTH_KEYstringBunny URL token authentication key.
MCLOUD_STORAGE_BUNNYCDN_SIGNED_MATCHESstringURL patterns to sign for Bunny.

Upload and privacy

VariableTypeDescription
MCLOUD_STORAGE_PRIVACYstringDefault ACL: public-read or authenticated-read.
MCLOUD_STORAGE_PRIVACY_IMAGESstringACL for image uploads: inherit, public-read, authenticated-read.
MCLOUD_STORAGE_PRIVACY_VIDEOstringACL for video uploads.
MCLOUD_STORAGE_PRIVACY_AUDIOstringACL for audio uploads.
MCLOUD_STORAGE_PRIVACY_DOCSstringACL for document uploads.
MCLOUD_STORAGE_PREFIXstringUpload path prefix. Supports the path tokens.
MCLOUD_STORAGE_UPLOAD_IMAGESbooleanUpload images.
MCLOUD_STORAGE_UPLOAD_VIDEOSbooleanUpload video files.
MCLOUD_STORAGE_UPLOAD_AUDIObooleanUpload audio files.
MCLOUD_STORAGE_UPLOAD_DOCUMENTSbooleanUpload documents.
MCLOUD_STORAGE_IGNORED_MIME_TYPESstringMIME types to skip.
MCLOUD_STORAGE_OVERWRITE_EXISTINGbooleanOverwrite existing files instead of adding a unique prefix.
MCLOUD_STORAGE_CACHE_CONTROLstringCache-Control metadata for uploads.
MCLOUD_STORAGE_EXPIRESnumberExpires metadata in minutes.
MCLOUD_STORAGE_DELETE_FROM_SERVERbooleanDelete files from storage when deleted from the media library.
MCLOUD_STORAGE_DELETE_UPLOADSbooleanDelete local files after upload.
MCLOUD_STORAGE_DISPLAY_BADGEbooleanShow the cloud icon in the media library.

URLs and delivery

VariableTypeDescription
MCLOUD_STORAGE_CDN_BASEurlCDN base URL for images.
MCLOUD_STORAGE_DOC_CDN_BASEurlCDN base URL for non-image files.
MCLOUD_STORAGE_USE_PRESIGNED_URLSbooleanGenerate signed URLs.
MCLOUD_STORAGE_PRESIGNED_EXPIRATIONnumberSigned URL lifetime in minutes.
MCLOUD_STORAGE_FORCE_WEBPbooleanUse WebP URLs when a WebP file exists.

Multisite

VariableTypeDescription
MCLOUD_STORAGE_SUBSITE_PREFIXESstringPer-site upload path overrides.
MCLOUD_STORAGE_KEEP_SUBSITE_PATHbooleanKeep the site/<id>/ segment when a custom prefix is used.

Need a hand with this guide?

Send support the exact step you’re stuck on and we’ll help you finish the setup.

Contact support
Start typing to search the docs

Escto close·⌘Kto open

View all results →