Is It Legal to Turn a Public Repo into Closed Source and Sell It?

Is It Legal to Turn a Public Repo into Closed Source and Sell It?

As the founder of RepoMarket.io, a platform where you can buy and sell closed-source software, I’ve noticed that many developers are curious about the legalities of selling code that was originally published as open-source. This question frequently comes up: Can I turn a public repository into closed source and sell it? The answer isn’t a simple “yes” or “no,” but let’s break it down.

Understanding Open Source Licenses

First and foremost, it’s important to understand that once code is published under an open-source license, those terms apply permanently to the version of the code that was released. Open-source licenses (such as MIT, GPL, Apache, etc.) allow anyone to use, modify, and distribute the code under the specified terms. Once the code is out there, those permissions cannot be revoked for anyone who already received the code under that license. So, taking that exact public repo, closing it, and selling it isn’t allowed by the open-source license.

However, that doesn’t mean you can’t legally create a closed-source version of the project and sell it, but the approach matters.

How to Legally Sell a Previously Public Repo

Here’s the legal path to selling a closed-source version of an open-source project: You can “fork” or clone the repository, make modifications, and create a new version of the project. As long as you follow the open-source license’s requirements, you can create a separate repo with your own updates. You may also offer proprietary features or services not available in the original public repo, and that’s where you add value that can be monetized.

For instance:

  • Dual Licensing: Some developers offer the open-source version for free and create a closed-source, premium version with additional features, offering licenses to enterprises or other developers.

  • Service Offerings: You can create a business around offering support, hosting, or extended features, which aren’t covered under the open-source license.

Ensuring Compliance

When creating a closed-source version, it’s critical to respect the original open-source license. Many licenses allow the distribution of modified versions under certain conditions, but licenses like the GPL, for example, require that if you distribute your modified version, it must also be licensed under the GPL. Other licenses, like MIT or Apache, are more permissive, allowing you to modify the code and distribute it under a closed-source license as long as you credit the original authors and follow specific guidelines.

So, the key is in how you handle your modifications:

  • Clone and Modify: Clone the public repo, make substantial changes or additions, and ensure that those changes are significant enough to create a distinct product. This could involve new features, optimizations, or integrations that were not present in the original project.

  • Separate Offering: Use the original code base as a foundation and create a new offering that’s distinct from the open-source version. You can charge for this new product as long as the open-source license terms are respected.

What to Avoid

  • Don’t Repackage and Sell: You cannot simply take an existing open-source project, make minor changes, and then repackage it as a closed-source product. This violates the original license and can lead to legal action.

  • Respect the License Terms: Always ensure you’re complying with the original license terms. Violating open-source licenses can not only hurt your reputation but also lead to costly legal consequences.

Leveraging Platforms like RepoMarket.io

At RepoMarket.io, our platform is designed to facilitate the sale of closed-source software. Developers can build off existing code, enhance it, and list their new creations for sale in a legal and ethical manner. By offering original features, services, or support, developers can monetize their efforts while respecting open-source licenses. RepoMarket.io provides a marketplace where you can easily list your closed-source software, enabling buyers to purchase valuable, feature-rich repositories.

Conclusion

So, is it legal to turn a public repo into closed source and sell it? Not exactly. You can’t simply close the existing public repo and sell it, but you can build on that project, introduce significant modifications, and then sell your new version as a closed-source product. By doing so in a compliant way, you respect the spirit of open source while also creating opportunities for revenue. Platforms like RepoMarket.io make it easier for developers to capitalize on their innovations and bring their unique solutions to market.