Commercial Use of Shiny and R

Hi,

I realize for concrete opinions I would need to contact a software lawyer. However I’m hoping to get generic comments as I’m quite unfamiliar with the open source license for RStudio / Shiny server.

The hypothetical use case is this: I host a shiny server on a custom domain to deliver a shiny app with user authentication. I charge users to access the app.

I would only be writing R scripts and functions and not modifying the source for R, R studio, or shiny. Would I be required to provide the scripts or functions to users?

Would I need to purchase the commercial license for R Shiny Server?

4 Likes

Technically everything is open source. So you should be able to do it. But if you are trying to create an app for commerical use may be you should start looking for better alternative that can handle more traffic or something similar to python dash or flask or go revel and beego...

But I think there is another version of shiny server called shiny proxy for such use cases you should try it and please do consult lawyers.

In terms of licensing, you are not required to supply your code to users. You are also not required to buy Shiny Server Pro or RStudio Connect if you want to charge users to access your Shiny applications, but it can make your life easier in terms of handling authentication, scaling, and so on.

If scaling is an issue, I suggest taking a look at this talk by Sean Lopp about scaling Shiny: https://www.rstudio.com/resources/videos/scaling-shiny/. In the talk, he gave a live demo using a load testing tool that we've been developing, and scaled a Shiny application to 10,000 concurrent users.

5 Likes

In terms of commercial use, I would suggest doing what many other developers of Open Source software have done... give away a base layer and if the user would like "additional features", charge for these additional features. You will always have a pyramid shaped distribution of customers, from those that just want to use it and not provide your company with any funds, to a paying customer who wants additional features, to a "very dependent on your software" that pays for additional features and support. It pays to have as large a number as possible in the :free" tier so that you can have additional customers (a smaller %) fall into the "paid" tiers. I do not think you need to see a lawyer about this. When you figure out what features are in the "free" package vs. what additional features are in the "paid" packages, it may be advisable to see an attorney at this stage.

Very interesting and exciting! I have heard of others that have taken this approach with great success. As @winston mentioned, Shiny is perfectly capable of scaling to any magnitude you need. Obviously, there are best practices to learn about building multi-tenant applications along the way, but there are many of us who are happy to help there and plenty of resources to facilitate such learning!

Some of the big factors you will need to consider if you're looking to build on top of Shiny:

  • What kind of user authentication are you shooting for? How do you plan to manage user accounts?
  • How many resources for performance does a single R process / instance of the app need? How many concurrent "Shiny sessions" / users can a single R process support?
  • Do you have the expertise to configure linux virtual machines? Do you need dedicated infrastructure?

You don't need to answer all of these questions up front, and your answers may change over time. Obviously, the open source counterparts to RStudio's Pro Products (Shiny Server / RStudio Server) are welcome to be used - however, you would need to build the authentication yourself and will need to do much of the work around scaling your application.

If you're looking for a boxed way to host and scale your Shiny applications, the easiest way to get started (and maybe a good place to start your proof of concept) is shinyapps.io . This requires zero devops knowledge, since servers are maintained for you in the background. You also get user authentication (on the paid tiers) and the ability to easily scale your application to serve additional users if needed.

Shiny Server Pro / RStudio Connect will require a bit more experience with linux, since you have to set up the server yourself (on AWS, GCP, wherever). You get several kinds of authentication built in and can scale your Shiny application pretty naturally. These are software products built expressly for using Shiny in the enterprise / commercial space, and handles much of the "hard stuff" for you. Support comes with that contract - so if you get stuck, you've got access to help, too. There is also a Small Business discount and a free 45-day eval of all of our pro products, if you're trying to determine your price point, what is feasible, etc.

If you like the idea of a pro product, but don't have the linux expertise necessary, I know there are some consultants / organizations that will set it up for you, etc.

I'm sure there are other options out there, so definitely check those out! If it's a good fit, one of the big pluses of using one of RStudio's pro products is that you're ultimately funding the open source development of Shiny, the tidyverse, the IDE, etc. Our pro customers make our open source software possible!

3 Likes

I don't know the answer, and I am not sharing legal advice. But I also think there are reasons to believe one may want to consult a lawyer. What I am saying is, what I have heard informally from others makes the issue sound like one worth getting professional advice on. I myself am uncertain to what extent the following observations apply.

  1. R itself is under a GPL license (source), clicking through indicates the v2 license. I believe one of the differences between GPL2, GPL3 and Affero GPL is the treatment of services.
  2. One stated intent of GPL (and one way it differs from LGPL) is that linking against it (dynamically or statically) is intended to trigger additional licensing and distribution requirements of linked code (source). This is possibly related to the issue you were concerned about.
  3. There is a lot of ink spilled on: if or if not writing code against APIs is in law linking in the above context (example). In particular one may need to know if the thinking on "subterfuges" quoted in the Wikipedia entry on Richard Stallman is correct or not and if or if it does not apply.
  4. When running R a lot of the software is not from RStudio itself, so while RStudio can of course clarify what rights they are licensing to their product- they may not be definitive on other components (additional packages and even R itself).
3 Likes

Dear Mazarick and @Anantadinath,
To address each of your concerns. We give away 60-70% of all our engineering work as free and open source software. We support our engineering through the sale of commercial versions of our open source products which are targeting features/capabilities for enterprise deployment. These products have allowed us to make a much larger investment in the open source work as a result. If your organizations can support us through the purchase of our commercial products, it would obviously be a huge help for us. If you are a small or medium business, we have special discounts for organizations who need to run their own infrastructure, and hosted based pricing that is even more affordable at http://www.shinyapps.io/.

Thanks for all your support and suggestions.

Tareef

5 Likes

I totally agree with your point and it's very valuable. I would even suggest @perfectdark111 to buy pro version if he actually can. I would love to see Rstudio flourish and contribute open source products for the community. I was suggesting only on the basis of if he can't afford it. But you have a valid point and I would keep that in mind going further.