If I extend software under the GPL licence, I understand that my source code must be freely available. If my source code is freely available can I legally charge a fee for using the version that I publish?

My situation: I'm using data from a program in my program and have an In-App purchase for access to all the data. The source code is publicly available and is mentioned in the program. Is this allowed?

Obviously my software isn't extremely popular and I'm banking on the fact that lots of people have no interest in downloading and compiling it themselves.

I have read Can I use GPL software in a commercial application which discusses in detail, whether or not my software would have to be under the GPL, but it does not discuss money!

  • 1
    For several old games the source code was published under GPL (e.g. several ID software titles) but users need to buy the game to obtain the assets required to actually play the game. – CodesInChaos Jan 15 '16 at 9:54
  • 3
    Mabe you should post this on opensource.stackexchange.com – Brandin Jan 15 '16 at 10:23
  • What kind of software, and what is the (kind of) data it is using? Can your program run with some other (perhaps fake) data? Your customer is permitted, by GPL, to redistribute -freely- an improved version of the source code under GPL license – Basile Starynkevitch Jan 15 '16 at 13:20
  • Also your customer is permitted to redistribute a compiled binary with the source code – Basile Starynkevitch Jan 15 '16 at 13:27
  • 2
    This is confusing because one moment you are talking about code, and the other about data. Which is it? – RemcoGerlich Jan 15 '16 at 13:29

You can charge a fee for software covered by the GNU GPL. It's totally fine. The GNU project encourages you to charge what you can. GNU's "Free Software" philosophy is "about freedom, not price".

If you provide binaries to a customer, you also must provide source (or access to source). You don't have to provide the source to non-customers. You do have to make it just as easy to access the source as the binary -- for example, you can't charge an extra fee for the source.

You suspect that most of your customers won't be interested in exercising the rights that the GNU GPL gives them, and that's a fair assumption -- many people on this site use GPL'd software every day but a much smaller number modify or distribute it. The GNU GPL does say that if a customer wants to exercise their rights, you can't get in the way.

So it's quite likely that a tiny few will make use of the source code, and fewer still will distribute that code to others. But the GPL allows them to distribute it, and they can charge fees for distributing it or they can distribute it publicly without charge. As long as they follow the GPL distribution rules, you can't stop them. As you say, it's not super-likely to happen, and you are of course welcome to ask them not to do that.

From the GPL FAQ:

Does the GPL allow me to sell copies of the program for money?

Yes, the GPL allows everyone to do this. The right to sell copies is part of the definition of free software. Except in one special situation, there is no limit on what price you can charge. (The one exception is the required written offer to provide source code that must accompany binary-only release.)

Also from the GPL FAQ:

If I distribute GPL'd software for a fee, am I required to also make it available to the public without a charge?

No. However, if someone pays your fee and gets a copy, the GPL gives them the freedom to release it to the public, with or without a fee. For example, someone could pay your fee, and then put her copy on a web site for the general public.

  • 2
    "You don't have to provide the source to non-customers." Maybe yes, maybe no. If you give the source to your customer with the binaries, then no. But if you provide a download site for the source, it must be open-access. And if you take the (extremely rare) option of providing a redeemable offer of source, you have to honor any requests from folks that your customers pass the offer along to. – Ross Patterson Jan 17 '16 at 3:45

The GPL license does not forbid you to ask money for obtaining your program.

However, when using the GPL, there is usually not much sense in asking money, because users of your program must have the right to re-distribute the program either in its original form or after making changes to it.
Due to this, once you have sold your first copy, you have a potential competitor who can charge a fraction of the price you sell for (down to not asking any money). For that reason, GPL programs are usually available free of charge.

  • 1
    Correct. Perhaps the OP also gives (i.e. resells) some required data under a non-free license. – Basile Starynkevitch Jan 15 '16 at 13:28
  • 1
    Or you can write software that is complicated to administrate and install so you can sell support. – Tulains Córdova Jan 15 '16 at 13:29

I am not a lawyer, this is my understanding of the situation but it is not legal advice. If you want that pay a lawyer. I'm also basing this on GPLv2, the principles are mostly the same in GPLv3 but there may be differences in the details.

I understand that my source code must be freely available.

Not exactly, basically you must either provide the source along with the binaries[1] or provide a written offer valid for at least 3 years to provide the source to anyone on "a medium customarily used for software interchange" for "a charge no more than your cost of physically performing source distribution". If you distribute the source along with the binaries there is no requirement for you to directly make it available to the general public (but there is also nothing stopping anyone you provide it to from making it available to the general public)

If my source code is freely available can I legally charge a fee for using the version that I publish?

The GPL does not in general forbid charging money for stuff. As far as I can tell there would be nothing stopping you implementing in a GPL application a lockout that required for example date and machine ID based license codes. There would also be nothing stopping someone getting the source code and ripping your lockout code out.

My situation: I'm using data from a program in my program and have an In-App purchase for access to all the data.

Data that can be loaded by an program (but is not actually built-in to the programs binaries) is not considered part of the program. So it's perfectly fine to use non-free data with a GPL application. I would not think that making the data available via an in-app purchase would change anything in this regard.

Whether you can control distribution of the data depends on the type of data, local laws and whether you actually own the data in the first place. In some countries some types of data are not eligable for copyright and similar protection.

The source code is publicly available and is mentioned in the program.

That may not strictly speaking be enough (though in practice if people can reasonablly get the source code they are unlikely to be too picky on the details).

[1] "If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. "


You can charge any amount that you like for the software.

You can charge your cost for providing the source code for the software.

You may not charge any money for the license to the software.

If you always give people the software together with the source code, then you have no other obligations towards anyone. The same happens when the source code is available at some commercial site, where you can just refer anyone to that commercial site. But if you provide software that is for example modified by you, or not available on a commercial site, without providing the source code, then you must provide the software to anybody who asks for it. That makes it kind of difficult to charge large amounts for the software and find any takers.

And since anyone who received the software with source code from you has the right to pass it on for free (or for half what you charge), that also makes it hard to charge huge amounts.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.