Perfex SaaS Studio documentation

Perfex SaaS Studio turns one Perfex CRM installation (the platform) into a service: each customer gets a tenant — a separate Perfex workspace with its own database, database user, files and plan modules — provisioned, billed, backed up and upgraded from the platform console.

Licence first

Reselling or hosting Perfex CRM for others requires the Perfex CRM Extended Licence from its author. SaaS Studio is licensed per main installation, not per tenant. Every other module you offer to tenants keeps its own licence terms. SaaS Studio never patches another vendor's licence code.

Installation

Requirements

A VPS or dedicated server is recommended. Shared hosting with cPanel or Plesk works through the Beta adapters below, within your provider's database and process limits.

Server sizing

Measured on an 11-core ARM64 machine with 18 GB RAM and 100 small tenants (99 sharing code, 1 with physical copies):

MeasurementResult
One cron cycle, 1 worker19.4 s
One cron cycle, 4 workers4.2 s
One cron cycle, 8 workers2.3 s
Upgrade of 100 tenants with backups, 4 workersabout 8 minutes
100 sequential provisions with backupsabout 16 minutes
Database allocation of 100 empty tenantsabout 3.1 GB

Starting points: a small pilot on 2 vCPU / 4 GB RAM with 1–2 workers; about 100 light tenants on 4–8 vCPU / 8–16 GB RAM starting with 4 workers. Budget storage for each tenant database, uploads, private module copies, retained backups and room for two copies of the largest tenant. These are empty-tenant numbers: benchmark again with your real modules, data and traffic.

Activate

  1. Back up the platform files, database and Perfex encryption key. Install on a staging copy first.
  2. Upload perfex_saas_studio-1.0.0.zip under Setup › Modules and activate it on the platform installation only.
  3. Activation creates the pss_ tables, a private registry key and adds one guarded line to application/config/app-config.php (a private backup is kept). No Perfex core file is replaced.
  4. Store the registry key and the Perfex encryption key in a safe place outside the web server: a database dump without them cannot recover tenant credentials.
  5. Open SaaS Studio › Health and Settings; resolve everything before switching on signup. Repair Bootstrap restores the guarded line if needed.

Provisioning

In Settings set absolute tenant and backup roots outside the web root (for example /srv/perfex-tenants and /srv/perfex-backups) and choose how databases are created:

Templates

Register a dedicated, current-version template tenant with only approved sample data — never your live business data. New tenants are cloned from it; logins, sessions, mail queues, keys and secrets are reset. Plans can choose an industry template to start a workspace with sample data for a trade.

Plans and modules

A plan has prices per currency and interval (monthly, yearly, custom days or one-time), a setup fee, taxes, a trial length, sort order, modules, quotas, custom-domain permission, branding, own-SMTP permission and a feature list for the pricing page. Modules lists everything installed with a scanner: reviewed modules are linked into tenants; unknown modules run as private copies until you approve their fingerprint. Perfex Sentinel and Design Studio always run as private copies. Quotas cover staff, customers, contacts, invoices per month, projects, tasks, tickets per month, leads, storage, e-mails per month, API calls per day and AI credits per month.

Module features per plan

Modules can add their own plan switches (1.0.1 and newer). Plans › Module Features shows them as a matrix of the public plans (up to eight; on a phone one plan at a time); section 6 of each plan form shows the same switches for that plan. A level switch (for example Locked, Brand or Full) decides which area switches can be turned on; a lock marks a switch the level does not reach. Save Features stores the values and sends them to the workspaces of the changed plans; Push to Workspaces Now sends every plan again.

URLs and DNS

Web server

Each tenant host or path maps to exactly that tenant's folder; private folders (application, system, temp, backups, private, storage), dot files and every PHP file except index.php must be denied. The download contains tested nginx, Apache and Caddy examples; for Caddy on-demand certificates, point ask at https://platform.example.com/saas/api/domain-check, which only approves verified, active domains. Always run nginx -t, apachectl -t or caddy validate before reloading.

Pricing page and signup

The public pricing page is at /saas/pricing and signup at /saas/signup. Signup asks for plan, interval, currency, workspace address, company, contact and password, checks the address, applies bot timing and optional reCAPTCHA, and sends an e-mail verification. After verification the tenant is provisioned in the background and the customer sees the progress and then a one-time login link. A Perfex customer and contact are created for every signup. Set your legal page URLs, e-mail delivery and payment setup before switching signup on.

Billing

Use Stripe test mode and the PayPal sandbox with your own test accounts before going live.

Customer portal

In the Perfex customer area, My SaaS shows the contact's own workspaces with usage, compatible plan changes, invoices, payment method, domains, data exports, cancellation and resume. Contacts can allow support access; support links then expire within 60 seconds.

Tenant workspace

Inside a tenant, the owner sees usage against the plan, company details and logo, staff invitations, a customer CSV import, module choices within the plan, shared or own SMTP and an onboarding checklist. Announcements from the platform appear as a dismissable banner.

Cron and upgrades

Add one platform cron (every five minutes):

*/5 * * * * /usr/bin/php /srv/perfex/index.php pss cli cron >> /var/log/pss-cron.log 2>&1

It runs due tenants through CLI workers (pool of 1–8 in Settings). To upgrade, back up the platform, deploy the new shared code, then run php index.php pss cli upgrade: each tenant is locked, backed up, migrated, and left in maintenance if something fails. Copied modules sync code only and keep their reviewed mutable files. Never use rsync --delete or hard links on tenant folders.

Backups and S3

Backups contain the tenant database, uploads, private module copies and registered private storage. Schedule daily or weekly backups with retention; recovery backups (pre-upgrade, pre-restore, final) are never removed by retention. For S3-compatible storage give an HTTPS endpoint, bucket, region and an identity with PutObject, GetObject and DeleteObject on its prefix. Restore and clone fetch a missing archive from the exact same target and verify its size and SHA-256. Restore always makes a pre-restore backup first.

E-mail

Tenant e-mail goes through a signed private outbox and background SMTP delivery. Bind the platform's TLS SMTP settings for shared delivery, or allow encrypted own SMTP per plan; platform SMTP credentials are never handed to tenants. Operations shows delivery jobs and retries.

REST API

Under /saas/api/: plans, tenants, usage, subscription, suspend, resume and csrf. Issue scoped keys under API Keys; a key is shown once. For JSON POST requests, get the CSRF cookie and token from GET /saas/api/csrf with the bearer key and send X-CSRF-Token. The OpenAPI description is included in the download.

Importer

The importer moves tenants from an earlier SaaS setup: preview the source, map lifecycles and dates, confirm that the old billing has stopped, then commit. Every batch can be undone while its tenants are untouched.

Permissions

SaaS Studio permissions separate viewing, creating and editing tenants, backups, imports and settings. Panel Allocation Review and bootstrap repair are for administrators only. Customer and invoice data still follow Perfex's own permissions.

Isolation

Tenants are separated by database, database user, files, cookies and CSRF tokens. They run under the same operating-system user as the platform, so this is application-level tenancy: offer only modules you trust, and use containers or separate OS users if tenants can upload their own code.

Troubleshooting

Changelog

Current version 1.0.2 (24 Oct 2026). Release notes of every version, newest first: perfexcrm.app/saas-studio/changelog/.

1.0.1

1.0.0

The full list is in changelog.txt in the download.