HeadlinesBriefing favicon HeadlinesBriefing.com

Developer Earns $350K From Open-Source Library With Dual Licensing

Hacker News •
×

A developer has earned over $350K from a single JavaScript library using dual licensing. The lightGallery creator detailed how the business model works: offer the same software under both a free GPL license and a paid commercial license. Companies that can't open-source their projects—most enterprises—pay for the commercial license to stay legally compliant.

The GPL license is viral by design. If a company uses GPL-licensed JavaScript on their website, they may need to open-source their entire site's source code. GPLv3 works best for libraries since it's triggered by distribution. AGPLv3 is better for SaaS products because it closes the network-use loophole. Developers must also handle contributor rights carefully—a Copyright Assignment Agreement lets you relicense others' code, while a Contributor License Agreement only grants permission to use it.

When switching existing projects to dual licensing, release under a new major version so old versions remain free under the original license. The developer uses Kelviq for license delivery, which handles key generation and checkout for a 3.5% transaction fee. Dual licensing has funded commercial open-source projects for decades, used by major players like Oracle and Qt.