When trying to get a new project off the ground, there’s no doubt that community is important, but from all the stuff I’ve run across, one of the least understood and most important aspects of doing so seems to be licensing. Your project’s license is its constitution. It tells potential users and contributors what your attitude is and sets the tone of the dialogue… and if you get it wrong, you can easily prevent like-minded people from joining you by accidentally picking a license that doesn’t actually allow what you think it does.
What follows is a lay programmer’s quick overview of the relevant terms, followed by a guide to choosing the most appropriate license. Not all of the terms are exact, but they should be understandable and that’s what’s most important.
Important: Because of the legal consequences of a misunderstanding, it is important to keep things simple by minimizing the number of licenses in use in the wild. This page lists the most popular license for each scenario you might find yourself in and choosing an alternative to the licenses here is strongly discouraged.
Terms
- Derivative vs. Aggregate
- The law makes a distinction between “derivative” works like modifying an icon, forking a project, or linking against a shared library and “aggregate” works like zip files and DVDs full of things.
- That means that you can put two things with incompatible licenses in the same zip file or on the same DVD because that’s “aggregation”. This is a popular way to freely release a game’s engine for any use but restrict the game’s resources (level files, graphics, music, etc.) so only the original creator can sell them.
- Licenses can set terms on aggregation, but generally that only happens in the kind you find in commercial software. For example, you’re not allowed to put Flash on a Linux CD. End users have to individually download it from Adobe’s site. (though that process can be automated by Linux package managers)
- Free Software
- The term “open source” is a fairly weak term and doesn’t encompass all of the freedoms we’ve come to expect in popular licenses. “Free software” is the older, more strict (but less popular) term coined by Richard Stallman to talk about licenses which explicitly grant these freedoms.
- It is variously referred to by the terms FOSS, FLOSS, Free/Libre Software, and various others because English doesn’t have a word specifically meaning “free as in freedom”. (“Libre” is French, from the same Latin root as “Liberty”)
- Copyleft and ShareAlike
- A “copyleft” or “ShareAlike” license is a license which requires you to give others the same rights you received… so if you have access to the source code, you must give others access to the source for any modified versions you make.
- Copyleft and “Distribution”
- With one exception (The Affero GPL), copyleft licenses like the GNU GPL only require you to share your source if you share something built from it. Keep the binaries to yourself, and you have no obligation to share your changes.
- For this reason, requiring end users to click “agree” in an installer is meaningless. Free Software licenses aren’t EULAs.
- “Creative Commons License”
- The term “Creative Commons License” is practically meaningless in and of itself, much like a “you must be human to ride” sign at an amusement park. The term refers to a large family of licenses with various properties and using the term without being more specific only makes things worse by spreading the misconception that it’s OK.
- License Incompatibility
- When two licenses require conflicting things, they’re said to be incompatible.
- For example, the GNU GPL forbids people from imposing additional restrictions down the line and requires that derivative works also be GPLed. The license for Douglas Crockford’s JSMin contains a line that says “The Software shall be used for Good, not Evil.” (An admirable sentiment, but dangerously ambiguous) Because that counts as an additional restriction, you can’t use GPLed code and code from JSMin in the same program.
- Dual/Triple-License
- When a piece of software is “dual-licensed” or “triple-licensed”, it means that its creators have granted you permission to use it under your choice of two or more licenses.
- While this is a perfectly acceptable option, it generally makes things more complicated and combinations like BSD/GPL should be avoided since, if you’re willing to license under BSD, you’re already GPL-compatible.
Licenses for Code
License | Compatible with… | Use when… |
---|---|---|
MIT or 2-clause BSD | Everything | You just want credit for your work. Others can use it however they want. (Also a good alternative to public domain. Not all countries recognize the right to give up your copyright.) |
CC-BY 3.0 | Everything | You want MIT/BSD-like terms, but with a pretty icon and some RDFa metadata to embed. |
Apache 2.0 | CC-BY, MPL 1.1+, LGPL 3.0+, GPL 3.0+, AGPL 3.0+ | You don’t mind being incompatible with “GPL 2.0 only” libraries and you want BSD-like terms, but with clearer legal language and an explicit patent grant. |
MPL 2.0 | Apache, GPL 2.0+, LGPL 2.1+, AGPL 3.0+ | You want to copyleft-protect changes on a file-by-file basis but you don’t care what happens to the program as a whole. |
LGPL 2.1+ | LGPL 2.1+, GPL 2.0+, AGPL 3.0+ | You want modifications to your library to be copyleft but use in closed-source programs is fine and you want to stay compatible with projects that removed the “or later” line from their LGPL declarations. |
LGPL 3.0+ | LGPL 3.0+, GPL 3.0+, AGPL 3.0+ | You want modifications to your library to be copyleft but use in closed-source programs is fine and you want an explicit patent grant on contributed code. |
GPL 2.0+ | GPL 2.0+, AGPL 2.0+ | You want project-level copyleft licensing while staying compatible with projects that removed the “or later” line from their GPL declarations. |
GPL 3.0+ | GPL 3.0+, AGPL 3.0+ | You want project-level copyleft licensing with an explicit patent grant and the option to forbid companies from using your software on devices which control upgrades with DRM. |
Affero GPL 3.0+ | Itself only | You want websites using your code to share their changes… assuming any are willing to use your code in the first place. |
There are also various community licenses like the Python Software Foundation license and the Artistic License which you might want to use to follow community conventions.
When you are unsure about what a community-specific license entails, convention for large, popular communities is usually safe to follow. If in doubt, either dual-license between the community recommendation and one of the licenses listed here or pick one from this list that’s permissive enough to be compatible with the community preference.
Important:Unless you really know what you’re doing, don’t remove the “or any later version” clauses from GPL-family license declarations. If unsure, keep in mind that 3.0-series GPL-family licenses do allow you to specify a person responsible for making that judgement call on behalf of all contributors at a later date.
Licenses for Resources
As long as you’re not embedding them in your .exe
files, your images (eg. icons), sounds, and so on don’t have to share the same license as your code. In fact, it’s better they don’t because someone might want to produce a derivative work and copyleft code licenses are incompatible with copyleft non-code licenses. (You can’t combine a GPLed image and a CC-BY-SA image into a new poster, for example)
License | Compatible with… | Use when… |
---|---|---|
CC-BY 3.0 | Everything | You just want credit for your work. You can specify how people must credit you, but remember that you’re competing with the world and don’t get too greedy. |
CC-BY-SA 3.0 | Itself only | You want CC-BY’s attribution provisions, but you also want people to have to share derivative works under the same terms. (This is the recommended way to scare off predatory commercial use) |
Important: The NoDerivs and NonCommercial variants of Creative Commons licenses are not included here because they have non-intuitive consequences, don’t achieve what is generally intended, and their incompatibility with the popular CC-BY-SA variant makes them a deal-breaker for many potential users/fans.
Open-Source Licensing For The Lay Programmer by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution under the same terms as the associated post.
All comments are moderated. If your comment is generic enough to apply to any post, it will be assumed to be spam. Borderline comments will have their URL field erased before being approved.