Deployment mode
A single environment variable switches Tether between three modes that control billing, asset limits, and the availability of the demo reset endpoint.
Modes
| Mode | Asset limits | Billing UI | Demo reset endpoint | Use when |
|---|---|---|---|---|
selfhosted | None | Not shown | Not available | You run Tether on your own infrastructure. This is the default. |
saas | Enforced by tier | Shown in sidebar | Not available | You run a hosted SaaS service (like atechsolutions.org) where customers pay per tier. |
demo | None | Not shown | Available at /api/admin/demo-reset | A shared demo instance that resets automatically. Never use on a production install. |
bash# In .env: DEPLOYMENT_MODE=selfhosted # default DEPLOYMENT_MODE=saas DEPLOYMENT_MODE=demo
selfhosted (default)
No asset limits, no billing page, no upgrade prompts. All features are fully available. The Plan page (accessible from the MSP sidebar) shows a message explaining that this is a self-hosted installation with no limits.
This is the correct mode for the vast majority of users — anyone running Tether on their own VPS, bare-metal server, or internal infrastructure.
saas
Enables the full billing and tier system. When this mode is active:
- New installations start on a 30-day free trial with a 250 asset limit
- A usage bar appears in the MSP sidebar showing current assets vs. the plan limit
- At 80% usage a warning banner appears on the MSP dashboard
- At 100% usage attempts to create assets or import CSVs return
402 Payment Requiredwith a clear error message - The Plan page shows tier options and a contact link to upgrade
Tiers
| Tier key | Asset limit | Price (CAD/mo) |
|---|---|---|
trial | 250 | Free (30 days) |
starter | 250 | $49 |
growth | 1,000 | $129 |
scale | 5,000 | $349 |
enterprise | Unlimited | Custom |
selfhosted | Unlimited | $0 — self-managed |
Clients and users are unlimited on every tier. Only managed assets (total across all tenants) count toward the limit.
Managing tiers
Tier changes are applied via the API after a customer pays. Tether does not include built-in payment processing — integrate Stripe or your preferred payment provider and call this endpoint on successful payment:
httpPUT /api/billing/tier Authorization: Bearer {msp-admin-token} Content-Type: application/json {{ "tier": "growth", "billing_email": "[email protected]", "notes": "Stripe customer ID: cus_abc123" }}
What happens when the limit is reached
When a tenant reaches or exceeds their asset limit:
POST /api/assetsreturns402 Payment Requiredwith the message: "Asset limit reached for your Growth plan (1000/1000 assets). Please upgrade to add more."- CSV imports are blocked with the same 402 response
- Existing assets are unaffected — they can still be edited, checked out, and deleted
- The limit lifts immediately when the tier is upgraded via the API
demo
Same as selfhosted but also mounts the reset endpoint:
httpPOST /api/admin/demo-reset X-Reset-Secret: your-reset-secret
This endpoint wipes the entire database and reseeds it with 4 tenants, 40 assets,
checkout history, and open requests. It is called by a Cloudflare Worker cron every hour.
The RESET_SECRET environment variable protects it from unauthorised calls.
The /api/admin/demo-reset endpoint deletes ALL data in the database with no confirmation. If this is called on your production instance — even accidentally — you will lose everything.