An Introduction to Software Licensing
A software license is a legal document that specifies what can and can not be done with a piece of software. Primarily based on copyright law, it outlines the rights and obligations of the users.
Copyright law prohibits the free use, modification, and redistribution of computer software by default. In order to grant these rights, the author needs to license their software under a specific software license, thereby allowing users to practice these rights. A license grant usually comes with obligations specified in the terms of the license, and different terms make different licenses.
Common licenses and their categorization
Software developers may choose to draft a license on their own in order to specify the terms of using the software. However, in most cases, developers tend to release their software under an existing license. Free software licenses are roughly categorized into three types: permissive licenses, intermediate licenses, and copyleft licenses.
Note that if you are a regular user without any need to modify the software, then whatever license the software is under, as long as it is a free software license, it makes no difference to you - anyway, it grants you the freedom to use and redistribute the software. Free software licenses are categorized into the three types based on the obligations the developer has to follow when making modifications to the software.
For the rest of the article, we'll explain the three types of free software licenses. Regular users may stop here.
Permissive licenses
This kind of licenses is extremely permissive regarding the reuse of source code. There are no other obligations other than attributing the software. If a software is released under a permissive license, then others may use it however they wish, including incorporating its source code into their proprietary software.
Here are some common permissive licenses (recommended ones go first):
- Apache License, a very complete and mature permissive license;
- Expat License,aka "MIT License." This is a short and classical permissive license;
- BSD 2-Clause License and BSD 3-Clause License. These two BSD licenses have the same effect with, but different wording from the Expat License. The difference between the 3-Clause and 2-Clause versions is an additional restriction in the former prohibiting using the authors' name as an endorsement for derivative works;
- ISC License, effectively the same as Expat License, but with simpler terms. Compared to the above licenses, the ISC License is much less frequently seen.
We recommend the Apache License the most, for its comprehensive yet still permissive terms and conditions. Except the Apache License, all other licenses listed above are relatively short. Despite that, we believe choosing the Expat License (the MIT License) is not a bad idea either.
While permissive licenses allow for widespread use of software, they enable others to incorporate your source code into their own projects and reject to release the source code of their own. One way to deal with this is to use a copyleft license.
Copyleft licenses
The idea behind copyleft is that, when you are granted freedom, you are obliged to pass to others the same freedom. If a piece of software is licensed under a copyleft license, then when you incorporate its source code into your own project, you are obliged to release the source code of your own project under the same license.
The most well-known copyleft license is the GNU General Public License, or in short, GNU GPL or GPL. While granting users the freedom to use, modify and share the software, GPL additionally states that when distributing your derivative work, you must also provide the source code of your derivative to your recipients.
Besides GPL, another common copyleft license is AGPL, i.e. the GNU Affero General Public License. Compared to GPL, AGPL is more suitable for software that runs as a network service. AGPL treats usage of software over a network as distribution. This way, when you use a AGPL-licensed program to create a derivative project and serve it over the internet, others may also require source code of your derivative under the AGPL.
By licensing your software under a copyleft license like GPL and AGPL, you prevent them from being incorporated into proprietary software and boost free software proliferation.
Intermediate licenses
This kind of licenses is also known as "weak copyleft" licenses. They seek a compromise between permissive licenses and copyleft licenses. When a piece of software is licensed under an intermediate license, copyleft only covers that software itself, and does not cover any other software linked against or depending on it.
One common intermediate license is the Mozilla Public License, or MPL. In MPL, copyleft is file-based. In other words, when project A is licensed under the MPL, and you make use of it in your project B, then you must release all source code files you've modified from project A; but this won't affect your choice of license for project B.
Besides MPL, the GNU Lesser General Public License, or LGPL is a popular choice. It's mainly used for function libraries, and sometimes used for other types of software. When a library is licensed under LGPL and another program makes use of it (or its modified version), the source code for that program must be provided.
Licensing your software under an intermediate license ensures the freedom of your software itself, though it does not prevent its combined work from being proprietary.
Public domain
Besides licensing your software under one of the above licenses, you can also release your software into the public domain. Public domain is even more permissive than a permissive license, specifically exempting one from the minimum obligation to attribute a work. In other words, there are absolutely no obligations regarding the use of a work.
Dedicating your work into the public domain is not licensing it, but rather surrendering all your copyright over it. Some common tools for public domain dedication are CC0 and The Unlicense.