Back to Blog

    November 19, 2026

    Dual Licensing: How to Sell Open Source Software Under a Commercial License

    Looking for SaaS to license? Browse live listings or explore products by category. New to the deal structures? Compare licence and white-label types or check a term in the glossary. Explore the white-label SaaS marketplace, software to license or license vs build. SaaS founder? List your Product for licensing.

    Quick answer: dual licensing means offering the same software under two licenses: a free open source license, usually a copyleft one such as the GPL or AGPL, and a paid commercial license. Companies that want to ship the code inside a closed product, or avoid the copyleft duty to share their own source, buy the commercial license. It only works if you own all the copyright in the code.

    This guide is for founders and developers who own software and want to earn from it without giving up an open source community, and for companies deciding whether to buy a commercial license for code they found on GitHub. It covers how the model works, when it brings in revenue, how it differs from open core and source-available licenses, how to price the commercial side, and the ownership checks to do first. It is general information, not legal advice.

    Key takeaways

    • You sell an exception: a commercial license frees buyers from the copyleft terms of the free version.
    • It works with copyleft licenses (GPL, AGPL). Permissive licenses like MIT give buyers little reason to pay.
    • You can only dual license code you fully own, so outside contributions need a contributor agreement.
    • Open core sells extra features; a dual license sells different rights to the same code.
    • Price the commercial license on how the buyer ships it: per developer, per deployment, per device or as a share of revenue.

    What is dual licensing?

    It is a way to earn from software you also release as open source. You publish the code under a free license and, alongside it, sell a commercial license to the very same code. Each user picks the license that suits them. Hobbyists, students and open source projects take the free license. Companies whose plans clash with its terms buy the commercial one.

    The free license is almost always copyleft. The GPL says that if you distribute software that includes GPL code, you must release the source of the whole combined work under the GPL. The AGPL goes further: if users interact with a modified version over a network, as with a SaaS product, they must be able to get its source. A company building a closed, paid product usually cannot accept that, so it pays for a commercial license that removes the duty. Long-standing examples of the model include the MySQL database and the Qt framework.

    In short, the model does not sell the software itself, which anyone can download. It sells an exception to the free license's terms. That is why it suits code other companies build into their own products: libraries, SDKs, databases, PDF and document engines, and embeddable components.

    Dual licensing vs open core vs source-available

    ModelWhat is freeWhat buyers pay forBest fit
    Dual licensingAll the code, under a copyleft license (GPL or AGPL)A commercial license to the same code without copyleft dutiesLibraries, databases and SDKs that other companies embed
    Open coreA core product under an open source licenseExtra proprietary features, hosting or enterprise toolsProducts where teams want admin, security or scale features
    Source-available (for example the Business Source License)Reading and limited use of the code; not open sourceProduction or competing use, until a set change date where the license allowsInfrastructure tools worried about cloud providers reselling them
    Permissive open source (MIT, Apache 2.0)Everything, including use in closed productsSupport, hosting or services, not the licenseBuilding adoption and a standard, with revenue from services
    Proprietary onlyNothing, or a trialEvery useProducts sold, licensed or white-labeled directly

    How the dual licensing model makes money

    The free version spreads the code. Developers try it, write about it, report bugs and get it approved inside companies, all without a sales team. Revenue arrives when one of those companies wants to:

    • Ship it inside a closed product, such as a desktop app, a device or an on-premise install, without opening its own source.
    • Run a modified AGPL version as a hosted service without publishing its changes.
    • Get contract terms the free license does not give, such as warranties, indemnity, support response times or a named license for its compliance team.
    • Rebrand or white-label the component inside a product sold under its own name.

    Legal and procurement teams in larger companies often have policies against copyleft code in shipped products. For them, buying a commercial license is the quickest way through review, which is a big part of why the model works.

    When dual licensing works (and when it does not)

    The model depends on a gap between what the free license allows and what paying companies want to do. Check these conditions before you choose it:

    • Your code gets embedded or distributed. If customers mainly use your hosted app, GPL duties rarely apply to them, and only the AGPL creates a reason to pay.
    • The free license is copyleft. Under MIT or Apache 2.0 anyone may already use the code in closed products, so a commercial license has little to sell beyond support. Switching an existing permissive project to copyleft only affects future versions; past releases stay under their old license.
    • You own all the code. Covered in the next section; this is the most common blocker.
    • Buyers are businesses with a product to protect. Individual developers and internal-only users rarely need the commercial license.
    • The code is hard to replace. If a permissive alternative does the same job, buyers switch to it instead of paying.

    Watch the community side too. Developers sometimes see the model as a trap, and a project that changes its license can be forked by people who prefer the old terms. Be clear from day one about which license applies to what, and keep the free version genuinely useful.

    Ownership: the rights you need before you dual license

    Only a copyright owner, or someone it has authorised, can license code on new terms. If you sell a commercial license to code that other people wrote under the GPL, you are granting rights you do not hold. Before you sell:

    • Collect contributor agreements. Ask outside contributors to sign a contributor license agreement (CLA) that lets you relicense their work, or to assign copyright to you. Set this up before the first pull request; chasing past contributors later is slow and sometimes impossible.
    • Check employee and contractor work. Make sure employment and contractor agreements give your company the rights to the code they wrote.
    • Audit third-party dependencies. If your code includes GPL code owned by someone else, you cannot offer a commercial license that covers it. Replace it, or license it from its owner.
    • Keep a clean record. Buyers' legal teams often ask how you can prove ownership. A dependency list, signed CLAs and a clear repository history make the sale faster.

    This is general information, not legal advice. Licensing terms depend on your country and the exact license text, so ask a lawyer to review your setup and your commercial license.

    How to price a commercial license

    Charge for the thing that grows with the buyer's benefit. The common options are:

    • Per developer. Each engineer who builds with the code needs a seat. Easy to count for SDKs and frameworks; see our guide to seat-based licensing.
    • Per deployment, server or device. Common when the code ships inside hardware or on-premise installs, as in OEM software licensing.
    • Per end product or distribution. One fee for each product the buyer ships that contains your code.
    • Revenue share or royalty. A percentage of the buyer's sales of the product that contains your code; see software revenue share agreements for how to define the revenue base.
    • Annual subscription or one-time fee. A yearly fee includes updates and support; a one-time fee covers a version. Our comparison of perpetual vs subscription licenses walks through the trade-offs.

    Illustrative example only: a team maintaining a PDF rendering library might keep it free under the AGPL, charge an annual fee per developer for companies that build it into closed apps, and offer a separate OEM price for hardware makers that ship it on every device. Real prices vary widely, so start from what replacing your code would cost the buyer.

    What to put in the commercial license

    The commercial license is a normal proprietary license agreement. Spell out:

    • The grant: the right to use, modify and distribute the code inside the buyer's products without the copyleft duties.
    • Scope: which products, how many developers, devices or deployments, and which territories.
    • Exclusivity: almost always non-exclusive; see exclusive vs non-exclusive licenses.
    • Sublicensing: whether the buyer's customers get rights to the embedded code, and on what terms. Our software sublicense agreement guide covers this.
    • Versions, updates and support: which releases are covered and for how long.
    • Warranties, indemnity and liability caps: the protections the free license does not give.
    • Fees, reporting and audit rights: especially for per-device or revenue-based pricing.

    Dual licensing vs other ways to license your code

    A dual license is one of several ways to earn from code you own. If you do not need an open source community, a plain proprietary license, a white-label deal or a source code sale may be simpler. Our guide to license types compares the main options, and software monetization models covers ways to earn beyond licensing, such as hosting, support and services.

    If you sell the right to the source code itself to one buyer, rather than to many, look at source code for sale deals and protect buyers with a source code escrow agreement where they need one.

    Listing a commercially licensed product on LicenseSaaS

    LicenseSaaS is a marketplace where founders list SaaS products, AI tools, APIs, SDKs and source code for licensing and white-labeling. If you offer a commercial license alongside an open source version, you can list it for free, state the license and white-label rights you sell, and reach agencies, resellers and software companies looking for code to build on. Check the buyer requests to see what businesses are asking for, and see pricing for plans and fees.

    Buyers can browse software available to license. LicenseSaaS does not verify listings or ownership claims, so ask sellers how they own the code, read the license terms and have a lawyer review the agreement before you sign.

    Frequently asked questions

    What is dual licensing in software?

    Dual licensing is offering the same code under two licenses at once: a free open source license, usually a copyleft one like the GPL or AGPL, and a paid commercial license. Users choose. Anyone who accepts the copyleft terms can use it free; a company that wants to keep its own product closed buys the commercial license.

    Is dual licensing legal?

    Yes. The copyright owner can license its code to different people on different terms. The catch is ownership: you can only offer a commercial license for code you own or have the right to relicense, so code from outside contributors needs a contributor license agreement or copyright assignment first. This is general information, not legal advice.

    What is the difference between dual licensing and open core?

    A dual license offers the same code under two licenses, so buyers pay for different rights. Open core keeps a basic product open source and sells separate proprietary features or services on top, so buyers pay for more product. Some companies use both.

    Can you use open source software for commercial purposes?

    Yes. Every license approved by the Open Source Initiative allows commercial use. What changes is the duties: permissive licenses such as MIT mostly ask for attribution, while copyleft licenses such as the GPL require you to share your source under the same license when you distribute the combined work, which is why companies buy commercial licenses.

    Can an open source license prohibit commercial use?

    Not if it is to stay open source, because the Open Source Definition forbids restricting fields of use. Licenses that ban commercial use, such as non-commercial or source-available licenses, are not open source. If you want to charge businesses, a copyleft license plus a paid commercial license is the open source way to do it.

    Take the next step

    Discover SaaS products to license, browse by category, or list your own product on LicenseSaaS.