---
title: "Multi-tenancy configuration"
site: admin
version: 2027.1
versions: "all"
url: https://docs-new.servicely.ai/admin/2027.1/access/roles-and-permissions/multi-tenancy-configuration/
type: reference
application: tenancy_core
last_updated: 2026-12-03
commit: 8d233372fa05
---


This page lists what configures multi-tenancy: the applications, the fields of the two tenancy records and the settings on each table. You need the `administrator` role, and the records are under **Access & security → Tenancy** in the Administration workspace. [Multi-tenancy](page:access/roles-and-permissions/multi-tenancy) explains realms, tenants and providers.

## Applications

Installing an application filters nothing on its own. Nothing is filtered until a System tenancy configuration is **Active** and its **Script** applies to the user.

<!-- code: servicely-applications/tenancy_core/manifest.json, tenancy_realm_hierarchy/manifest.json, tenancy_company_hiearchy/manifest.json, 2027.1.10 -->
| Application | Adds |
| --- | --- |
| **Tenancy Core** | System tenancy configuration, the **Tenancy** menu section and the Self service provider. You do not install it yourself. It is installed with either hierarchy application. |
| **Tenancy — Realm Hierarchy** | System realms and the Realm hierarchy provider. |
| **Tenancy — Company Hierarchy** | The Company hierarchy provider. |

## System tenancy configuration fields

A configuration applies one provider to the users its script selects. Servicely supplies one configuration, "Test base configuration", which is inactive.

<Image src="asset:screenshots/admin/access-roles-and-permissions-multi-tenancy-configuration/new-tenancy-configuration.png" size="60">The empty Create System Tenancy Configuration form, with Name, Provider, Active, Order, Description and Script.</Image>

<!-- code: servicely-applications/tenancy_core/entities/FieldDefinition, servicely-core/src/main/kotlin/com/servicely/core/tenancy/TenancyManagerImpl.kt:102, 2027.1.10 -->
| Field | Type | Required | Behaviour | Purpose |
| --- | --- | --- | --- | --- |
| Name | Text | No | Must be unique. | Identifies the configuration. |
| Provider | Choice | No | Offers Self service, and Realm hierarchy or Company hierarchy when its application is installed. | The filter to apply. |
| Active | Yes or no | No | Default: Yes. Servicely ignores an inactive configuration. | Turns the configuration on. |
| Order | Number | No | Default: 10. Configurations are read lowest first, and every one that applies adds its provider. | Orders the configurations. |
| Description | Text | No | None. | What the configuration is for. |
| Script | Script | No | Applies the configuration to the current user unless it sets `answer` to false. An empty script, any other value and an error all apply it. | Decides which users are filtered. |

## System realm fields

<Image src="asset:screenshots/admin/access-roles-and-permissions-multi-tenancy-configuration/realm-record.png">The Madrigal Elektromotoren realm, with its parent, its full path and two child realms.</Image>

<!-- code: servicely-applications/tenancy_realm_hierarchy/entities/FieldDefinition and RelationshipDefinition, servicely-core/src/main/kotlin/com/servicely/core/tenancy/providers/realm/SystemRealmTrigger.kt:36, 2027.1.10 -->
| Field | Type | Required | Behaviour | Purpose |
| --- | --- | --- | --- | --- |
| Name | Text | No | Must be unique. | The realm's name. |
| Parent | Reference (System Realm) | No | A realm with no parent starts a tree, and you can have several trees. When you change it, Servicely renumbers the realm and the realms below it, then corrects the records of those realms in a queued job. | Places the realm in the tree. |
| Full path | Text | No | Read-only. Set by the system. | The realm's path from the top of its tree. |
| Active | Yes or no | No | Default: Yes. | Whether the realm is in use. |
| Realm hierarchy require role | List (Role) | No | When it lists roles, only users who hold one of them see this part of the tree. | Limits a part of the tree to a role. |
| Realm selection require role | List (Role) | No | When it lists roles, the header drop-down offers the realm only to users who hold one of them. The realms below it inherit the restriction. | Limits who can switch to the realm. |
| Child SystemRealms | List (System Realm) | No | On the **Child realms** tab. | The realms directly below this one. |
| Realm hierarchy visibility for Users | List (User) | No | On the **Visibility** tab. | Users who see this realm although it is outside their own part of the tree. |
| Realm hierarchy visibility for Groups | List (Group) | No | On the **Visibility** tab. | Groups whose members see this realm in the same way. |
| External key | Text | No | On the **Advanced** tab. Must be unique. | The realm's ID in another system. |
| CIDR | CIDR | No | On the **Advanced** tab. Set by the system, so that a realm's range contains the ranges of the realms below it. | The address range Servicely filters by. |
| Custom child subnet bitshift | Number | No | On the **Advanced** tab. Overrides the application property `system.realm.default_bitshift`, which is 16 by default, for the realms directly below this one. | The number of bits that number this realm's child realms. |

## Table settings

Realm hierarchy filters a table only when **Is realm separated?** is Yes on its table definition. The table then gets two fields that Servicely manages, **System Realm** and **System Realm CIDR**. Company hierarchy needs no setting: it filters every table that has a **Company** field.

These table properties tune a filtered table. In a table hierarchy such as Work and Incident, each table can have its own.

<!-- code: servicely-core/src/main/java/com/servicely/api/table/Table.java:39, servicely-core/src/main/kotlin/com/servicely/core/tenancy/TenancyFilterDirection.kt:9, TenancyManagerImpl.kt:152, 2027.1.10 -->
| Property | Default | Effect |
| --- | --- | --- |
| `tenancy.filter_direction` | `down` | The direction a user sees along the tree: `down`, `up` or `both`. It applies to both hierarchy providers. |
| `realm.evaluate` | Empty | A field path, for example `Company.SystemRealm`. Servicely sets the record's realm from that field when the field changes, so no trigger is needed. |
| `tenancy.sync_relations` | Empty | A comma-separated list of relationship names, for example `WorkTimeCards,RelatedSLA`. When the record's realm changes, Servicely copies it to those related records. An entry written `Table:Field` reaches every record of that table whose field refers to this record. |

Scripts that renumber realms or correct records are in [RealmUtils](page:api/scripting/platform/realm-utils) in the API reference.

## Related

- [Multi-tenancy](page:access/roles-and-permissions/multi-tenancy)
- [Applications](page:platform/applications-and-licences/applications)
- [Table, field and renderer properties](page:data-model/table-and-field-properties)
- [RealmUtils](page:api/scripting/platform/realm-utils)
