Clouflare R2 with Firebase

511 views Asked by At

I'd like to integrate the Cloudflare R2 (object storage) with my Firebase project.

Normally you would use Firebase Storage but since Google Cloud has some insanely high egress fees, I'd prefer to use Cloudflare R2 as a storage option.

Do you know if Firebase/Google allows such an integration? And if so, how could it be done?

Further, is it possible to use the Cloudflare CDN instead of the Firebase CDN?

I've tried to achieve said integration but so far, I'm kinda clueless.

1

There are 1 answers

0
Dharmaraj On

Firebase Storage and Cloudflare R2 are totally different services and there's nothing like an integration. Firebase security rules work only for Firebase storage and if you use R2, you'll have to update your application as per their data access system.

You would ideally be storing files in either of the 1 places so hat integration are you looking for? You are also charged for number of operations performed so do consider that pricing as well instead of just bandwidth.

Additionally, if your application will be serving a lot of files, consider using Cloud CDN (if using Firebase Storage) that'll significantly reduce egress charges.