I have seen numerous licenses for any kind of software such as the GNU GPL, BSD License, MIT License, and LGPL. What is the process for creating a new software license, such as "John Doe's generic license"?

  • 8
    @Nick. You can write your own. But the probability that you will get what you actually wanted specified in the license is slim to non existent (unless you are a lawyer). Legal language is non trivial and complex and lawyers also have experience in the loop-holes (sorry specific conditions) that have held up/failed in court previously. All the licenses you mentioned have been carefully crafted by teams of experienced lawyers (even if the first versions were not). Oct 24, 2012 at 20:34
  • 4
    Only advise I can give is don't take legal advise from programmers.....
    – mattnz
    Oct 25, 2012 at 2:21
  • 3
    This is a great question. Shame it's considered off topic.
    – Jeroen
    Oct 29, 2012 at 19:19
  • 1
    @MartinYork Legal language is not some sort of special language. In English, they use English for contracts. Are there words not commonly used when you go to starbucks that appear in contracts? Sure, but that's true for gas station "jargon". Still, you can go to starbucks and ask them to fill a large handheld reservoir with simple black energy fuel up to 3.5$ (assuming that's the price for a large coffee), and you'll be perfectly understood, without using "coffee jargon"
    – Andrei
    Oct 30, 2018 at 9:47
  • 1
    @Andrei I would disagree. Legal language is a subset of the English Language. English can be very imprecise. So Legal language in contracts tend to use words with very specific meaning to make sure there is no ambiguity. As such it is a good idea to get an expert in writing in the correct style. Oct 30, 2018 at 17:09

5 Answers 5

  1. Open an editor.
  2. Write terms of license.
  3. Save file.
  4. Include in project.

Generally speaking, that's all there is to it. Seriously.

Don't believe me? Check out Phil Sturgeon's Don't Be A Dick license (as well as the WTFPL that inspired it).

That said, it's hit or miss whether software licenses are legally enforceable, even if a lawyer wrote them (at least in the US, and it depends almost entirely on the whim of the judge or ruling copyright authority). More generally, though, as the software author, you are already covered by your country's copyright laws (assuming you've taken the steps for your work to be copyrighted; in the US, that's simply actually making the work).

It boils down to what you want to accomplish with your license, above and beyond (or in lieu of) copyright laws. In the case of such licenses like Phil's DBaD license, it's largely a matter of the honor principle and mutual respect of one another.

If you want it to be legally enforceable (or at least have a chance of doing so), such as releasing a closed-sourced product, then you'll very likely want to talk to a lawyer. That way, you can make sure there aren't any glaring loopholes and can have it written in such a way that a judge/ruling party is more likely to rule in your favor in the event that someone does violate it.

EllisLab (the company behind CodeIgniter) has a great explanation of software licensing (and entire week of blogs on the matter, in fact), both from a legal standpoint, and from the standpoint of a FLOSS developer and the honor principle I mentioned above.

(Disclaimer: I'm not a lawyer, this isn't legally binding advice, blah, blah, blah. I'm just a developer who's had to tip-toe around the legal minefield that is software development and licensing. When in doubt, talk to someone who actually is a lawyer, ideally with a copyright, patent, and/or licensing focus.)

  • 1
    +1 for answering the actual question then providing the correct course of action Oct 24, 2012 at 20:38
  • 1
    I like the "Don't be a Dick" license. It's even better than the WTFPL. Oct 24, 2012 at 20:56
  • 1
    It might worth noting that “Don’t be a Dick License” is by no means a free / libre / ‘open source’ one. Dec 31, 2014 at 0:57

Answer the following questions for the user of your software:

  1. Is your product open-source, i.e. can I get a copy of the source code?

    • How can I use your source code? Can I freely copy it into my own applications, or do I have to link to your binary? If I use your code in my own application, is there a limit to how much of your code I can use? Do I have to include your license or attribution header at the top of any source files I redistribute that contain your code, or in the Help/About box of my binary?
  2. What can I do with your product? Can I use it one one computer? Can I use it on more than one computer? Can I redistribute it or resell it?

  3. If I use your product as part of another application I write, do I have to be open-source also?

  4. How do you warranty your product? Are you legally liable if I have problems?

  5. What are your redistribution terms? Can I redistribute your product as part of a product I write? If you provide source, can I modify your library and redistribute the modifications, and if so, what conditions do I have to meet?

Study other licenses, and see how they have answered these questions.


It is actually surprisingly similar to what developers do:

You give a lawyer (or the legal department in a large corp) a list of requirements for what the license permits and what it does not permit (e.g. the license is for one user only, it's temporary, you cannot use the software for some purposes, etc.) and they "translate" this into lawyer-speak, pretty much like we translate requirements into code.

For example, "the license is for one user only" is usually translated into the something similar to this: "FooCorp Inc. grants you a single, non-exclusive, non-transferable license to install and use FooSoftware for ...".

You might think this doesn't apply to F/OSS licenses, but it's more or less the same, except the requirements are different: you can find the simplest version of these requirements at http://opensource.org/docs/OSD.

But the lawyer part is essential and there's no point in trying to write a license by yourself (unless you're a lawyer with a lot of experience in IP-related and international law). Someone will just find a convenient loophole, which will allow him to use your product in a way he pleases (I'd go as far to compare this to exploits).

Of course I do not claim this explanation to be complete or even correct, but it's a rough sketch of the process, as far as software developers are involved (therefore I compare it to a programmer's work).

  • So it's basically a lawyer-orientated job?
    – user61465
    Oct 24, 2012 at 20:21
  • 1
    @Nick Certainly, programmers shouldn't generally tread there.
    – K.Steff
    Oct 24, 2012 at 20:25

To answer your question, anyone can write a license - and it shows!

Those of us who use software to build things and actually try to respect each license are ready to gouge our own eyeballs out with a hot poker every time someone talks about making new one. There are already an uncountable number of software licenses in the world. 99% of them are a near duplicates of existing, more popular licenses, except not as well thought out.

One site I contribute to has a home-grown creative-commons non-commercial attribution type license, except it says nothing about derivative works. Are they allowed? Can they be distributed under the same license? Beats me!

If other people contribute to a project and you ever want or need to change the license, you need to get them all to agree to change the license, or you are more-or-less stuck with it forever. Some of them might become unreachable or even die. I am not a lawyer, but if you don't have a signed contributor agreement from everyone that lets you make decisions about your license, I think you are SOL.

It's really hard to write a good license. Even the best software licenses are full of holes. There are new versions of the Apache and GPL licenses periodically. Please, see if you can find a license which meets 90% of your needs and use it. The GPL Linking Exception or "Classpath Exception" is a great example of this. I'm a little worried about the statement the Hibernate people had on their site a few years, basically publicly mis-interpreting the GPLv2 to make it sound like it included the Classpath Exception. Is that the classpath exception? We won't know unless someone sues them.

It seems to me that getting sued is the most painful way to debug your license. If you use a license that people have sued-over already, there is a certain assurance that it works, and also a sense of how it works. Better yet, pick a license that has been to court in different countries. Did you think about how your license would be interpreted in other parts of the world?

If you base your license off an existing one, then people who care about fulfilling the terms of your license might not have to study it for years to figure out exactly what it means.

If at all possible, I would encourage you to devote your energies and talents to improving an existing license rather than writing a new one.

Sorry to be such a kill-joy. If I'm bitter, it's because I really read and try to respect people's licenses before I use their works.


Write down the terms, publish it with your software. That's it.

One question, however, is why do you want to? It is not unlikely that whatever conditions you wish to add are already present in another commonly-used licence.

This adds a preliminary step - check whether you actually have to create a licence.

It is also likely that some of the conditions you wish to enforce are flawed in some way; adding another preliminary step - read around about the "unique" terms you want to apply. Someone else is likely to have tried such terms, and found them unenforceable, or counterproductive in some way.