I'd like to open source a project of mine under GPL v3. Additionally, I'd like to sell a license for those who wish to use the code in a proprietary application.

How do I go about releasing my source code under GPL v3, while also reserving the right to release it under another license of my choosing? Do I still put the GPL header at the top of each of my source files?

I'm rather new to the legal side of software.

  • 6
    I do believe that it's a question for a lawyer. Not stackoverflow. But, if you own the copyright to your code, you have the option to license it to anybody, in any way you like. Releasing it under GPL 3 does not mean forfeiting your copyright, it just means permitting anyone to use your code under GPL 3's restrictions. You can license it to anybody else with less restrictions in your own terms. – cyco130 Oct 18 '11 at 14:59
  • 2
    @cyco130 if you posted your comment as an answer, I would upvote it as hard as I possibly can. – Malachi Oct 18 '11 at 16:03

You don't need to put a GPL header in the source - you don't need to do anything. Although a copyright notice of your name and date in the file is useful and may be required in some areas.

I would probably include your name/email/website in the header and a note saying "see licence.txt for terms" then you don't have to worry about having different source files for GPL/Commercial.

The GPL is a distribution licence, when you distribute a copy of your project under GPL you include the GPL text file (and make the source available). When you distribute it yourself you include whatever commercial license file you wish.

The only complexity is if you accept fixes from GPL users - they own those fixes and you can only distribute them under GPL. Unless you can get the authors to assign the copyright to you.

  • I had this confusion too, as the GPL site makes it seem like you have to add a header to all source files. – KallDrexx Oct 18 '11 at 16:28
  • 2
    @KallDrex - the GPL can't tell you what to do with code you own. It's certainly a good idea since source files get separated from the distribtion package and in some countries it gives you a stronger copyright case if you explicitly state it - but you own your work and the GPL licence does nothing to changes that. – Martin Beckett Oct 18 '11 at 16:31
  • 2
    No I got that after doing my research, but the GPL documentation pages (not the GPL license itself) make it seem like you have to mark all pages with the GPL license, and it takes some additional research to realize that's not the case. It's not obvious if you have never dealt with picking a license for your own code before. – KallDrexx Oct 18 '11 at 16:53
  • Although you should always include the copyright notice (Copyright <year> <author>) at the top of each file to make it clear that the code is copyrighted and subject to a license. That part is important. The rest of the recommended header is just for convenience. – elplatt Feb 6 '18 at 4:20
  • "...you can get the authors to assign the copyright to you". I got a pull request on a project I want to dual license, how should I request the authors to assign the copyright to me? – ilyaigpetrov Aug 1 '18 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy