Tenants
The Tenants page — managing customer orgs, resellers, and reseller sub-accounts; their tier, status, servers, MRR, and workspace subdomains; issuing statements; and the governance rules that admit deployments and domains.
Tenants
The Tenants page is where an operator manages every customer org on the
platform. It requires the tenants.manage privilege — without it the page shows
a locked state ("You need the tenants.manage privilege to view orgs &
billing.") instead of any data. See the god-mode overview for how
that gate works.
A tenant is a customer organization. Tenants form a two-level hierarchy:
| Kind | Meaning |
|---|---|
| direct | A customer that buys from you directly |
| reseller | An MSP-style customer who resells under their own brand |
| end_client | A reseller's sub-account, linked to its parent via parentTenantId |
The table renders the hierarchy inline: each reseller is followed by its sub-accounts, indented one level. Direct tenants and orphaned rows follow.
What the page shows
At the top, five KPI stats summarize the fleet of customers — Active,
Trialing, Resellers (with a sub-account count), Past due, and
Total MRR. A badge next to the title reads persisted or demo data depending on whether a database is configured; on demo data the rows
are the seeded set (Girard Media, Northwind MSP and its sub-accounts, Atlas
Studio, Reform Code, Lumen Health), not live customers.
Each tenant row shows:
| Column | Notes |
|---|---|
| Tenant | Name (click to edit) plus its live workspace link, ‹subdomain›.hostssh.com, or "no workspace" |
| Kind | direct / reseller / end-client |
| Tier | solo · team · business · msp · enterprise |
| Status | active · trial · past due · churned |
| Servers | Server count on the account |
| MRR | Derived from the plan catalog; resellers also show a +… sub roll-up of their sub-accounts' MRR |
| Created | When the org was created |
MRR is never hand-entered — it's derived from the tenant's tier, status, and
server count against the plan catalog (lib/billing/plans), so the figures here
reconcile with Billing and Profitability. Trials and churned
tenants contribute 0.
Below the table, a White-label brands card lists the custom-domain brands powered by the platform, each with its status, domain, owning tenant, and SPF/DKIM/DMARC readiness. Brands themselves are managed on the White-label page.
Creating and editing a tenant
New tenant opens a drawer. Clicking a tenant name opens the same drawer pre-filled for editing. The fields:
| Field | Notes |
|---|---|
| Name | Required |
| Workspace subdomain | Leave blank to auto-derive a unique slug from the name; every tenant gets a live ‹sub›.hostssh.com workspace |
| Kind | direct / reseller / end_client |
| Tier | Sets the plan and the server cap |
| Parent reseller | Shown only for end_client — pick the reseller it belongs to |
| Status | active / trial / past_due / churned |
| Servers | Bounded by the tier's server cap (shown as a hint; enforced on save) |
| Primary contact |
Server count is validated against the tier's cap on save — e.g. a solo tenant
can manage at most 1 server. The subdomain is normalized to a free, claimable
slug, so a name collision quietly appends a numeric suffix rather than failing.
Deleting a reseller detaches its sub-accounts (they're re-parented to none, not deleted). You can delete one tenant from its edit drawer, or select several rows and use Delete selected in the bulk bar; both ask for confirmation and cannot be undone.
Sending a statement
From a tenant's edit drawer, Send statement issues that tenant's next
invoice — a real, persisted open invoice for the amount derived from the plan
catalog (tenantMrr), due in 7 days. It appears on the Billing
Invoices table. If the tenant's derived amount is 0 (a trial or churned org), the
action reports "No amount due" rather than creating an empty invoice.
Governance: admitting deployments and domains
Tenant governance is a pure policy layer (lib/tenants/governance.ts) that
server actions call before enqueuing work. It doesn't have its own page — it's
the enforcement behind tenant-scoped operations. It defines, per tier, the
ceilings a tenant may not exceed:
| Limit (per tier) | solo | team | business | msp | enterprise |
|---|---|---|---|---|---|
| Max servers | 1 | 10 | 30 | 250 | ∞ |
| Max deployments | 3 | 20 | 80 | 800 | ∞ |
| Replicas per deployment | 1 | 2 | 4 | 8 | 32 |
| Max total replicas | 3 | 30 | 160 | 1,600 | ∞ |
| Max custom domains | 1 | 3 | 15 | 200 | ∞ |
| Rollback versions kept | 3 | 5 | 10 | 20 | 50 |
Two admission checks matter most:
-
Deployment admission (
admitTenantDeployment) blocks a new deployment when the tenant is churned (export/restore only), warns when it's past due, and rejects it if any tier quota — deployments, servers, total replicas, or per-deployment replicas — would be exceeded. It also plans a replica spread across online racks, refusing multi-replica deploys that can't land on at least two separate racks. -
Domain admission (
admitTenantDomain) decides whether a tenant may claim a hostname. A tenant may use any host inside its own platform zone (‹anything›.‹tenant›.hostssh.com) or inside one of its live brand domains. It cannot claim the platform apex, a platform-reserved label, or another tenant's zone.
These rules are the same contracts future tenant-owned deployment surfaces reuse, so a customer can never out-provision or out-domain their plan regardless of which surface they act through.
Related
- Plans, invoices, and dunning → Billing
- The keys these tenants' agents run on → Licensing (admin)
- Brands and custom domains referenced here → White-label
- Every create/edit/delete here can be reviewed in the Audit log