The difference between GPL and Apache-licensed code for web developers: not so much, actually

20 May 2011

For most web developers, there is no prac­ti­cal dif­fer­ence between using GPL’d code (version 2) and code with a more per­mis­sive license such as Apache or BSD. For some reason, a lot of people don’t seem to get this. (One sit­u­a­tion in which there is difference: if you’re dis­trib­ut­ing the actual code itself—if people down­load your code and run it on their own servers, for example—in this case you need to make the source code available. Another is where your code is “distributed” by being em­bed­ded on a hard­ware device, such as a phone.)

If the code runs on your servers only, you do not need to pub­licly release your changes. If you’ve written the code for a customer, you need to give them the source code, but there’s no legal oblig­a­tion for the cus­tomer to make the code pub­licly avail­able to anyone else. (As an example, Google has written a lot of patches to MySQL and Linux, which have been de­ployed onto their machines. They haven’t had to make any of these patches pub­licly available—although at least in the case of MySQL, they’ve sub­se­quently made some of these changes public.)

This is more or less a loop­hole in the GPL—it was written at a time when in­ter­ac­tions with soft­ware were mostly con­ducted with soft­ware running on your own machine, and the loop­hole is the reason the AGPL exists. The AGPL has the prop­er­ties many people seem to think the GPL has: in the case of AGPL-licensed code, if you make mod­i­fi­ca­tions and run the mod­i­fied code on your server, you do need to make the mod­i­fi­ca­tions public. (MongoDB is perhaps the most promi­nent example of soft­ware li­censed in this way; they have a helpful licensing page de­scrib­ing the cir­cum­stances under which you do and don’t have to release any changes you might make.)

A few useful entries from the FSF’s GPL 2 FAQ:

(In reading the FAQ entries, note that “distribution” is not what you’re doing if you deploy soft­ware to web servers, or your customers’ web servers. Dis­tri­b­u­tion is where cus­tomers get a copy of your soft­ware to run on their servers.)