Quick Start
This page shows how to add erupt-tenant to an erupt project. For an overview see Erupt SaaS Multi-tenant.
TIP
erupt-tenant is a commercial module. After purchase, contact the author for access to the source repository.
Modules
| Module | Description | Depends on |
|---|---|---|
| erupt-tenant-core | Business-table isolation: the @EruptTenant annotation, the isolating DataProxy, the tenant context EruptTenantContext, and the TenantBaseModel base classes | erupt-jpa |
| erupt-tenant | The tenant platform: tenant config, packages, subscriptions, tenant login and SSO, domain customization, menu scope; tenant users / roles / organizations come straight from erupt-upms | erupt-upms, erupt-tenant-core |
An erupt-cloud-node only needs erupt-tenant-core: the cloud server forwards the tenant identity with each request, so the node needs neither UPMS nor a session store.
1. Build the source and install it locally
Clone https://github.com/erupt-io/erupt-tenant and check out the tag matching your erupt version:

From the project root:
mvn -D skipTests=true install2. Add the dependency
<dependency>
<groupId>xyz.erupt</groupId>
<artifactId>erupt-tenant</artifactId>
<version>${erupt.version}</version>
</dependency>3. Start the application
Tables and menus are created on startup — no SQL scripts:
- The admin side gets a Tenant Management menu with Tenant Config and Tenant Package
- The UPMS tables already carry a
tenant_idcolumn (platform rows are'0'); nothing to configure
Upgrading from 2.3.x
The unique constraints on users, roles, organizations and posts are now (tenant_id, account) / (tenant_id, code). Drop the old single-column unique indexes by hand and migrate the old t_e_upms_* tenant user tables; see the Upgrade Guide.
4. Set up packages
Create a package in Tenant Package and pick the platform menus tenants may use. Tenants have no menu table of their own, so to let a tenant administrator manage their team, include erupt-upms menus in the package:
- Users, Roles, Organizations, Posts
- Login Log, Operate Log, Online Users
- Your business menus (e.g. models using
@EruptTenant)
Optionally set Trial Days: a new tenant without an expire date gets one computed from it.
5. Create a tenant
In Tenant Config, create a tenant: enterprise ID, name, admin account (default admin) and password, and its packages. Leave the expire date empty to derive it from the packages' trial days; if no package has trial days, the tenant never expires.
Saving generates the tenant id and creates the administrator user inside the tenant.
6. Sign in to the tenant system
http://your-host/#/passport/tenantEnter the enterprise ID, admin account and password — or use the Enter Tenant Backend row action in Tenant Config to open it as the administrator directly.
Online demo: https://demo.erupt.xyz/#/passport/tenant
Next steps
- Multi-tenant Business Tables — isolate a business table with one annotation
- Multi-tenant UPMS — how the user directory is isolated, and how to switch tenants in code
- Packages & Subscription — trials, expiry and renewal