Skip to main content

More S3-compatible Storage Options

I just switched from AWS to Cloudflare and Backblaze. Instead of adding remote storages one by one, would it be possible to add a generic S3 option? Then, we could use both S3 and Backblaze B2 (they use the same protocol).

That would be great!

Jonathan N.

And Hetzner, of course.

AndrΓ© Daus

Jonathan N.Β Hetzner is also S3 compatible (+1 for generic).

Thom Neil

I've been moving away from AWS to Wasabi, so I'd love to see a Wasabi option for the media module.

AndrΓ© Daus

Thom NeilΒ Wasabi is S3 compatible, too.

Paul Williams

Thom NeilΒ I’m using Wasabi instead of AWS…works like a dream! You just need to set it up in your config file. You can find the process under β€œOption B” here https://fluentcommunity.co/docs/configuring-amazon-s3/

You do need to add an endpoint line in there too.

AndrΓ© Daus

Paul WilliamsΒ this does not seem to work with B2. Can you share a complete example, please?

Paul Williams

Andre DausΒ I haven't tried this with B2 only Wasabi, but I think there maybe people who have tried to implement B2?!

AndrΓ© Daus

Paul WilliamsΒ B2 and Wasabi are S3 compliant. Hence, if you made it work with Wasabi, the same should work with B2. However, I either get an error message, or the data is stored locally despite the setup in wp-config.php.

I added a FLUENT_COMMUNITY_CLOUD_STORAGE_ENDPOINT, but it did not help? Hence, my question.

AndrΓ© Daus

I found it. Adding Backblaze B2 works via the amazon_s3 setting in the wp-config.PHP only.

define('FLUENT_COMMUNITY_CLOUD_STORAGE', 'amazon_s3');
define('FLUENT_COMMUNITY_CLOUD_STORAGE_REGION', 'eu-central-003'); // change with your region. If it's global just remove this line or keep it empty
define('FLUENT_COMMUNITY_CLOUD_STORAGE_ACCESS_KEY', 'yyyyyyyy');
define('FLUENT_COMMUNITY_CLOUD_STORAGE_SECRET_KEY', 'xxxxxxxx');
define('FLUENT_COMMUNITY_CLOUD_STORAGE_BUCKET', 'my-bucket'); // change with your bucket name
define('FLUENT_COMMUNITY_CLOUD_STORAGE_ENDPOINT', 's3.eu-central-003.backblazeb2.com');

However, it sets the Backblaze URL as src for each file, i. e., it works for public buckets only.

I will play with some offloading ideas, to use my custom domain which is not supported by the current implementation.

Gerard Godin

Andre DausΒ I've got mine set up with B2 thanks to you. :)

Gerard Godin

Andre DausΒ Did you figure out if you could use a custom domain?

AndrΓ© Daus

Gerard GodinΒ I set it up via Cloudflare to save on egress fees. But it works with public B2 buckets only. If you use a private bucket, you need a Cloudflare Worker to handle the connection, and that is not covered with the above solution.

Gerard Godin

Andre DausΒ I think I'll retry CF R2 this weekend. I suspect that I was using a Private setting and it's why I had issues. Thanks again

Gerard Godin

Am now all set up on CF, using a custom domain. As far as I understand, my bucket is public.

Files upload to CF, but in Community I get the error below, and no images show afterwards either:

AndrΓ© Daus

Gerard GodinΒ That looks like there is something wrong with the domain settings. I had that issue with B2 private bucket and custom domain. I ended up with using R2 with a custom domain. However, I was unable to add details via the GUI. I just added all the details in wp-config and it worked. That is perfectly fine since I usually add all credentials in the PHP file.

Gerard Godin

Andre DausΒ it’s what I did too here :)

I’ll open a ticket and see what the Ninjas can figure out

Kristen Jerry

Thanks for sharing this. I got it working with Digital Ocean storage.