The Open Source Fundamentals

Licensing

I agree

What is licensing?

There is a lot of confusion about what exactly licensing means. When you license your work, you’re not giving away any of your rights. You still hold the original copyright (or patent if you have one) on that work. By releasing into the public domain, you relinquish any copyright, and no one is obligated to list you as the original author or contributor. In the latter case, you may end up spending more time dealing with individual permissions than designing or developing.

Open source licenses make it easy for others to contribute to a project without having to seek special permission. It also protects you as the original creator, making sure you at least get some credit for your contributions. It also helps to prevent others from claiming your work as their own.

Making your code available as open source involves much more than just indicating on the project web page that the code is licensed under a particular open source license. Not only do you need to provide a way for people to download and/or contribute to the project, but you also need to choose the most appropriate license and address other legal requirements.

Choosing a license

The license defines the responsibilities placed on third parties wishing to modify and/or reuse open source software within their own products, so choosing the right license is key to ensuring that the project owner is able to sustain the project in whichever way they choose. The first thing I recommend is to use only licences that have been approved by the Open Source Initiative (OSI). There are many good reasons for this, but perhaps the most convincing is that sticking with an OSI licence makes it much more likely that potential users and contributors will understand your license terms already.

There are a lot of licenses available out there, check them out to see which one is the best for your project, or you can use choosealicense.com to do it easily.

Reading

Applying the license

Once you have chosen the license you wish to use and confirmed that you are legally entitled to license all the code in your project, you must apply the license so that people can see it. It is not sufficient to simply state that your code is available under a specified license; you also need to ensure that it is prominently displayed in all appropriate locations. At a minimum you must:

  • State on your website which licence is applied (preferably on your home page and your downloads page)
  • Provide the full text of the license on your website
  • Provide the full text of the license in the root directory of your source project (usually in a file called LICENSE.TXT)
  • Provide a boilerplate notice in the head of each file in the source distribution (The boilerplate text used varies from license to license. You will usually find further discussion on how to apply a license documented alongside the licence in its original home.)
  • Provide the full text of the license in the root directory of your non-source project distributions (usually in a file called LICENSE.TXT).