PD Cloudflare R2 for Blesta

PD Cloudflare R2 — Sell Zero-Egress S3 Storage from Your Cloudflare Account via Blesta

Sell S3-compatible storage with ZERO egress fees — provisioned, metered and billed in Blesta

Made and supported by Projektif Digital Ltd. Runs inside PD Modules, the panel every module installs into.

Object Storage

PD Cloudflare R2 lets a hosting company sell S3-compatible object storage with no data-transfer charges, as a package in Blesta. Your customer orders a storage package, and a private R2 bucket with its own access keys is created in your Cloudflare account within minutes. Because R2 does not charge for standard data transfer out, you can price storage without worrying about customers who download heavily. You set the price, Cloudflare bills you at cost, and the difference is your margin.

It is built for hosts who want to offer backup and file storage that behaves like S3 with every standard tool, without egress bills eating into the margin and without handing out Cloudflare logins.

Why hosts choose PD Cloudflare R2

No egress fee to plan around. You pay Cloudflare for gigabytes stored per month plus write and read operations. A large restore or a busy download produces no transfer bill, so a customer who moves a lot of data costs you the same as one who does not.

EU-only data residency on request. Customers can choose a data location: Automatic, a regional placement hint in North America, Europe or Asia-Pacific and Oceania, or European Union only. With European Union only, the bucket is created in Cloudflare's EU jurisdiction and its data stays on EU infrastructure.

Isolation enforced by Cloudflare. Each service gets its own bucket and its own API token scoped to that bucket alone. Even a compromised customer token cannot reach other customers' buckets or your Cloudflare account.

Works with the S3 tools customers already use. R2 is S3-compatible, so the AWS CLI, rclone, s3cmd, Cyberduck, cPanel backup destinations and WordPress backup plugins all connect with the values shown in the client portal.

Quotas you can sell in tiers. Blesta does not invoice usage-based overage, so storage is sold in quota tiers, one package option per tier. Usage is measured daily and shown to customers against their quota.

Only what R2 can really do. R2 has no object versioning, so the module never offers it. Nothing in the interface promises a feature that would only fail.

How it works

  1. Connect your Cloudflare account. Create an API token with R2 Storage Edit, Account Analytics Read and API Tokens Edit permissions, scoped to the account, and add it under Settings, Company, Modules as a Cloudflare Account. Test Connection checks it.
  2. Create your packages. Add a package with this module and your account, then use Generate options to build the Storage Quota, Max Buckets and Data Location options and price them under Configurable Options.
  3. Your customer orders. They pick a quota and a data location and pay. Once the invoice is paid, Blesta provisions the service and the bucket and token are created.
  4. You get paid, they manage it. Blesta keeps billing as usual. Upgrades and downgrades use Blesta's normal flow and keep the customer's data.
The package's module options: Cloudflare account, quota behaviour, the controls your customers get and the default data location
The package's module options: Cloudflare account, quota behaviour, the controls your customers get and the default data location

What you get in Blesta

Selling and pricing

  • Package options generated in one click: Storage Quota from 10 GB to 5 TB or Unlimited, Max Buckets from 1 to 10, and Data Location
  • Choose which options customers see; anything you hide uses the package's default
  • Customers are emailed at 80% and again at 100% of their quota, and you can copy those emails to your administrators
  • Customer bucket names start with a prefix you choose, so your brand is on every bucket
  • More than one Cloudflare account, with packages assigned to different ones

Provisioning you can trust

  • One bucket and one scoped token per service, created automatically once the service is provisioned
  • A service added to a client directly from their profile is provisioned the same way
  • If no Cloudflare account is connected, an order is refused up front instead of leaving a half-made service
  • A failed setup is never shown as done: the customer sees a plain message and the exact error is kept in your Activity log
  • A temporary Cloudflare outage does not affect services already running, because customers use their own tokens directly
  • Moving a customer to a smaller plan than they already use never deletes anything

Running it day to day

  • Clients & Storage lists every service with its client, state, access mode, quota percentage, usage and last measurement
  • Set any service to read and write, read-only or disabled without changing the customer's keys or touching their data
  • Rotate a customer's keys in one click, with the old keys stopped immediately
  • Retention lists terminated services with a countdown to purge eligibility, with approve and hold controls. Cancelling a service in Blesta terminates it
  • Reconcile compares your Cloudflare account with Blesta and flags orphan buckets, missing buckets and stray tokens. It only reports and never changes anything
  • A health report covers the licence, Cloudflare account, services and metering

What your customers get

  • Connection details with copy buttons for the endpoint, bucket, data location and access key, and the secret key whenever they need it
  • Their own buckets, created and removed within the plan limit, with a typed confirmation before deletion
  • Automatic clean-up rules to delete files after a number of days
  • Expiring share links to download a file, or to let someone send one in, with no account on their side
  • Ready-made setups for the AWS CLI, rclone, s3cmd, Cyberduck and WinSCP, cPanel backups and WordPress backup plugins
  • Usage and operations: storage against their quota, a 30-day history, and read and write operation counts
Connected Cloudflare accounts under Settings, Company, Modules in Blesta
Connected Cloudflare accounts under Settings, Company, Modules in Blesta

Bucket management, share links and storage settings are each a switch on the package. Turn one off and it disappears from the customer's page and its actions are refused. The pages follow Blesta's client portal theme and are fully translatable.

Security built in

  • Your Cloudflare token is stored encrypted and never appears on a customer page.
  • A customer's token is bucket-scoped and is revoked at Cloudflare the moment their service terminates.
  • Suspension changes only what the token may do, and the customer's access key and secret stay the same through suspend and unsuspend.
  • Termination deletes nothing at once. Files are kept for a window you set, from 7 to 90 days, and the default purge mode needs your approval. An immediate purge needs the bucket name typed in.
  • Customers never see a raw Cloudflare error.

One product, every feature

PD Cloudflare R2 is one paid module with everything included: provisioning, metering, quotas, operation tracking, key rotation, retention and reconcile. There is no free tier. There are no per-gigabyte fees to us: your buckets live in your own Cloudflare account, you pay Cloudflare at cost and set your own sell price.

Quota emails warn at 80% and 100%. On R2, going over quota never pauses uploads, in either quota mode, because an R2 token cannot allow deleting files without also allowing uploads. You see every overage in your admin panel.

If your subscription ever lapses, nothing is deleted. You get a 14-day grace period with everything working, then admin management locks while customers keep being served, and only after that do customer features pause behind a neutral message. Terminated data is never purged while the module is unlicensed.

Requirements

  • Blesta 6 or later on PHP 8.2 or later, with the ionCube Loader
  • A Cloudflare account with R2 enabled. R2 is available on every Cloudflare plan but is switched on once from the dashboard, which asks for a payment method
  • Blesta's cron running, and its Provision Paid Pending Services task enabled
  • PD Modules, the free control panel every PD module installs into

Questions

Whose Cloudflare R2 account is used?

Yours. You connect your own account, and every customer bucket is provisioned into it. You pay the provider at cost, set your sell price in Blesta, and keep the difference.

How is each customer isolated?

Every order gets its own bucket and an R2 token scoped to that bucket alone. One customer's credential cannot reach another's data, and your master credentials stay on your Blesta server — they are never sent to the customer or stored in the client area.

How does billing work?

A daily task measures each service's real usage and writes it into Blesta's disk-usage fields. Native overage billing, quota warnings and the client-area usage graph then work exactly as they do for hosting products — there is nothing extra to configure.

What happens when a customer hits their quota?

New uploads are blocked, but downloads always keep working, so a customer over quota can still retrieve everything they have stored. Raising their plan restores uploads immediately with all data preserved.

Is data ever deleted automatically?

Only if you choose that. By default, terminating a service revokes access instantly but keeps the bucket and its contents for a retention window you set. Purging then needs your approval and typing the bucket name to confirm — there is no single click that destroys a customer's data.

Can customers upgrade or downgrade?

Yes, through the standard Blesta upgrade/downgrade flow. Quota changes apply with data preserved in both directions; downgrading below current usage pauses uploads rather than deleting anything.

What do I need on my Blesta server?

PHP 8.1+ and a working Blesta's cron. The module talks to Cloudflare R2 over its standard HTTPS API — there is nothing to install on the server and no daemon to run.

How is this different from PD Object Storage?

PD Object Storage is the flagship covering Amazon S3, Cloudflare R2, MinIO and DigitalOcean Spaces in one module. This edition is the same engine focused on Cloudflare R2 alone — choose it if that is the only backend you sell, and move up to the flagship if you later add another.

What happens if my subscription lapses?

Nothing of yours is touched, and nothing is deleted. The module steps down in stages instead: a 14-day grace period where everything still works and you get a renewal reminder, then admin management locks while your customers carry on being served, and only after that do the customer-facing features stop — behind a neutral "temporarily unavailable, please contact support" message that never mentions licensing to your customer. Anything the module provisioned keeps running in your own account throughout, and your data and settings stay exactly where they are. Renewing restores everything immediately.

What’s new in 0.1.60

  • Fixed: the Products screen listed nothing when the products were there. It now finds every product this module provisions, whichever billing system you run.

Get your website online with PD Hosting

UK hosting, domains and support from a real team. From a first site to a full server.

Terms and Conditions  ·  Privacy Policy

PD Hosting is the trading name of Projektif Digital Ltd, registered in England and Wales, company number 12482555.

PD Hosting
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.