Before you start
The read-through driver requires Laravel 13.26.0 or later. Run
composer update laravel/framework before continuing. If your old provider is S3-compatible, you’ll also need league/flysystem-aws-s3-v3; see the Object Storage prerequisites.Step 1: Create your Laravel Object Storage bucket
If you haven’t already, create a Laravel Object Storage bucket and attach it to your environment. Note its disk name (for example,r2); Laravel Cloud automatically injects the AWS_* credentials your application needs to reach it.
Leave your old provider’s credentials in place; you’ll need them for the fallback disk in the next step.
Step 2: Configure your old provider as a fallback disk
Inconfig/filesystems.php, add a disk entry for your old provider using whatever credentials it requires:
Step 3: Add a read-through disk
Combine your new Laravel Cloud bucket (primary) and your old provider (fallback) into a single read-through disk:
Storage::exists and Storage::size, consult either disk without triggering a copy.
Step 4: Point your application at the read-through disk
UpdateFILESYSTEM_DISK to your new read-through disk, and redeploy:
Storage::disk('assets'), or the default Storage facade, transparently pulls from whichever bucket actually has the file, and quietly migrates it to Laravel Cloud along the way.
Step 5: Speed up the migration (optional)
Waiting for real traffic to touch every file can leave rarely accessed files on your old provider indefinitely. To migrate everything up front instead, loop over the fallback disk’s contents and read each file through the read-through disk:For large buckets, dispatch this as a queued job per file (or per batch of files) instead of running it inline.
Step 6: Retire the old provider
Once every object in your old bucket exists in Laravel Cloud, remove the fallback. Use your storage provider’s inventory or compare the object keys in both buckets to confirm the migration is complete:- Set
FILESYSTEM_DISKback to your bucket’s disk name (r2). - Remove the
legacyandassetsdisk entries fromconfig/filesystems.php. - Redeploy.
- Cancel or delete the bucket with your old provider.

