STORAGE_PROVIDER in your .env file.
Local Storage (Default)
By default, Volta stores all uploaded media in a local./uploads/ directory relative to the project root. The backend serves these files directly.
uploads/ directory is created automatically during installation. No additional configuration is needed.
Local storage is perfectly fine for development environments and small self-hosted teams. If you’re running Volta on a single server with a manageable amount of media, local storage keeps things simple with no external dependencies.
Cloudflare R2 (Recommended for Production)
For production deployments — especially those with multiple server instances or significant media volume — Cloudflare R2 is the recommended storage backend. R2 is S3-compatible object storage with no egress fees.Setting Up Cloudflare R2
Create an R2 bucket
Log into the Cloudflare dashboard, go to R2 Object Storage, and click Create bucket. Give it a name (e.g.
volta-media).Configure public access (optional)
If you want Volta-served media to be publicly accessible (e.g. for embedding images in posts), enable Public access on the bucket and note the public bucket URL.
Create an API token
In the R2 section, click Manage R2 API tokens → Create API token. Grant the token Object Read & Write permissions scoped to your bucket. Copy the Access Key ID and Secret Access Key — these are only shown once.
Find your Account ID
Your Cloudflare Account ID is shown in the right sidebar of any Cloudflare dashboard page under Account Home.
Add the variables to your .env
Fill in all six
CLOUDFLARE_* variables in your .env file using the values from the steps above. Set CLOUDFLARE_REGION=auto (this is always correct for R2).Variable Reference
| Variable | Description |
|---|---|
CLOUDFLARE_ACCOUNT_ID | Your Cloudflare account ID (found in the dashboard sidebar) |
CLOUDFLARE_ACCESS_KEY | R2 API token Access Key ID |
CLOUDFLARE_SECRET_ACCESS_KEY | R2 API token Secret Access Key |
CLOUDFLARE_BUCKETNAME | The name of your R2 bucket |
CLOUDFLARE_BUCKET_URL | Public or private URL for the bucket (ends with /) |
CLOUDFLARE_REGION | Always auto for R2 |
Switching Storage Providers
You can switch from local storage to R2 (or vice versa) at any time by updating your.env and restarting Volta. Files uploaded before the switch are not automatically migrated — they remain on the old storage backend. If you want to move existing files, you’ll need to copy them manually (e.g. from ./uploads/ to your R2 bucket) and ensure the file paths are consistent.