Rochen One Dedicated
A dedicated compute pool: a single-tenant cPanel server on AWS EC2 in the region the client chooses, with all software included (cPanel, LiteSpeed, CloudLinux, Imunify360, KernelCare, JetBackup, MailChannels, Softaculous), as many sites as they like at no extra charge, managed from the app exactly like Rochen One Shared, and everything billed hourly in arrears by rochen-api.
Decisions
| Topic | Decision | Why |
|---|---|---|
| Billing shape | Nothing in advance, everything hourly in arrears. No management fee, no software lines, no per-site charge. | Chris: one price, all software included, billed like Rochen One usage. |
| Billing owner | rochen-api generates every Dedicated invoice from the change log, and also owns overdue suspension and termination. WHMCS skips everything Dedicated in code (invoice run, reminders, payment processing, suspension, termination, module actions). | Advancing the due date alone does not keep WHMCS away (November review). A code skip keeps the admin pages reading normally, where a "Free Account" cycle would confuse staff. |
| What is billed | Compute by template (region-priced) · storage allocated to the pool (100 GB minimum, R1 storage tier rates) · IOPS and throughput above the gp3 baseline · data transfer over the allowance. | Storage and extras are metered exactly like the rest of Rochen One. |
| Sites on a pool | Unlimited and free. There is one site product only, Rochen One Site (466). A site is a child of either Rochen One Shared (465) or a Rochen One Dedicated pool (464) and points at the matching server. Managed from the app exactly like Shared sites; no WHM or root for the client. | One site product keeps site detection by id intact everywhere; the parent's product decides pricing and behaviour. |
| Parent and children | Whatever happens to the pool happens to its sites: suspended, unsuspended, cancelled or terminated together. | The instance going down takes the sites with it; the rows must say the same. |
| Software | cPanel, LiteSpeed, CloudLinux, Imunify360, KernelCare, JetBackup, MailChannels and Softaculous, all included. The licence tier is assigned by the system from instance type and the number of sites on the pool, and moves up or down as sites come and go. | Chris + Jeremy's rules; no upsells. |
| Deploy gate | Stored card required and account in good standing. At order the card takes a small authorisation hold, released at once, so Stripe assesses it. If Stripe's risk level is elevated or highest, or Stripe puts the payment in review, the order waits for a staff review before anything is deployed. Otherwise the pool deploys on order. | Nothing is invoiced up front, but AWS cost starts at launch. Stripe scores every payment already; the hold gives it a payment to score. |
| Catalogue | One product (464), a new Dedicated server group, one option group per region matched by name. | Adding a region is data entry in WHMCS, no code. |
| Automation | Resumable queued jobs in rochen-api on their own queue supervisor; per-service AWS member account. | The legacy awscron path was never activated and has defects. |
| Code layout | Servers/AWS shared SDK wrappers · Services/AWS stays MCS-only · new Services/RochenOne/Dedicated. | The two products never share business logic, only AWS calls. |
| Hostname | Auto-generated adjective-noun.directrouter.com; DNS in Cloudflare and reverse DNS created by the deployment. | Rochen controls the zone; random names rule out phishing-style labels (Ben / Chris). |
The model in one picture
parent_id is the pool (464) instead of the Shared plan (465), and the parent decides everythingCatalogue
Product 464
| Field | Today | Becomes |
|---|---|---|
tblpricing (type product) | −1 in every currency | stays −1: there is no advance amount; tblhosting.amount is 0.00 as on every Rochen One service |
servergroup | 17 "AWS US" | new group Dedicated holding the region servers 498 London (eu-west-2), 500 Ohio (us-east-2), 506 Frankfurt (eu-central-1); MCS groups untouched |
autosetup | order | '': WHMCS must never call the legacy aws_CreateAccount |
tblproductconfiglinks | groups 8 and 10 | links removed, no group linked (region groups are found by name; the legacy module reads every linked group and would collide) |
| Custom fields | hostname, aws_username, aws_id, instance_id, zabbix_id, can_reboot, can_scale | add disk_size (allocated GB, as sites have); hostname is no longer written, the name lives on the pool's tblservers row |
tblhosting.username / password | — | null, as on the Shared container. The instance's root user and password are stored once, WHMCS-encrypted on the pool's own tblservers row, exactly like every cPanel server (the control-panel code signs in to WHM with them; no API token is used). Never exposed to the client |
Region option groups
Naming rule: Rochen One Dedicated (<region>) where <region> equals the hostname of a server in the Dedicated group. Prices in tblpricing per currency.
| Option | Type | Range | Priced? | Meaning |
|---|---|---|---|---|
Templates | dropdown | one sub-option per instance size, r1d.<type> | yes: monthly = hourly × 744 | the compute rate for the region |
IOPS | quantity | 3000–16000 | per 100 above 3000 | gp3 baseline included |
Throughput | quantity | 125–1000 MiB/s | per 25 above 125 | gp3 baseline included |
DataTransfer | quantity | 500 GB allowance | msetupfee allowance, monthly per GB above | outbound transfer |
cPanelLicence · LiteSpeedLicence · ImunifyLicence | dropdown | tier names | no | records the tier the system assigned, visible in the WHMCS service page (Chris's suggestion) |
DiskSize [1-5] … [201-*] sub-options in the client's currency), the same in every region. rochen-api walks those bands over the client's total dedicated storage. Folding shared-site storage into the same band is not done in v1 (it would need WHMCS billing code); see Open points.dedicated_templates holds one row per Templates sub-option (AMI per region, vCPU, RAM, EBS-optimized, burstable, description), edited from a new WHMCS admin page cloned from configawstemplates.php. php artisan dedicated:check-catalogue verifies regions, groups, templates and prices.
Included software & tiers
Licence products are not sold any more; they only supply the Manage2 package ids and CLN product codes. The tier rules live in config/dedicated.php. The count that drives them is the number of live Rochen One Site services whose parent is the pool (Active, Pending or Suspended); a daily reconcile compares it with the cPanel account list on the server.
| Software | Provider | Tier rule |
|---|---|---|
| cPanel & WHM | Manage2 (add to IP, change package) | 1 account → Solo · 2–5 → Admin · 6–30 → Pro · 31–100 → Premier 100 · then Premier 150, 200 … 500 |
| Imunify360 | CLN key, usage limit | 1 → 1 user · 2–30 → 30 users · 31–250 → 250 users · 251+ → unlimited |
| LiteSpeed | LiteSpeed (API to confirm; change of type by ticket in v1) | m7i.large: ≤5 accounts → Site Owner, >5 → Web Host Lite · m7i.xlarge: ≤5 → Site Owner Plus, >5 → Web Host Essential · 2xlarge → Professional · 4xlarge → Enterprise · 8xlarge and up → Elite (instance decides alone from 2xlarge) |
| CloudLinux · KernelCare | CLN keys | one per server |
| JetBackup | JetLicense | one per server |
| MailChannels | Console sub-account | one per server |
| Softaculous | Softaculous NOC API (licence to the IP; API to confirm, ticket in v1 until then) | one per server |
When tiers move
A site created or deleted, a template change, and a daily dedicated:retier-licences reconcile. Up-tier at once; down-tier only after 24 hours below the threshold.
What a re-tier does
Provider call (change package, update key limit), the three tracking options updated, a change_licence row in the change log. Never a line on an invoice.
Where ids live
dedicated_instances.licences json: provider, tier, external id or key id per software. Secrets only in SSM.
Sites on a pool: Rochen One Site (466) with a pool as parent
There is no second site product. A site on a pool is an ordinary Rochen One Site service whose parent_id is the pool's hosting id. Site detection stays "product id 466" in WHMCS, the API and the app; one extra question, "is the parent a pool?", decides price and behaviour.
| Attribute | Site under Rochen One Shared (465) | Site under a Dedicated pool (464) |
|---|---|---|
| Product | 466 "Rochen One Site" for both | |
parent_id | the client's Shared plan | the pool |
tblhosting.server | the region's shared server | the pool's own tblservers row |
| Resource limits | ResourceLevel option, Tier 1–8, billed hourly | no option row; new admin-only custom fields on 466, speed, pmem, io, iops, ep, nproc, hold the limits (a tier preset or custom values), free |
disk_size | billed in the plan's storage tiers | a quota inside the pool's volume, free |
| Billing log | rochen_one_logs rows, replayed by WHMCS | none; never counted in any Shared plan's options |
| Status | its own | follows the pool: suspended, unsuspended, cancelled and terminated with it |
One predicate
API: Dedicated::ownsSite(Hosting) is true for a 466 row whose parent's product is 464. WHMCS: rochen_isDedicatedSite($hostingId) does the same. Every place that today assumes "a site's parent is the Shared plan" asks it first.
Where the predicate is needed
API: order routing, site deploy (no billing log, no trial credit, pool-site ready mail, limits from custom fields), update and delete (no plan option maths), the Shared price estimate for Indian mandates. WHMCS: the one module hooks that write billing logs and plan options. App: the Shared site-count used for pricing, the disk page, the subscription line.
Created from the app only
The site chooser lists Rochen One (shared) and each pool. A pool site is ordered as {product: 466, parentId: pool}; the server comes from the pool. Web only, like every purchase flow.
Resources distributed as the client wishes
The pool page sums site quotas and limits against the pool's allocation and instance size and warns when oversubscribed; a single quota larger than the pool's volume is refused. Data transfer stays per pool.
New tables
Three tables in rochen-api migrations (2026_10_01_00000N_*). Nothing from aws, aws_template, aws_data_transfer or rochen_one_logs is used.
Code layout
app/Libraries/Servers/AWS/*
Shared AWS SDK wrappers used by both products: ClientFactory, Organizations, SSOAdmin, Account, IAM, EC2, SSM, CostExplorer. No product logic.
app/Libraries/Services/AWS/*
Legacy Fully Managed Services only. Untouched.
app/Libraries/Services/RochenOne/Dedicated/*
Dedicated (show, store, showHosting, updateHosting, suspend, delete, costs, sites), Provisioning/Runner + steps, Licences/* providers behind a LicenceProvider contract + TierRules, Invoicing/RenewalInvoice, tickets.
Jobs & commands
DeployDedicatedInstanceJob, TerminateDedicatedInstanceJob, ResizeDedicatedInstanceJob, ResizeDedicatedDiskJob, RetierDedicatedLicencesJob, RotateDedicatedKeyJob; dedicated:* commands in cmd.html.
Adding a region
- Add a server rowtblservers: name "Paris", hostname
eu-west-3; add it to the Dedicated server group. - Create the option groupName it
Rochen One Dedicated (eu-west-3). Add Templates, IOPS, Throughput, DataTransfer with regional prices in every sold currency, and the three licence-tracking dropdowns. - Add Templates sub-optionsOne per instance size offered there, named
r1d.<type>, monthly price = hourly × 744. - Fill dedicated_templatesIn the WHMCS admin page: region AMI, vCPU, RAM, EBS-optimized, burstable, description.
- Run the check
php artisan dedicated:check-cataloguemust pass. The region appears in the store on the next product fetch.
Operational decisions (Ben's review, Chris's answers)
| # | Point | Decision / proposal |
|---|---|---|
| 1 | Snapshots | No EBS snapshots. The 30-day figure was this design's invention; MCS has none. Backups are JetBackup to a per-server Wasabi bucket, which is what survives deletion. The "daily EBS snapshots" line leaves the included list. |
| 2 | 1Password | Deployment writes each server's credentials (root password, licence keys, Wasabi key) as one item into a dedicated inbox vault through a 1Password service account that has access to that vault only. Staff move items to the real vault. The deployer never reads any other vault; the residual is that it can read its own inbox until items are moved. No manual step during deployment. SSM stays the source the instance itself boots from. |
| 3 | Failed deployment | Licences bound to the IP are expired and the instance, IP and volumes released automatically when a deployment finally fails; a retry starts fresh (new IP, new licences), reusing the member account. |
| 4 | Deletion | The 1Password item and the Wasabi bucket are kept. The system has no Wasabi delete permission; termination opens a Maintenance ticket "Wasabi bucket to review" and mails devops. |
| 5 | Elastic IP after termination | Held unassociated for 3 days (dedicated.ip_hold_days), then released by a daily command. A redeploy within the hold reuses the IP, so DNS never changes. |
| 6 | Hostname | Auto-generated adjective-noun.directrouter.com (for example signal-fox), unique, created in Cloudflare (API token scoped to the directrouter.com zone, DNS edit only). The client does not choose it; staff can rename on request. No phishing-style names possible. |
| 7 | Largest instance / non-payment risk | proposal per-account ceiling: accounts with fewer than 3 paid months (or any overdue history) may run one pool up to m7i.xlarge; established accounts up to m7i.4xlarge; anything larger, or more pools, needs a staff approval recorded on the client (dedicated_limits custom field or config override). The store hides sizes above the ceiling and explains why. |
| 8 | New-account monitoring | proposal a "new pool created" mail to devops with client, fraud score, template and region; daily data-transfer log raises a ticket when a pool younger than 30 days passes 1 TB in 7 days, or any pool passes 5 TB in a month; a weekly digest of pools per account age. Manual watch of new accounts remains the rule initially, as Chris said. |
November code review: what changed in the plan
The design was checked against the code on 17 November 2026 (rochen-api, WHMCS, rochen-app). The product decisions held; these integration points were corrected.
| September design said | What the code does now | Plan now |
|---|---|---|
| Advance the due date and WHMCS never touches a pool | WHMCS writes a zero line and auto-pays it (which can start a stopped instance), mails reminders, and suspends from unpaid invoice items | WHMCS skips pools and their sites in code; rochen-api owns invoicing, suspension and termination |
| A second site product, "Rochen One Dedicated Site" | Site detection is by product id 466 in all three code bases; any other product is treated as a plan | One site product (466) with a pool as parent |
| Order and deploy go through the existing service dispatch | An aws order answers 501, and passes with no payment method at all; the server type is the dispatch key in about 25 places | A Dedicated predicate at each dispatch point; the order guard requires a card for pools |
| Reuse the Shared site deploy as is | It is tier-only, always writes the billing log, sends the Shared mail and can grant trial credit | Extract a shared seam; pool sites take limits from custom fields and skip the log, the credit and the mail |
| Store a WHM API token on the server row | Control-panel code signs in with the root user and password; the token column is unused | Root credentials on the server row only; no token step |
disabled = 1 keeps the server row inert | Module calls and the weekly disk refresh ignore it; WHMCS can auto-assign the active server of a type | Row is never the active server of its type, stays out of fill, and no site points at it before it is enabled |
| Monthly command calls the invoice builder for the client | That is the full client sweep; orders now invoice only their own items | Insert usage items, then invoice only those, under a per-client lock |
| Whole hours per span, like MCS | MCS is fractional hours with an exclusive month end since October | Fractional hours; rounded only in the description |
| Purchase pages on every platform, a Create Site menu | Purchases are web-only; site creation goes through a chooser page | Pool purchase and pool sites are web flows; pools appear in the chooser |
No aws rows is harmless | A daily cron mails devops about every Active aws service without a tracking row | Pools excluded from that check |
Conventions picked up since September: the users table and Passport, InnoDB pinned on every new table, new flags pinned off in the test config, report-mode first runs with alert mail for scheduled commands, and no development addresses in the published API docs.
Open points
| Point | Working assumption |
|---|---|
| Authorisation hold for Indian cards | To verify in Stripe test mode: the hold for INR cards under the e-mandate rules. Settled otherwise: 1.00 in the client's currency, never captured; staff review when Stripe's risk level is elevated or highest, the outcome is manual_review, or Stripe could not assess the payment. |
| Storage tiering | Bands walked over the client's total dedicated storage (all pools) at the R1 storage rates. Rolling shared-site storage into the same band would need WHMCS billing code, so it is not done in v1. Confirm with Chris. |
| Instance sizes per region | m7i family starter set in the mock-up with example prices; the real list is data entry |
| LiteSpeed | Tier rules from Jeremy's sheet; xlarge with ≤5 accounts read as Site Owner Plus. Licence API to confirm; type changes by ticket until then |
| Instance-size ceiling and new-account alerts | Proposals in the operational table; thresholds to agree with Chris and Ben |
| Tier hysteresis | Up at once, down after 24 h below the threshold |
| Defaults | Staff review: reminder after 2 days, order cancelled after 7 days without a decision · 3-day Elastic IP hold after termination · 24 h abort window on immediate cancellation · suspension 5 days after an unpaid invoice's due date, as WHMCS does for other products |
| Legacy security fix | Independent of this product, still open: stop sending keys/aws.json as instance user-data in the legacy module and rotate those keys |