Share this page:

Publish Open Code Under a Suitable Licence

Publicly shared software is only truly Open Source if it is accompanied by a suitable licence. If you want to release your code without any restrictions, you can publish it as public domain. Before publishing, you should be clear about the legal conditions under which you are releasing the code. With a suitable licence, you define what others are allowed to do with your code.

There are numerous open or free licences. The list of OSI-approved licences or the GNU list of free licences can serve as a first point of reference. The page Choose a licence also offers a good introduction to the topic of licensing Open Source software projects.

The following tools will help you to choose the right Open Source licence:

If you want to reuse code or software from others and republish it after adaptations have been made, you must ensure that you choose a licence that is legally compatible with the original licence or licences and that the licences are also compatible with each other.

Seek legal advice in such complex cases.

 

Proceed as follows to select/publish the licence:

  1. Select the appropriate licence for you and your project.
  2. If necessary, clarify with contributors, supervisors or employers whether they agree with the selected licence.
  3. Prepare the code accordingly: The simplest option is to attach a licence file, for example in the repository, and name the copyright holders.

Most people place their licence text in a file called LICENSE.txt (or LICENSE.md or LICENSE.rst) in the root directory of the repository. For example, the README file of a project can be labelled “This project is licensed under the terms of the MIT license”. Also include the name(s) of the author(s) and the year of publication in the file.

 

Tip: