A client who outgrows shared hosting rarely asks for "a server". They ask for somewhere to put their data that's backed up, encrypted in transit and someone else's problem at 3am. DigitalOcean's managed databases fit that request, and Blesta already knows how to bill for recurring services. The work lies in joining the two so that each Blesta event does the right thing to a real, hourly-billed cluster.
This walkthrough follows a database service through its whole life in Blesta.
Pick the engines your clients will buy
DigitalOcean runs six engines as managed clusters. Before building anything, decide which ones you want in your catalogue:
| Engine | Typical client |
|---|---|
| PostgreSQL | Web apps, SaaS products, anything relational |
| MySQL | WordPress at scale, older PHP applications |
| MongoDB | JSON-heavy apps and prototypes |
| Valkey | Caching, sessions and queues (Redis-compatible) |
| Kafka | Event pipelines between services |
| OpenSearch | Site search, log and metrics analysis |
Most hosts start with PostgreSQL and MySQL, then add Valkey because the same clients want a cache. Kafka and OpenSearch are specialist products with larger minimum sizes; offer them when you have clients asking.
Keep version numbers out of your package names. DigitalOcean's supported versions move on regularly, and a package called "PostgreSQL" ages better than one tied to a release that will be retired.
PostgreSQL and MySQL come with a further decision. DigitalOcean splits both into a Standard Edition and an Advanced Edition, and from 30 November 2026 new Standard Edition clusters are capped at 4 GiB RAM and can't have standby nodes. If you want to sell big or highly available PostgreSQL or MySQL, those packages need to be Advanced Edition from the start, because a cluster can't switch edition later.
The Blesta side: one module row, one package per engine
The module row. In DigitalOcean, create an API token that can both read and write. In Blesta, open Settings → Company → Modules, choose Manage on the database module and add the token as an account. Blesta calls this a module row, and every database package provisions through it.
The packages. Create one package per engine (and per edition, for PostgreSQL and MySQL) under Packages → Browse Packages. Its Module Options set the defaults: engine, region, plan, engine version and whether high availability is on. A practical tip: choose the engine, save, then reopen the package, so the plan and version lists show what that engine actually offers.
Client choices. A package alone sells one fixed configuration. To let clients choose region, size, version or high availability, attach a configurable option group whose values come from DigitalOcean's live catalogue, then price each value under Packages → Configurable Options. Some pairs don't exist (Atlanta, Richmond and Kansas City carry only some plans), so an order for an impossible combination should be stopped before the invoice is paid.
Region and version only matter when a cluster is created. Consider unticking Client can Edit on those two options so clients don't expect a later change to move their data.
The order form. Add the package group to an order form under Packages → Order Forms, and keep Blesta's cron running. Clusters take a few minutes to come online, and it's the cron that records their connection details afterwards.
What the client gets on their service page
Everything a client needs should live on the service's manage page, so routine requests never reach your ticket queue:
-
Information tab: engine, plan, region and status, plus a connection window with host, port, database, user and a masked password, each copyable. A ready-made command for
psql,mysql,mongosh,redis-cli, a Kafka client orcurlconnects over TLS. - Trusted Sources tab: the addresses allowed to connect. Worth explaining to clients: with no entries, DigitalOcean lets any address try to connect. Adding their app server's IP locks it down.
- Regenerate password: a fresh credential in seconds, without touching the data. Remind clients to update their applications afterwards.
- Backups tab: DigitalOcean's daily automated backups, listed only for PostgreSQL and MySQL clusters in Standard Edition.
- Activity tab: what happened and whether it succeeded.
Three engines have quirks worth covering. Kafka clients must trust a CA certificate issued for their cluster; give them a download. OpenSearch clients want the address of OpenSearch Dashboards. And Valkey starts with a noeviction memory policy, so a full cache rejects writes until the client switches to a least-recently-used policy.
What each Blesta action should do
| Blesta action | Effect on the cluster |
|---|---|
| Activate | A dedicated cluster is created in your DigitalOcean account |
| Change package or plan | Resized in place; same host, data intact |
| Suspend | Trusted sources saved, replaced by a rule nothing matches |
| Unsuspend | The saved trusted sources come back unchanged |
| Cancel | Cluster deleted, and the deletion confirmed with DigitalOcean |
Managed clusters can't be powered off, which is why suspension works through the firewall instead. Moving a service to a package with a different engine or edition should be refused rather than attempted: that's a new service and a data migration.
Where the money leaks
- Suspension doesn't pause DigitalOcean's meter. You pay for a suspended cluster every hour it exists, so cancel services that stay overdue rather than leaving them suspended for months.
- Cancelling is final. DigitalOcean's backups belong to the cluster and go with it. Consider routing database cancellations through a ticket so the client exports first.
- Failover isn't free. Extra standby nodes, the three nodes of MySQL Advanced Edition or OpenSearch's three-node layout all multiply DigitalOcean's charge. Price the high availability option to match.
- Rebuilding options resets prices. When you refresh the option group from DigitalOcean's catalogue, check your prices again before the next order.
- Orphans and ghosts. A cancellation that failed silently leaves a cluster billing you; a cluster deleted in DigitalOcean's control panel leaves a service billing the client for nothing. Your tooling should catch both.
The module we built for this
Our answer is PD DigitalOcean Databases for Blesta. It covers all six engines from one module row, generates the configurable option group from DigitalOcean's catalogue, gives clients the tabs described above, suspends through the firewall and keeps retrying a cancellation until DigitalOcean confirms the cluster is gone. Hosts who sell a single engine can use one of the single-engine modules instead, such as PD DigitalOcean MySQL or PD DigitalOcean Kafka. All of them are installed from the free PD Modules panel.
Setup details are on its Blesta page, and questions about running databases through Blesta are welcome below.
PD Modules is made by Projektif Digital Ltd, the team behind PD Hosting.
Top comments (0)