Clavem

Open-core licensing: choosing a license and deciding what the key actually protects

In an open-core product, a license key cannot protect code that anyone can read and edit. Put the paid features in a separate module or build that you distribute only to customers, gate that distribution and its updates with the key, and let the open part be open.

Software licenses are legal documents with long histories. This article explains the choices from a seller’s point of view. Have a lawyer read the license you choose, especially if you accept outside contributions.

What open core means

Open core is a business model. The core of the product is published under an open license. A set of extra features, often aimed at companies, is sold under a commercial license. The word is looser than it sounds: the open part can be fully open source, or merely source-available.

The model has one hard constraint for licensing. If the paid features live in code that customers can read and modify, the license key is a request, not a lock. So the first decision is architectural: where do the paid features sit?

The license for the open part

License What it allows What it means for you
MIT or Apache 2.0 Use, change and redistribute, including inside closed products A competitor can host your core. You rely on the commercial module and brand
AGPL-3.0 Use and change, with a duty to offer source to users who interact with the program over a network (section 13) Hosting your core without sharing changes is harder. Some companies avoid AGPL code entirely
Business Source License (BSL) Copy, modify and use for non-production, or for production within the Additional Use Grant; converts to an open license on the Change Date, by default four years Not open source. Keeps competitors out for a period
Functional Source License (FSL) Use, study, modify and redistribute for permitted purposes; converts to Apache 2.0 or MIT after two years Not open source for two years, then permissive

The Open Source Initiative’s definition says a license must not restrict anyone from using the program in a specific field of endeavor. That is why a license that limits production use, such as BSL or FSL, is described by its own authors as source-available, not open source. MariaDB’s FAQ says so directly about BSL. Choose by what you want customers to be able to do, then choose the label to match. Calling a restricted license “open source” costs you trust with the people you hoped to attract.

What the key protects

Look at each thing you could sell, and ask whether a key can protect it.

What you sell Can a key protect it? How
A closed-source enterprise module Yes Distribute it only to customers, and check the key at startup
Signed binaries and installers Yes Gate the download and the updates
A hosted version Yes The service itself is the control, an account or a key per tenant
Support and an SLA Yes The key or the contract identifies who may ask
A feature flag inside open code No The user can edit the flag out
The right to use the brand Not by a key By trademark and a clear policy

The honest conclusion is that a key protects what you distribute selectively. Publish the core freely, and keep the commercial module in a separate repository, package or build. Put the license check in that module, so the open code has no paid-feature logic to remove. Some projects also sell the convenience: a signed, tested, supported build, delivered with updates, for people who could compile it but would rather not.

A layout that works

core/            MIT or Apache 2.0, public repository
enterprise/      Commercial license, private repository
  license.js     Calls the License API and verifies the signed token
  index.js       Registers the paid features

The core loads the commercial module only when it is installed and licensed. This is a sketch of the pattern, not code from a product:

let enterprise = null;
try { enterprise = await import('@acme/enterprise'); } catch { /* community edition */ }
if (enterprise && (await enterprise.licensed())) enterprise.register(app);

The community edition has no check, no nag and no trace of the paid code. Customers of the paid edition receive the module through a gated download, and updates arrive the same way. In Clavem the releases endpoint returns download links only for a valid license key, so a lapsed key stops new builds without touching the ones already installed.

Self-hosted customers

Self-hosted deployments differ from desktop installs in ways that matter for the license design.

Concern Recommendation
What is a seat One activation per installation, such as per server or per cluster, not per container
Instance name The host or cluster name, so the customer recognizes it on the device page
Fingerprint Usually leave it out. Containers and virtual machines change ids on restart
Network Many production servers have no outbound access. Verify the signed token offline and refresh it when a window opens
Failure Never stop a running production service because a license check timed out. Degrade by refusing new paid features instead
Keys in configuration Read the key from an environment variable or a secret, never from a file in the repository

The signed token fits air-gapped customers. The app verifies an Ed25519 signature with a public key compiled into the commercial module, with no call to any server. The token tells it to look online again after 14 days, but your module decides what happens when that fails, and for production servers the sensible policy is a long tolerance and a visible warning in the admin screen.

Counting

Pick the unit customers recognize. If your pricing is per node, set the license’s device limit to the number of nodes. A customer with five nodes gets a key with a limit of five, and each node activates once. Moving a node to a new host means deactivating the old activation first, which the customer can do on the device page.

For contracts above the self-service range, create the key by hand with the management API and set the limit and expiry to match the agreement. See site licenses for companies.

Contributor and license hygiene

Three practical points:

  1. Contributions. If outside contributors can add to the open core and you may later relicense it, decide whether to require a contributor license agreement from the start. Changing a license later without one can be hard.
  2. Dependencies. The licenses of your dependencies constrain yours. A copyleft dependency in the commercial module may force you to publish it.
  3. Clarity. Say in the repository which directories carry which license, and say it in the first lines of the readme. Ambiguity helps nobody.

Doing this with Clavem

Clavem fits the commercial side: a key per customer from a Stripe payment, a device limit that doubles as a node count, signed tokens for servers that cannot reach the internet, and gated downloads and updates for the commercial build. It does not host your source or open-source projects. The offline verification page has the verification code, and offline-first apps and licensing covers the failure policy.

Questions

Is the Business Source License open source?

No. Its authors say it does not meet the Open Source Definition, because that definition does not allow restrictions on fields of use such as production use. The code is available, and it converts to an open-source license on a set date, by default four years after release.

Can a license key protect code I publish under an open-source license?

Not in any technical sense. Anyone can remove a check from source they may modify. The key can still control your commercial build, its updates, your support and your hosted service.

How should a self-hosted product count licenses?

Per server or per cluster is the usual unit, because that is what the customer deploys. Use one activation per installation, name it after the host or cluster, and avoid activating per container, which burns seats on every restart.

Sources

  1. Open Source Initiative, Open Source Definition (as of November 2026)
  2. Functional Source License (FSL) (as of November 2026)
  3. MariaDB, Business Source License FAQ (as of November 2026)
  4. GNU Affero General Public License v3, section 13 (as of November 2026)