Once you’ve written your Shiny app, you can distribute it for others to run on their own computers—they can download and run Shiny apps with a single R command. This requires that they have R and Shiny installed on their computers.
If you want your Shiny app to be accessible over the web, so that users only need a web browser, see
Here are some ways to deliver Shiny apps to run locally:
One easy way is to put your code on gist.github.com, a code pasteboard service from GitHub. Both server.R and ui.R must be included in the same gist, and you must use their proper filenames. See https://gist.github.com/jcheng5/3239667 for an example.
Your recipient must have R and the Shiny package installed, and then running the app is as easy as entering the following command:
In place of
'3239667' you will use your gist’s ID; or, you can use the entire URL of the gist (e.g.
If your project is stored in a git repository on GitHub, then others can download and run your app directly. An example repository is at https://github.com/rstudio/shiny_example. The following command will download and run the application:
In this example, the GitHub account is
'rstudio' and the repository is
'shiny_example'; you will need to replace them with your account and repository name.
If you store a zip or tar file of your project on a web or FTP server, users can download and run it with a command like this:
The URL in this case is a zip file that happens to be stored on GitHub; replace it with the URL to your zip file.
Another way is to simply zip up your project directory and send it to your recipient(s), where they can unzip the file and run it the same way you do (
If your Shiny app is useful to a broader audience, it might be worth the effort to turn it into an R package. Put your Shiny application directory under the package’s
inst directory, then create and export a function that contains something like this:
appdir is the name of your app’s subdirectory in
packagename is the name of your package.
We love it when R users help each other, but RStudio does not monitor or answer the comments in this thread. If you'd like to get specific help, we recommend the Shiny Discussion Forum for in depth discussion of Shiny related questions and How to get help for a list of the best ways to get help with R code.comments powered by Disqus