Create and manage tenants in a multi-tenant ɳCloud SaaS deployment. Each tenant is an isolated paying customer identified by a tenant_id UUID — completely separate from per-app isolation (which uses source_account_id).
# Create a new tenant
nself tenant create acme-corp
# List all tenants
nself tenant list
# Show details for one tenant
nself tenant info 3f7a1c2d-...
# Suspend a tenant (keeps data, blocks access)
nself tenant suspend 3f7a1c2d-...
# Resume a suspended tenant
nself tenant resume 3f7a1c2d-...nself tenant <SUBCOMMAND> [ARGS] [FLAGS]nself tenant manages Cloud-tier multi-tenancy. This is distinct from the per-app isolation that every nSelf deploy uses. Tenants are paying customers in an ɳCloud SaaS setup — each with their own tenant_id UUID, their own row-level security filters, and their own billing record.
If you are self-hosting for a single organisation and not running a SaaS product on top, you do not need this command. Multi-app isolation within a single deploy usessource_account_id instead — see the multi-tenancy conventions page.
Provision a new tenant. A UUID is generated automatically; you can pin one with --id.
nself tenant create acme-corp
# Tenant created
# ID: 3f7a1c2d-8b4e-4f3a-9c1d-2e5f6a7b8c9d
# Name: acme-corp
# Status: active
# Pin a specific UUID (useful for migrations)
nself tenant create acme-corp --id 3f7a1c2d-8b4e-4f3a-9c1d-2e5f6a7b8c9dList all tenants with their ID, name, status, and member count.
nself tenant list
# ID NAME STATUS MEMBERS
# 3f7a1c2d-8b4e-4f3a-9c1d-2e5f6a7b8c9d acme-corp active 12
# a1b2c3d4-... beta-inc suspended 3
nself tenant list --jsonShow full details for one tenant: status, plan, member count, usage, and billing record.
nself tenant info 3f7a1c2d-8b4e-4f3a-9c1d-2e5f6a7b8c9d
# ID: 3f7a1c2d-8b4e-4f3a-9c1d-2e5f6a7b8c9d
# Name: acme-corp
# Status: active
# Plan: nself-plus
# Members: 12
# Created: 2026-03-01T10:00:00Z
# Billing: active — renews 2026-06-01Block all access for a tenant. Data is preserved. Use to pause a customer who has not paid.
nself tenant suspend 3f7a1c2d-...
# Tenant acme-corp suspended. Members will see a 403 on next request.Restore access to a suspended tenant.
nself tenant resume 3f7a1c2d-...
# Tenant acme-corp resumed.Permanently delete a tenant and all their data. This is irreversible. Requires confirmation.
nself tenant delete 3f7a1c2d-...
# This will permanently delete tenant acme-corp and all their data.
# Type the tenant name to confirm: acme-corp
# Deleted.Inspect or change a tenant's billing plan.
# Show billing status
nself tenant billing status 3f7a1c2d-...
# Upgrade to a higher plan
nself tenant billing upgrade 3f7a1c2d-... --plan nself-plusManage users within a tenant.
# List members
nself tenant members list 3f7a1c2d-...
# Add a user
nself tenant members add 3f7a1c2d-... --email user@acme.com --role admin
# Remove a user
nself tenant members remove 3f7a1c2d-... --email user@acme.com| Flag | Type | Default | Description |
|---|---|---|---|
--id <uuid> | UUID | auto | Pin a specific tenant UUID |
--plan <plan> | string | free | Initial billing plan |
nSelf uses two separate isolation mechanisms that must not be confused:
| Use case | Column | Command |
|---|---|---|
| Separate paying Cloud customers | tenant_id UUID | nself tenant |
| Separate apps within one deploy | source_account_id TEXT | n/a — set in .env |
Mixing them causes silent data leaks. See multi-tenancy conventions for the full wall.