In my understanding, GPL is a copyleft license where your code can only be used in open-source projects (vs permissive licenses where your code can be used in closed-source projects).
Based on a few quick searches and my general understanding, it seems that AGPL is a more restrictive license where closed-source projects can’t depend on your code at all (?) and LGPL is a more permissive license where your code can be used in closed-source projects (?).
edit: After a bit more searching, I found that LGPL is still a copyleft license but a “weak” one. It looks like LGPL code used in other projects, if in their original form, can be closed-source but must be open-source if there are any changes. What constitutes as a change? Do ports count? How about updating syntax, like Python 2 to 3?
Also, it seems that AGPL might be almost the same as GPL (both are “strong” copyleft licenses) where AGPL just has a clause for source code sharing when it is shared over a network. In that case, why use GPL over AGPL, and vice versa? There seems to be many projects using GPL, so what is the downside to AGPL? Is the network sharing thing a bad restriction for some people, and why?
(back to original post from here)
I could be wrong on some or, more likely, all of those points. I also have a few questions. What is the difference between GPLv2 and GPLv3? If LGPL is more permissive, what are its differences compared to a license like MIT? Why would you go for one or another? And for AGPL, why would you prefer one over another? Is it simply how much (or really, how little) you want your code to be used in closed-sourced projects? And how do all these licenses interact with each other? Can you use GPL code in AGPL projects, and vice versa? What about LGPL code, is that too permissive for GPL or AGPL or can it be used in those projects?
GPL = whenever you distribute software which contains GPL code or libraries, your code must also be distributed as GPL or compatible. V2 vs v3 differences are mostly in v3 clearing up some ambiguities.
AGPL = same as GPL, except it applies even if you simply provide your code as a network service
LGPL = same as GPL except it makes it possible to distribute closed source components (or with incompatible license) as long as the user is able to replace the LGPL libraries.
MIT = you can do whatever with the code
So, GPL only concerns you if you distribute your application as a binary to users, think like Photoshop or Microsoft Office. Your code is effectively GPL even if you don’t distribute it, but there’s no requirement to make the source available to everyone, only to those who you distribute the software to.
With AGPL even having the application accessible over the network is considered as distribution to users. You basically cannot have an effectively closed source application with AGPL.
LGPL is usually used with dynamically linked libraries where you can distribute your application easily as long as user can replace those. For example Qt is LGPL and you can sell your app without providing source code as long as the user can replace the Qt framework dll/so libraries.
And with MIT anything goes, you can use it in a closed source product, in fact of those four it’s the only one that allows you to have a truly closed source codebase.
As for how they’re compatible, the most strict license usually applies. All of these four are compatible to some degree, but you can’t simply take a GPL code into a MIT codebase and make it more permissive suddenly.
Your code can be MIT, but the original still is GPL. Meaning that when you distribute the application, it’s effectively GPL. Same with all license combinations.
As for why would you choose one or the other, it’s pretty much about how much you want your users to give back.
With GPL, you want any modifications to be able to be included in your project. With LGPL as well, but you’re not forcing people to open source their whole app, only direct modifications to your code. With AGPL you’re basically forcing everyone to open source their app if they use your project at all. With MIT you don’t care at all, you just give your code to the humanity to do whatever with it.


