4 ms·
Ask HN: Choosing an open-source license that's compatible with selling?
I am in the process of choosing a license for a projet I'm doing. I want that code to be used in other open source projects freely. However, if people need to use it for a commercial product, they should acquire the rights from me.
What license would fit this? What choices are there? Any existing examples?
Thanks.
- detaro 10y agoOpen-source can be used commercially. Forbidding all commercial usage is incompatible with most definitions of "open-source" and thus all important open-source licenses. Code that can't be used in a commercial product is useless for most open-source projects as well. Generally it is a common pattern to dual-license code as both a) GPL or AGPL and b) a sold commercial license and hope that commercial users prefer to pay instead of dealing with/thinking about the consequences of using the open-source variant.
- mtmail 10y agoThose other open projects then need to tell all their users that part of their code has additional restrictions in place, making in incompatible with their licence.
- speps 10y agoI've seen dual licensed projects before.
- detaro 10y agoBut no other open-source project is going to love your code so much that they'll change to a dual-license model or copy your restrictions into their license. If your open-source version has uncommon restrictions other projects aren't going to use it. Dual-license is only useful for other open-source projects if one of the license options is a normal, established open-source license.
- brudgers 10y agoI am not a lawyer. A common dual license is GPL and a license that removes the copyleft requirement and allows modifications to the code to be distributed without source code. There are a lot of implementation details, for example if part of the code being licensed is GPL, then dual licensing the project can easily run afoul of GPL. My advice is if the project is going to be open source, focus less on a custom license as a way of making money and more on providing valuable service to the people using it. If making money off the license is the goal, then start with a proprietary model and work backward form there over time.
- brudgers 10y agoI'm not clear what 'commercial product' means in this context.