I know that you can commercialize GPL'ed software by selling it under the condition that you distribute the source code with the sold product.

I'm now thinking about the case where you don't sell a hardcopy of the code, but a license that allows you to use the code for, say, a year. Is this model compatible with the GPL at all? I'm thinking that with the GPL'ed source code available the user could simply remove all license checks in the software and use it for free from there. Is this correct or is there a (legal) way to say "You can use it, but only for a certain amount of time"?

3 Answers 3


You can do that. But - as you conclude yourself - it is also everyone's right to take the source, remove any license check, and distribute the version without license checks. A restriction on how long a person may use the source code is not compatible with the GPL, though.

That's exactly what rhodecode tried to introduce - and found out the hard way by having it forked after quite a bit of drama and eventually by the FSF as kallithea.

  • If you own the code then you can license it under whatever terms you want, but if you do not own the code, then no, you cannot license others to use it. At all. If they receive a copy, whether from you or from someone else, then they can use it under the terms of the GPL. If you have partial ownership in a derivative work of a GPL program then you may distribute it to others only under the terms of the GPL, which grants an unlimited license to run it, provided that they comply with the license terms. Commented Mar 25, 2022 at 22:32
  • 1
    Yes, of course. What's your point? The OP asks what others then can do with it when he releases it as GPL with license check which renders compiled code inoperative after a certain time (unless paid or similar). Commented Mar 25, 2022 at 22:37
  • 1
    They do seem to imagine adding a license check to the software, but what they asks is "I'm now thinking about the case where [...] sell a [...] license that [is time-limited]". The question is explicitly about relicensing the code under a non-GPL license. Commented Mar 25, 2022 at 22:40

I'm now thinking about the case where you don't sell a hardcopy the code, but a license that allows you to use the code for, say, a year. Is this model compatible with the GPL at all?

No. You can sell media or distribution services around GPL software, or copies of the software, provided that you comply with your own obligations under the GPL that attend such activity. These include, but are not limited to, providing access to the source code. But you are talking about relicensing a GPL program, and you cannot do that unless the code belongs to you in the first place, or you have been granted that right by the owner.

If the code belonged to you then the question would be moot, because you could just offer a non-GPL license, so I'm supposing that it does not belong to you. Many GPL projects grant the right to relicense under a newer version of the GPL, but no GPL-licensed software I have ever seen grants the kind of right you would need for relicensing in the manner you propose. That brings us back to "no".

You did specifically ask about licensing, but perhaps you had in mind instead to build and distribute derivative programs to which you have added time-based lockouts. As derivatives of GPL programs, these would need to be distributed under the GPL, and that would obligate you to provide source. As such, yes, people who wanted to do so could remove the lockouts. But since we're assuming that the original code is not yours in the first place, others could also just bypass you to get pristine code from the upstream source.

  • 1
    Thanks for your insight! The code is in fact mine, but it links against GPL-licensed code which is why my code is published under GPL as well. Perhaps that's a point worth including in your detailed and helpful analysis. Commented Mar 26, 2022 at 1:40
  • 4
    @NicoSchlömer, then the code is not wholly yours, in that you do not have full, unencumbered rights to it. For the purposes of your situation and this answer, that's the same as "not yours". Whatever technological measures you might put in the code to help you enforce limited-term usage are a separate matter from the fact that you violate your own obligations under the GPL by distributing the software under non-GPL terms (and yes, limited-term licensing is not consistent with the GPL). Commented Mar 26, 2022 at 16:50
  • John, thanks again for the comment. It's clearer to me now. The code is under the GPL, and nothing else, and since the GPL grants the user (quote) unlimited permission to run the unmodified Program (quote end), that's that. Commented Mar 26, 2022 at 17:59
  • Yes, @NicoSchlömer, that sums it up. Commented Mar 26, 2022 at 18:05

You cannot do what you have suggested in the question, because you cannot relicense GPL-licensed code and take away one of the freedoms (perpetual/irrevocable license) granted by GPL and replace it by an expiring license. In fact, by trying to re-license the code in the wrong way, you would lose your own rights under GPL to use the upstream libraries linked in your software (GPLv2 Section 4; or GPLv3 Section 8).

There are several ways to monetize OSS but they are a bit more complex than your proposal.

Monetizing OSS always depends on providing something in addition to what the recipients already have (recipient already has the source code, the perpetual license, the rights to modify and distribute).

In the early days of OSS there was no internet. People were lacking basic access to software. You would have to use your modem and your POTS telephone line to connect to a BBS to download software at incredibly slow speeds (2400 to 56.6k bps). Some of you might remember. In these times it was valuable to be able to buy OSS on CDROM, and I think quite a few computer magazines only survived in those times by adding a new CDROM to their printed magazines each month. A fair OSS business model.

Nowadays in large parts of the world, internet access is not a problem, thus the distribution business largely went away. The a common way to make money with OSS today are hosting (SaaS solutions), customization, service and support, and freemium offerings.

There are countless SaaS solutions on the market building on OSS, for example ElasticSearch or OpenStack, and the market is growing with the surge of cloud solutions. So the customers' needs you are fulfilling (for money) is the need for hosting the solution and its maintenance.

In other areas, web hosters are providing WordPress as part of their hosting offerings. The customer pays for a smoothly running managed solution which is always being kept up to date.

With code customizations you tailor OSS to fulfill the exact needs of one (or a few) customers. For example that could be a database connector for a special client database or a tool to analyze data. You would be paid for your development work, timely bug fixes, further modifications, etc. Actually your customer might not even care if the solution is closed or open source (they just want a reliable solution), as they would anyhow not distribute it (it would just aid their competitors). In addition you could offer a help-line via phone or chat. Payment for this 'maintenance, service and support' could be effort-based (by the hour), time-based (monthly fee), user-number-based (number of seats or pay-per-use) or any other useful metric.

A very common way to make money with OSS is freemium solutions, which usually consist of a core of functionality that is based on OSS, and a set of advanced features, which is closed source and only available for money. There are a number of variations of the model, where the free and the paid solution are two separate executables or one solution (with the use of a license key), or where a limited number of software runs (e.g. 5) per month are with all features and if you want more (i.e. 6 or more) you have to pay.

All of the above works in full compliance with the open source licenses. You would be delivering the source code at no cost. The customer has the right to modify (but their own development teams might have too much overhead or cannot be deployed quickly). The customer has the right to distribute (but refrains from that because the solution might include some of their own trade secrets). You just have to identify and provide the added value for which the customer is willing to pay.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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