Clavem

Dual licensing

Dual licensing means the copyright holder offers the same code under two sets of terms, a free open-source license for everyone and a paid commercial license for people who cannot or will not follow the open-source terms.

This page is general information, not legal advice. Licensing and contributor agreements deserve a lawyer’s review.

How it works

The Free Software Foundation describes the practice, which it calls selling exceptions, this way: the copyright holder releases the code to the general public under a valid free software license, then separately offers users the option of paying for permission to use the same code under different terms, for instance terms allowing its inclusion in proprietary applications.

The mechanism is simple. Take a copyleft license: one that requires anyone who distributes a program built on the code to make their own source available under the same terms. A company that wants to put your library inside a closed product has two choices. It can publish its product’s source under the copyleft terms, or it can buy a commercial license that removes that obligation.

Only the copyright holder can offer the second option. Outside contributions complicate this: if contributors keep the copyright in their patches, you cannot relicense them without permission. Projects solve it with contributor agreements, which should be settled before the first outside commit.

A worked example

An illustrative case. You publish a library under a copyleft license. A developer builds a hobby app with it, publishes the app’s source, and pays nothing. A company embeds it in a closed desktop app and sells it. The company’s choices:

Option Cost Obligation
Follow the copyleft license None Publish the whole app’s source under the same terms
Buy a commercial license (example price $2,000 per product per year) $2,000 Pay, and follow the commercial terms

The commercial license text can also cover what open-source licenses usually disclaim, such as support, a warranty or indemnity, along with the right to keep source closed. That, not the code, is what the company buys.

Dual licensing versus open core and source-available

Open core sells extra proprietary features beside an open core. Dual licensing sells different terms for the same code, with no feature difference. The FSF makes this distinction itself: selling exceptions to code that is also free for the public differs from offering purely proprietary extensions. Source-available code is not offered under an open-source license at all.

Where license keys come in

The commercial license is a contract. A key is how the paid build proves a purchase. Typical setups:

  • The commercial package is a separate download that includes a license check, while the open-source version has none.
  • The key sets limits that match the contract, such as number of developers, products or devices, and an end date for a yearly license.

How Clavem handles it

Clavem issues and validates the keys for the commercial option, and does nothing about the open-source one. Sell the commercial license through Stripe, map the price to a product, and set the validity (perpetual, a number of days, or following a subscription) and the device limit that your contract describes. Clavem delivers the commercial build as a release file, and the buyer gets an order page with the key and the download.

Clavem enforces counts and dates, not contract terms. Whether a customer’s use fits the license text is a legal matter, and the key only proves they paid. See open core licensing for how a check can sit in a closed part of a product.

Questions

Who is allowed to dual-license code?

The copyright holder, meaning whoever owns the rights to all of the code. If outside contributors own pieces of it, you need their permission, which is why projects use contributor agreements.

Is dual licensing the same as open core?

No. Open core keeps some features proprietary. Dual licensing sells different legal terms for the same code.

Sources

  1. GNU Project, Selling Exceptions to the GNU GPL (checked November 2026)