What the Module Does
The Flowtriq Blesta module ties your billing system to the Flowtriq API. When a client purchases a product with DDoS protection, the module provisions a Flowtriq workspace and node, generates a deploy token, and stores it on the service. Your client sees protection status, incidents, and install instructions right inside Blesta.
No manual API calls. No copy-pasting tokens between dashboards. The module handles create, suspend, unsuspend, and cancel for you.
Prerequisites
- Blesta 5.x or later
- PHP 8.1+ with the
curlandjsonextensions - A Flowtriq account with white-label enabled (included on all plans)
- An API deploy token from your Flowtriq dashboard under Settings > API
Installation
The module is not on the Blesta Marketplace yet. Download it from GitHub and extract it into your Blesta installation:
cd /path/to/blesta git clone https://github.com/Flowtriq/flowtriq-blesta.git components/modules/flowtriq
Or download the zip and extract manually:
wget https://github.com/Flowtriq/flowtriq-blesta/archive/refs/heads/main.zip unzip main.zip mv flowtriq-blesta-main /path/to/blesta/components/modules/flowtriq
After extracting, go to Settings > Modules > Available in your Blesta admin panel and click Install next to Flowtriq.
Configure a Module Row
Once installed, you need to add a module row that tells Blesta how to reach the Flowtriq API.
Go to Settings > Modules > Flowtriq > Add Module Row and fill in:
- API URL:
https://flowtriq.com/api(or your white-label domain) - Deploy Token: The API token from your Flowtriq dashboard (Settings > API)
Click Add Row. Blesta will test the connection and confirm the API responded.
Create a Product
Go to Packages > Browse > Create Package. Under the Module tab:
- Set Module to Flowtriq
- Set Module Row to the row you just created
- Under Package Fields, set the Domain field label to "IP Address" so clients enter the IP they want monitored instead of a domain name
Set your pricing, welcome email, and any other package settings as usual. The module does the rest at provisioning time.
What Happens on Provisioning
When a client's order is accepted (or auto-provisioned), the module makes the following API calls:
- Creates a workspace in Flowtriq for the client (if one does not already exist)
- Creates a node for the IP address the client entered
- Generates a deploy token and stores it as a service field in Blesta
- Returns the node status and install command to the client area
The client then installs ftagent on their server using the one-liner shown in their service details:
curl -sSL https://flowtriq.com/install.sh | sudo bash
The installer picks up the deploy token and starts reporting traffic data within seconds.
What Clients See
In the Blesta client area, the service detail page shows a DDoS Protection tab with:
- Protection status: Whether ftagent is online and reporting
- Active incidents: Any ongoing attacks with type, severity, and target IP
- Attack history: Past incidents with timestamps, duration, and peak traffic
- Install instructions: The curl one-liner with their deploy token pre-filled
Clients do not need a separate Flowtriq login. Everything is inside Blesta.
Suspend, Unsuspend, and Cancel
The module hooks into Blesta's service lifecycle:
- Suspend: Pauses monitoring on the Flowtriq node. The agent stops reporting and no alerts fire.
- Unsuspend: Resumes monitoring. The agent reconnects and traffic data flows again.
- Cancel: Deletes the node from Flowtriq and cleans up stored credentials in Blesta.
All API calls are logged in Blesta's module log. If a call fails, the action stays pending and you get a notification in the admin area.
Get the Blesta module. Download it from GitHub, connect your API token, and start selling DDoS protection to your hosting clients. Start your free 14-day trial.