n8n-io/n8n · critical · FeatureNotLicensedError
Your license does not allow for ${feature}. To enable ${feat
Error message
Your license does not allow for ${feature}. To enable ${feature}, please upgrade to a license that supports this feature. What it means
Thrown by `Start.ensureMultiMainLicensed()` after the leader fails the license check, or after a follower exhausts 5 exponential-backoff retries (2s, 4s, 8s, 16s, 32s) waiting for the leader to publish a multi-main-entitled cert to the DB. It is a `FeatureNotLicensedError` carrying diagnostic `extra` about instance type, license config, and cert state. The feature string is interpolated into the message.
Source
Thrown at packages/cli/src/commands/start.ts:361
* database yet when the follower starts up.
*/
private async ensureMultiMainLicensed() {
if (this.license.isMultiMainLicensed()) return;
if (!this.instanceSettings.isLeader) {
const maxRetries = 5;
for (let attempt = 1; attempt <= maxRetries; attempt++) {
const delayMs = 2 ** attempt * 1000; // 2s, 4s, 8s, 16s, 32s (~62s total)
this.logger.warn(
`Instance not licensed for multi-main — retrying license check in ${delayMs / 1000}s (attempt ${attempt}/${maxRetries})`,
);
await sleep(delayMs);
await this.license.reload();
if (this.license.isMultiMainLicensed()) return;
}
}
throw new FeatureNotLicensedError(LICENSE_FEATURES.MULTIPLE_MAIN_INSTANCES, {
extra: {
instance: {
type: this.instanceSettings.instanceType,
isLeader: this.instanceSettings.isLeader,
},
config: {
autoRenewalEnabled: this.globalConfig.license?.autoRenewalEnabled,
activationKeySet: !!this.globalConfig.license?.activationKey,
usingEphemeralCert: !!this.globalConfig.license?.cert,
},
cert: {
exists: (await this.license.loadCertStr()).length > 0,
isValid: this.license.isCertValid(),
hasMultiMain: this.license.hasFeatureInCert(LICENSE_FEATURES.MULTIPLE_MAIN_INSTANCES),
expiresAt: this.license.getExpiryDate()?.toISOString() ?? null,
terminatesAt: this.license.getTerminationDate()?.toISOString() ?? null,
consumerId: this.license.getConsumerId(),
},View on GitHub (pinned to 5ac6606e81)
Solutions
- Apply a license that includes the multi-main entitlement via `N8N_LICENSE_ACTIVATION_KEY`.
- Ensure `license.autoRenewalEnabled` is true and the server can reach the license server.
- For followers: confirm the leader is up and has written the cert, then restart the follower.
- If you do not intend to use multi-main, disable it (`N8N_MULTI_MAIN_ENABLED=false`).
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-flight before booting multi-main:
const license = Container.get(License);
await license.init();
if (!license.isMultiMainLicensed()) {
throw new Error('License lacks multi-main entitlement; apply a qualifying activation key before starting.');
} Try / catch
try { await start.ensureMultiMainLicensed(); } catch (e) { if (e instanceof FeatureNotLicensedError) { await disableMultiMainAndRestart(); } else throw e; } Prevention
- Validate the license entitlement in a pre-deploy gate, not at boot.
- For follower starts, ensure the leader is healthy and has published the cert first.
- Keep `license.autoRenewalEnabled=true` and outbound connectivity to the license server.
When it happens
Trigger: Booting `n8n` with multi-main enabled (`N8N_MULTI_MAIN_ENABLED=true` or queue mode with multi-main) while the loaded license cert does not include the `multipleMainInstances` entitlement. Followers also hit it if the leader never writes a valid cert within ~62 seconds.
Common situations: Starter/Community license used with an enterprise-only feature; expired license; license activation key not applied; cert renewal failed (`license.autoRenewalEnabled=false`); follower started before leader in a fresh cluster.
Related errors
- Azure Blob container name not configured. Please set `N8N_EX
- External storage bucket name not configured. Please set `N8N
- Unknown agents module: "${moduleName}". ${validTokens ? `Val
- Database type currently not supported
- Migration "PurgeInvalidWorkflowConnections1675940580449" is
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/e8b0915e25a814b3.
Report an issue: GitHub.