I am searching for a suitable license for my project (A Grav CMS PHP Website Rating Plugin). I want to ensure that:

  • The code is published open source
  • The code will be kept open source by other users (copyleft)
  • Restrict usage to non-commercial projects (Nobody can commercially use or sell my plugin without permission)

My conclusion was, that the GPL3 covers the first and the second. However if the Software/Website is hosted as a service (which websites are in my understanding) they can modify the code, but do not need to publish it to the world. Thatswhy I'd need the Affero GPL3.

Now to the last option: I know, that it is possible to add additional restrictions to the GPL3. Is it possible to forbid commercial use, without explicit permission by the owner (me)?

I've seen for example fancybox3 which does this: https://fancyapps.com/fancybox/3/#license

They have only written those commercial restrictions to their readme and website, but they did not publish any license text itself. Does this still count?

If I do not add any additional (commercial) restriction, but only use the AGPL, would that mean, that any commercial project must open source their changes to the plugin? Or would that even mean they must open source the whole website?

  • "Restrict usage to open source projects" and "Nobody can commercially use or sell my plugin without permission" are not remotely the same: plenty of distribution of FLOSS code is done on a commercial basis. Is your concern primarily about commercial use or primarily about proprietary use? – apsillers Oct 23 '20 at 12:27
  • To put it on other words: If someone wants to make money with my code, I also want to earn something (forbit commercial use). Also I want to make sure that if someone changes the code, it is still open to everyone else (forbit proprietary use). As the copyright holder I could still give out custom licenses to individuals though. – NicoHood Oct 23 '20 at 13:18
  • @NicoHood That would not be either Free Software or Open Source. – curiousdannii Oct 24 '20 at 0:29

The GPL and AGPL permit commercial use, as do all licenses approved by the Free Software Foundation and the Open Source Initiative. If you want to prohibit commercial use or distribution, you will need to look outside the FLOSS community for licensing terms.

Since you mentioned Fancybox, I should note that the author of that software has made significant errors in expressing their license terms in a coherent way. You cannot add restrictions to the GPL. You may craft your own license whose terms are similar to the GPL, but that would be some other license, not the GPL. Fancybox's primary error is saying that "open source projects can use Fancybox under the GPL" but one of the chief freedoms of the GPL is to give it to others for, potentially, downstream commercial use. Are open source projects afforded this freedom to make such an offer to a downstream commercial user, or not? It's very unclear. If yes, then the prohibition on commercial use is toothless; if no, then there's no way the freedoms afforded to open source projects could be called the GPL.

Also worthy of legal consideration is the following in GPLv3 section 7:

If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term

This seems directly applicable to your case. Do not state your work is under the GPL unless you want to grant users the freedom to remove your externally-stated prohibition on commercial use.

Finally, you ask,

If I do not add any additional (commercial) restriction, but only use the AGPL, would that mean, that any commercial project must open source their changes to the plugin? Or would that even mean they must open source the whole website?

The AGPL requires that modifications must be offered to all users who interact with the modified code over a network. Use of your plugin would possibly require disclosure of the entire back-end system that includes the plugin, assuming that it forms a single new work under local copyright law. The FSF considers this legally nuanced question in their GPL FAQ: https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation

  • Very nice writeup, thanks! Yes, the example of fancybox really confused me, and I found multiple similar examples, especially in the wordpress plugin community. Some more thoughts: If someone adds a new feature to the plugin and uses it on his website, I can only request the source code, if it is AGPL, not GPL? But if I do, I could (depending on the law interpretation) even request the whole website code? Which would result in the fact, that only open source projects would "dare" to use my software, right? – NicoHood Oct 23 '20 at 15:34
  • @NivoHood There are many ways to make money; I can only say that businesses whose commercial model can allow total disclosure of their source code would touch your code, yes. One such commercial model that can do this is AWS: people pay them to run services at scale in the cloud, and no one cares that the source code is available. AWS's strength lies in its vast wealth of silicone and metal, not the secrecy of its services' source code. Conversely, you will scare off Google, which has a policy against AGPL'd code for exactly this reason. – apsillers Oct 23 '20 at 19:41
  • Sure, it was just for better understanding. Thanks a lot! :-) – NicoHood Oct 23 '20 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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