A guide on how to choose an open-source LICENSE
At the beginning of any open-source project, we must choose a LICENSE; otherwise, technically it is not open-source code. Your code is your creative work (like art or music), so if someone copies your work, it can be considered stealing. An open-source LICENSE gives others permission to use your code. Choosing a licence is very important as it will dictate how contributions are made and the restrictions around redistribution and usage; hence the type of community around the project. The following is a quick guide to choosing a LICENSE.
1 Understand why you want to open-source your project
Yes, we know open source is good, but sometimes we forget why we are doing it in the first place and there are many reasons to open source a project. Here are just some:
- Give back to the world
- Create trust
- Ensure uptake
- Create a community
- Disrupt Market
- Promote brand
When choosing a license, you need to consider the rules (top section) and the warranty disclaimer (bottom ALL CAPS section) in context of the above reasons.
2 What don’t we want “bad actors” to do with the code? Can it be prevented?
Some licences grant the ability to modify copies of the source code without restriction. Others have rules around crediting the original contributors or publishing modifications. These type of rules, along with Brand, trademark and/or ip, can help deter bad actors from misuse.
3 Check what LICENSEs already exist or will be used in your codebase
No doubt, you will be using external libraries in your project. Depending on what LICENSE they use, you may have to adjust your LICENSE OR what libraries you use. There are 3 types of LICENSE: strong copyleft, weak copyleft or permissive.
Strong Copyleft: Code must be published if used Weak Copyleft: Code must be published only if the source-code has been modified Permissive: Free to use however you wish
4 Check the terms of service of where your software is hosted
There may be some rules that you may want to consider when choosing a platform to host rour code. For instance, GitHub requires its users to allow forking.
5 Do you want derivatives, additions and distributions to use the same licence?
Yes, copyleft. No, permissive.
6 (If copyleft) Can others use your software in their own proprietary software?
Yes, weak copyleft. No strong copyleft.
7 Consider these guidelines:
- Use a licence that has been approved by the OSI
- Read and understand the licence
- Do not change the licence once released
Some popular OSI-Approved license:
- Strong-copyleft: GPL, Eclipse
- Weak-copyleft: LGPL, Mozilla Public Licence 2.0
- Permissive: MIT Apache 2.0