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

  1. Apply a license that includes the multi-main entitlement via `N8N_LICENSE_ACTIVATION_KEY`.
  2. Ensure `license.autoRenewalEnabled` is true and the server can reach the license server.
  3. For followers: confirm the leader is up and has written the cert, then restart the follower.
  4. 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

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


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/e8b0915e25a814b3. Report an issue: GitHub.