{"record":{"id":"e8b0915e25a814b3","repo":"n8n-io/n8n","slug":"your-license-does-not-allow-for-feature-to-ena","errorCode":null,"errorMessage":"Your license does not allow for ${feature}. To enable ${feature}, please upgrade to a license that supports this feature.","messagePattern":"Your license does not allow for (.+?)\\. To enable (.+?), please upgrade to a license that supports this feature\\.","errorType":"exception","errorClass":"FeatureNotLicensedError","httpStatus":null,"severity":"critical","filePath":"packages/cli/src/commands/start.ts","lineNumber":361,"sourceCode":"\t * database yet when the follower starts up.\n\t */\n\tprivate async ensureMultiMainLicensed() {\n\t\tif (this.license.isMultiMainLicensed()) return;\n\n\t\tif (!this.instanceSettings.isLeader) {\n\t\t\tconst maxRetries = 5;\n\t\t\tfor (let attempt = 1; attempt <= maxRetries; attempt++) {\n\t\t\t\tconst delayMs = 2 ** attempt * 1000; // 2s, 4s, 8s, 16s, 32s (~62s total)\n\t\t\t\tthis.logger.warn(\n\t\t\t\t\t`Instance not licensed for multi-main — retrying license check in ${delayMs / 1000}s (attempt ${attempt}/${maxRetries})`,\n\t\t\t\t);\n\t\t\t\tawait sleep(delayMs);\n\t\t\t\tawait this.license.reload();\n\t\t\t\tif (this.license.isMultiMainLicensed()) return;\n\t\t\t}\n\t\t}\n\n\t\tthrow new FeatureNotLicensedError(LICENSE_FEATURES.MULTIPLE_MAIN_INSTANCES, {\n\t\t\textra: {\n\t\t\t\tinstance: {\n\t\t\t\t\ttype: this.instanceSettings.instanceType,\n\t\t\t\t\tisLeader: this.instanceSettings.isLeader,\n\t\t\t\t},\n\t\t\t\tconfig: {\n\t\t\t\t\tautoRenewalEnabled: this.globalConfig.license?.autoRenewalEnabled,\n\t\t\t\t\tactivationKeySet: !!this.globalConfig.license?.activationKey,\n\t\t\t\t\tusingEphemeralCert: !!this.globalConfig.license?.cert,\n\t\t\t\t},\n\t\t\t\tcert: {\n\t\t\t\t\texists: (await this.license.loadCertStr()).length > 0,\n\t\t\t\t\tisValid: this.license.isCertValid(),\n\t\t\t\t\thasMultiMain: this.license.hasFeatureInCert(LICENSE_FEATURES.MULTIPLE_MAIN_INSTANCES),\n\t\t\t\t\texpiresAt: this.license.getExpiryDate()?.toISOString() ?? null,\n\t\t\t\t\tterminatesAt: this.license.getTerminationDate()?.toISOString() ?? null,\n\t\t\t\t\tconsumerId: this.license.getConsumerId(),\n\t\t\t\t},","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/cli/src/commands/start.ts#L343-L379","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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`)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-flight before booting multi-main:\nconst license = Container.get(License);\nawait license.init();\nif (!license.isMultiMainLicensed()) {\n  throw new Error('License lacks multi-main entitlement; apply a qualifying activation key before starting.');\n}","typeGuard":null,"tryCatchPattern":"try { await start.ensureMultiMainLicensed(); } catch (e) { if (e instanceof FeatureNotLicensedError) { await disableMultiMainAndRestart(); } else throw e; }","preventionTips":["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."],"tags":["license","multi-main","startup","enterprise"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}