I've been a hobbyist programmer for a long time, and only recently have I been writing code I've thought others might benefit from. Here's my conundrum: I'm a big supporter of the GPL, and I understand the arguments against attaching non-commercial clauses to otherwise "free" software. However, I can also think of legitimate use cases for wanting a more permissive license. What I don't want is someone bundling my code with their proprietary code in a binary, and then selling it.

Thus, I've been considering dual-licensing my code: the first being GPL, the second being a more permissive license that is only applicable for non-commercial use. The problem is, I haven't seen (and can't find) anything like this.

Is this a bad idea? Are there any examples of such a copyright arrangement? Are there any legitimate (i.e., legally sound) non-commercial permissive licenses?

2 Answers 2


If your main concern is to prevent someone selling something based on your code than GPL is actually to weak already. It only requires the publishing of the code of the derived work (and that it is also GPL).

Opensource licenses protect the information no monetary concerns. There are licenses that try to accieve the combination you are looking for, but they are not free, SPDX, OSI or FSF approved. And really hard to enforce.

Update: Different Licenses for different use cases are achieved with dual licenses. You could have a look at what oracle did with glassfish. The separate commercial and non commercial use cases. The license is "CDDL-1.0 OR GPL-2.0 WITH Classpath-exception-2.0", url: "https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html". But if this works because Oracle and its lawyers are behind it or the dual license itself I can't tell.

  • 1
    I don't want to completely prevent people from selling something based on my code and adhere to a GPL-like license -- I want people to be able to either: license it under the GPL; or, distribute it as part of a closed-source binary with the provision that the binary is released non-commercially. Apr 8, 2016 at 10:48
  • Your lawyer will advise you on how to do this - you will need one anyway to sue those who don't adhere to the non-commercial licensing terms. Apr 8, 2016 at 13:06

You might also want to look at the Mozilla Public License. It's somewhere between the permissive licenses like BSD/MIT and the strong copyleft of the GPL. Someone else can use your library, but they have to make available your code and any modifications they have made to it. On the one hand, they can use your work to make money and they don't have to release all of their own proprietary code, but they can't do so without giving you proper credit and without giving back to you and the community any improvements they've made to your work.

Alternatively, you can dual-license the library. It's GPL for everyone, but if you want to use it in proprietary code you have to purchase a commercial license from the copyright holder; MySQL for example does this. You can then tailor the commercial license as you see fit; this may of course require you to engage the services of an expensive lawyer, but c'est la vie.

It's also possible that neither of these options appeals to you, but it's at least something worth looking at.

  • 2
    +1. The MPL is a nice alternative to the GPL and is also compatible. This answer touches on it, but for clarify, MPL applies on a per file basis. So, if you release a library, someone wholesale copies and only modifies renderer.cpp, they only need to publish the updated renderer.cpp.
    – user3570
    Apr 10, 2016 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.