I plan to make a webapp but I don't want to host it myself so if people want to use it they will have to host it themselves. The source will be on GitHub and I don't know which licence to choose.

My requirements are that people are allowed to fork and modify the app but they should make pull requests on my repo for the modifications they do, so my app gets improved (not mandatory but I'd prefer).

The main problem is that I allow people to host the app but for private use only: I don't want to see a public website featuring my app appear with a different name etc.

In other words, the code is public and people are encouraged to enhance the app (by making pull request on my repo) but they cannot make their own website using my app (I want to be the only one to have this permission, if one day I decide to host the app myself).

For example, it's like if the YouTube website was on GitHub, people can download and host locally, etc, but they cannot make a public website using the app (for example ToTube.com).

So which licence should I choose to do so?

  • 1
    The GNU AGPL license would force them to make the source code available (but not to send it to you), but no open source license could restrict them from making a public website. What you want is incompatible with the principles of Free Software and Open Source Software. Apr 24, 2019 at 12:58
  • 1
    Even if YouTube open sourced their software, trademarks could be used to prevent someone else from making their own similar service and calling it in a very similar way (such as ToTube).
    – Brandin
    Apr 24, 2019 at 13:06
  • @Jade Salina What would encourage people to enhance your app but if they wouldn't be able to use it themselves? Do you pay them salary or how would you encourage them?
    – Smart455
    Apr 24, 2019 at 15:49

1 Answer 1


This cannot be done via any free or open source license. The Free Software Foundation's Free Software Definition requires

The freedom to run the program as you wish, for any purpose (freedom 0).

and the Open Source Initiative's Open Source Definition requires

6. No Discrimination Against Fields of Endeavor

The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

Rationale: The major intention of this clause is to prohibit license traps that prevent open source from being used commercially. We want commercial users to join our community, not feel excluded from it.

So any license that disallows execution of the code for some purpose will not be among the set of licenses approved by either organization.

The traditional ways such problems have been solved by using FLOSS licenses:

  • The Affero GPL (AGPL) requires modified versions of your software that interact with users over a network must make their source code available to those users.

    • This does not force those who run modified forms of your software to offer the source code to you specifically, but only to each user of the network service. (Requiring modifications to be pushed back to some specific person is non-free, as it fails the "desert island" test. For instance, if someone living in a totalitarian state modifies your software, but their government prohibits communication with outsiders, they could not comply with your license.)
  • Online services are about the service. Attract users and material (videos, blogs, whatever your service is for) and rely on the network effect to ensure others choose your service over your competitors: you have the best stuff, so people will choose your service to contribute more great stuff in the future. For instance, for many years Reddit offered their source code under a free license, but no one ever offered a remotely competitive clone site to reddit.com. Why go to a little-known site running identical code when you could be communicating with thousands of people already on reddit.com?

    • Meanwhile, rely on trademark law to prevent a copycat site from having a confusingly similar name or branding.
  • This is the best answer. Note for the questioner - there is nothing wrong with asking people/groups to submit pull requests, give you credit, etc. but you cannot modify the license to do so.
    – ivanivan
    Apr 26, 2019 at 17:07

Your Answer

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