-
Notifications
You must be signed in to change notification settings - Fork 4
Supabase storage to Cloudflare r2 migration
abhishekmg edited this page Jul 4, 2025
·
1 revision
Cloudflare offers a much more generous pricing tier and also it does not come with any egress fees
- The automatic migration in Cloudflare's dashboard did not work for some reason, the connection with Supabase s3 was successful but the assets were not fetched and was failing with an error
- So we had to download all the files from Supabase into our local machine and then upload it to R2
- For the upload we had to do it via a script as R2's dashboard had a limit of 300MB for uploads
- Then in Recollect's codebase we had to replace all the Supabase storage SDK with AWS S3 SDK as this was the one in Cloudflare's docs. This was the PR for that change https://github.com/timelessco/recollect/pull/331
- Then we had to write a script that updates all the existing CDN links in the DB rows to the r2's CDN link. This was just a replacement in the base URL for the CNN links