Lets multiple tenants share a single Payload instance while keeping their documents, users and globals separate. It is added through the plugins array and extends your tenant, user and resource collections with tenant fields. It targets Payload 2 and is deprecated by its author, who points to the official multi-tenant plugin for Payload 3.
Multi-tenancy plugin for Payload CMS
Installation
npm i payload-tenancy179
Stars
11
Forks
0
Open Issues
1 years ago
Last Updated
81
Weekly Downloads
v2.1.2
npm Version
139.6 KB
Unpacked Size
0
Dependencies
1790 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 179 |
| Dec 5, 2026 | 179 |
| Dec 4, 2026 | 179 |
| Dec 3, 2026 | 179 |
| Dec 2, 2026 | 179 |
| Dec 1, 2026 | 179 |
| Nov 30, 2026 | 179 |
| Nov 29, 2026 | 179 |
| Nov 28, 2026 | 179 |
| Nov 27, 2026 | 179 |
| Nov 26, 2026 | 179 |
| Nov 25, 2026 | 180 |
| Nov 24, 2026 | 180 |
| Nov 23, 2026 | 180 |
| Nov 22, 2026 | 180 |
| Nov 21, 2026 | 180 |
| Nov 20, 2026 | 180 |
| Nov 19, 2026 | 180 |
| Nov 18, 2026 | 180 |
| Nov 17, 2026 | 180 |
| Nov 16, 2026 | 180 |
| Nov 15, 2026 | 180 |
| Nov 14, 2026 | 180 |
| Nov 13, 2026 | 180 |
| Nov 12, 2026 | 180 |
| Nov 11, 2026 | 180 |
| Nov 10, 2026 | 180 |
| Nov 9, 2026 | 180 |
| Nov 8, 2026 | 180 |
| Nov 7, 2026 | 180 |
| Nov 6, 2026 | 180 |
| Nov 5, 2026 | 180 |
| Nov 4, 2026 | 180 |
| Nov 3, 2026 | 180 |
| Nov 2, 2026 | 180 |
| Nov 1, 2026 | 180 |
| Oct 31, 2026 | 180 |
| Oct 30, 2026 | 180 |
| Oct 29, 2026 | 180 |
| Oct 28, 2026 | 180 |
| Oct 27, 2026 | 180 |
| Oct 26, 2026 | 180 |
| Oct 25, 2026 | 180 |
| Oct 24, 2026 | 180 |
| Oct 23, 2026 | 180 |
| Oct 22, 2026 | 180 |
| Oct 21, 2026 | 179 |
| Oct 20, 2026 | 179 |
| Oct 19, 2026 | 179 |
| Oct 18, 2026 | 179 |
| Oct 17, 2026 | 179 |
| Oct 16, 2026 | 179 |
| Oct 15, 2026 | 179 |
| Oct 14, 2026 | 179 |
| Oct 13, 2026 | 179 |
| Oct 12, 2026 | 179 |
| Oct 11, 2026 | 179 |
| Oct 10, 2026 | 179 |
| Oct 9, 2026 | 179 |
| Oct 8, 2026 | 179 |
| Oct 7, 2026 | 179 |
| Oct 6, 2026 | 179 |
| Oct 5, 2026 | 179 |
| Oct 4, 2026 | 179 |
| Oct 3, 2026 | 179 |
| Oct 2, 2026 | 179 |
| Oct 1, 2026 | 179 |
| Sep 30, 2026 | 179 |
| Sep 29, 2026 | 179 |
| Sep 28, 2026 | 179 |
| Sep 27, 2026 | 179 |
| Sep 26, 2026 | 179 |
| Sep 25, 2026 | 179 |
| Sep 24, 2026 | 179 |
| Sep 23, 2026 | 179 |
| Sep 22, 2026 | 179 |
| Sep 21, 2026 | 179 |
| Sep 20, 2026 | 179 |
| Sep 19, 2026 | 179 |
| Sep 18, 2026 | 179 |
| Sep 17, 2026 | 179 |
| Sep 16, 2026 | 179 |
| Sep 15, 2026 | 179 |
| Sep 14, 2026 | 179 |
| Sep 13, 2026 | 179 |
| Sep 12, 2026 | 179 |
| Sep 11, 2026 | 179 |
| Sep 10, 2026 | 179 |
| Sep 9, 2026 | 179 |
| Sep 8, 2026 | 179 |
| Sep 7, 2026 | 179 |
81+71 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 81 |
| Dec 5, 2026 | 37 |
| Dec 4, 2026 | 29 |
| Dec 3, 2026 | 29 |
| Dec 2, 2026 | 31 |
| Dec 1, 2026 | 34 |
| Nov 30, 2026 | 30 |
| Nov 29, 2026 | 37 |
| Nov 28, 2026 | 37 |
| Nov 27, 2026 | 37 |
| Nov 26, 2026 | 32 |
| Nov 25, 2026 | 38 |
| Nov 24, 2026 | 38 |
| Nov 23, 2026 | 38 |
| Nov 22, 2026 | 21 |
| Nov 21, 2026 | 20 |
| Nov 20, 2026 | 35 |
| Nov 19, 2026 | 36 |
| Nov 18, 2026 | 44 |
| Nov 17, 2026 | 42 |
| Nov 16, 2026 | 43 |
| Nov 15, 2026 | 58 |
| Nov 14, 2026 | 56 |
| Nov 13, 2026 | 44 |
| Nov 12, 2026 | 62 |
| Nov 11, 2026 | 47 |
| Nov 10, 2026 | 54 |
| Nov 9, 2026 | 56 |
| Nov 8, 2026 | 40 |
| Nov 7, 2026 | 42 |
| Nov 6, 2026 | 43 |
| Nov 5, 2026 | 32 |
| Nov 4, 2026 | 29 |
| Nov 3, 2026 | 21 |
| Nov 2, 2026 | 20 |
| Nov 1, 2026 | 20 |
| Oct 31, 2026 | 20 |
| Oct 30, 2026 | 20 |
| Oct 29, 2026 | 12 |
| Oct 28, 2026 | 12 |
| Oct 27, 2026 | 14 |
| Oct 26, 2026 | 12 |
| Oct 25, 2026 | 13 |
| Oct 24, 2026 | 13 |
| Oct 23, 2026 | 7 |
| Oct 22, 2026 | 7 |
| Oct 21, 2026 | 12 |
| Oct 20, 2026 | 12 |
| Oct 19, 2026 | 13 |
| Oct 18, 2026 | 12 |
| Oct 17, 2026 | 13 |
| Oct 16, 2026 | 17 |
| Oct 15, 2026 | 18 |
| Oct 14, 2026 | 46 |
| Oct 13, 2026 | 45 |
| Oct 12, 2026 | 46 |
| Oct 11, 2026 | 46 |
| Oct 10, 2026 | 42 |
| Oct 9, 2026 | 41 |
| Oct 8, 2026 | 44 |
| Oct 7, 2026 | 12 |
| Oct 6, 2026 | 11 |
| Oct 5, 2026 | 9 |
| Oct 4, 2026 | 12 |
| Oct 3, 2026 | 18 |
| Oct 2, 2026 | 17 |
| Oct 1, 2026 | 15 |
| Sep 30, 2026 | 15 |
| Sep 29, 2026 | 32 |
| Sep 28, 2026 | 33 |
| Sep 27, 2026 | 30 |
| Sep 26, 2026 | 27 |
| Sep 25, 2026 | 32 |
| Sep 24, 2026 | 35 |
| Sep 23, 2026 | 35 |
| Sep 22, 2026 | 36 |
| Sep 21, 2026 | 35 |
| Sep 20, 2026 | 35 |
| Sep 19, 2026 | 33 |
| Sep 18, 2026 | 29 |
| Sep 17, 2026 | 32 |
| Sep 16, 2026 | 34 |
| Sep 15, 2026 | 17 |
| Sep 14, 2026 | 19 |
| Sep 13, 2026 | 18 |
| Sep 12, 2026 | 18 |
| Sep 11, 2026 | 17 |
| Sep 10, 2026 | 10 |
| Sep 9, 2026 | 8 |
| Sep 8, 2026 | 10 |
| Sep 7, 2026 | 10 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/600855844-root)<a href="https://payloaddirectory.dev/plugins/600855844-root"><img src="https://payloaddirectory.dev/badge/600855844-root.svg" alt="Payload Directory"></a>README
This plugin allows multiple tenants to access different resources in the same instance of Payload CMS.
Tenants are an account to the single instance of application (server and database) that make it seem like there's one application instances for each tenant. Each tenant can have multiple users. In this case tenants are also hierarchical, so tenants can also include other tenants.
Payload Tenancy will not be maintained anymore by Jesse Sivonen (@joas8211) and the repository will be made read-only. This plugin targets Payload 2 which also doesn't seem to receive updates anymore. There seems to be now an official multi-tenant plugin for Payload 3, which I will suggest you to check out instead.
Here's description of collections used and fields that are added by this plugin.
Tenant collection holds information about tenants. The collection is not added automatically, but some fields are added to it. Tenants can be managed in a hierarchial manner. You can access the tenant you belong to and it's sub-tenants.
The name of the collection must be either "tenants" or defined in plugin's factory function. In example below, tenant collection is named "organizations".
export default buildConfig({
plugins: [tenancy({ tenantCollection: "organizations" })],
collections: [Users, Organizations],
// ...rest of the config...
});
Tenant's slug field contains URL friendly name of the tenant. Slug is required and is used for identifying the tenant from URL path if path isolation is in use.
Tenant's domains are optional and are used for identifying the tenant by hostname in domain isolation mode.
User collections have a tenant field that connects users to some tenant. The tenant field is required to have relation to some existing tenant. Users can be accessed in a hierarchial manner, so that all above tenants see users in that tenant and below.
Other collections are called resource collections because they are resources of one tenant. They also have a hidden tenant field that must relate to an existing tenant. Documents of resource collections can by default be only accessed from the tenant owning those documents determined by path or domain or an user belonging to the tenant when using "user" isolation strategy. Users above in tenant hierarchy can login to tenants below and access resource collections that way.
Globals are isolated between tenants after version 1.2 by default. The isolation
is achieved by creating collection for each global and proxying the global to
the correct document of that collection. Global collections are named by global
they hold (globalSlug + "Globals", eg. "settingsGlobals") and can only be
accessed through the global, or using Local API with overridden access.
To operate on isolated globals using Local API, you must pass user object with a tenant so that the correct document is accessed.
const globalDocument = await payload.findGlobal({
slug: "settings",
user: { tenant: someTenantOrId },
});
To opt-out global from tenant isolation you can add the slugs of the globals to
sharedGlobals option.
export default buildConfig({
plugins: [tenancy({ sharedGlobals: ["settings"] })],
// ...rest of the config...
});
There is a few different strategies to choose from to isolate tenants from each other.
"user" strategy: All users log in to the same address (URL) and can access their own tenant after logging in. There's no way to isolate publicly available content between tenants.
"path" strategy: All tenants have different base path for their "section" of the installation. Admin panel, Rest API, and GraphQL API are all under that base path and access different content. The path to admin panel would be for example "/my-company/admin".
"domain" strategy: All tenants have their own domains. And appear as completely different installations for users although they are controlled by single server (or load-balanced cluster). For this to work tenant must have at least one domain set and the name service must point to correct location where you are hosting the application.
You can set the strategy to plugin's factory function. In example below, "domain" strategy is used.
export default buildConfig({
plugins: [tenancy({ isolationStrategy: "domain" })],
collections: [Users, Tenants],
// ...rest of the config...
});
Install plugin from NPM registry to your Payload project by using you preferred NodeJS package manager. Some example commands below.
Using npm:
$ npm install payload-tenancy
Using Yarn:
$ yarn add payload-tenancy
Ensure you have at least one authentication-enabled (user) collection.
Create tenant collection. Use slug "tenants" or configure other slug in the following step.
export const Tenants: CollectionConfig = {
slug: "tenants",
admin: {
useAsTitle: "name",
},
fields: [
{
type: "text",
name: "name",
label: "Name",
required: true,
},
],
};
Import and add the plugin to your Payload config.
export default buildConfig({
plugins: [tenancy()],
collections: [Users, Tenants],
// ...rest of the config...
});
Initial setup can be done in at least two different ways that are described below. To complete initial setup there must be at least one tenant and one user.
Setup can be done programmatically using Local API. Just make sure there's at least one tenant and one user that are related to each other by tenant field in user document.
const myTenant = await payload.create({
collection: "tenants",
data: {
slug: "my-company",
domains: [{ domain: "my-company.local" }],
},
});
await payload.create({
collection: "users",
data: {
email: "[email protected]",
password: "secret",
tenant: myTenant.id,
},
});
Setup can be done through admin panel using "user" isolation strategy which is the default strategy. First, when you arrive to admin panel when there's no users registered yet, you are greeted with normal Payload's "create first user" form.

After creating the first user the dashboard shows only the tenant collection. That's because the root tenant must be created at this stage.

Tenant form has fields for slug and domains. Slug is required and is used for identifying the tenant from URL path if path isolation is in use. Domains are optional and are used for identifying the tenant by hostname in domain isolation mode.

After creating the root tenant, other collections show and you are free to create other users, tenants or resources owned by the tenant. Setup has been completed.
multi tenant
Manage multiple tenants and tenant-scoped content from a single Payload admin panel
100165.4k/wk46.1kv3 v4
payload plugin sharing
Share records with users and organizations through groups with Owner, Manager and Viewer levels
76425/wk0v3
payload plugin roles
Per-site role ladders and access helpers for multi-tenant Payload sites
76128/wk0v3
rbac
Role-based access control with ready-made, composable access functions and query filters for Payload collections
4899/wk143v1
abac
Attribute-based access control for Payload that compiles user attributes into where clauses
488/wk183v3
payload simple rbac
Priority-ordered role-based access control for Payload collections, globals and fields
4227/wk40v1