-
Notifications
You must be signed in to change notification settings - Fork 291
Shiny Server Introduction
When you're ready to share your Shiny application with others, you'll want it to be housed inside of Shiny Server to give others a way to access it. You can download and install Shiny Server inside your organization so your Shiny app (and whatever data it needs) never have to leave your control.
Shiny Server is the simplest way for data scientists and R users to share their work with colleagues in a controlled environment. Shiny Server allows you to host the Shiny applications you create in a way that allows other users to access and interact with them, even on older web browsers like Internet Explorer 8 and 9. Each application can be configured to be available at its own URL and will be automatically started when it's accessed, and stopped when it's not in use. You can configure Shiny Server to be available only to those within your organization, or to users across the Internet.
You can use the Community Edition of Shiny Server to begin hosting your Shiny applications, or you can leverage Shiny Server Professional to scale your applications to a broader audience, restrict access to particular applications, or control the resources consumed by your Shiny applications. You can see a full breakdown of the differences between the two editions here; we'll discuss the features of both editions of Shiny Server in this article. We hope to highlight some features of Shiny Server here, but for a full discussion on how to manage and configure your server, please see the official Admin Guide.
Shiny Server runs on a variety on Linux distributions. If you're not comfortable with Linux or would prefer to have someone else manage the server on which your Shiny applications are hosted, check out ShinyApps.io to learn about hosting your applications in an environment that is managed and maintained for you. ShinyApps.io allows you to tap into some of the features only available in Shiny Server Professional in a pay-as-you-go model that is more approachable for some organizations.
Shiny Server Professional offers a variety of nice features that build on top of the open source Shiny Server including:
- A dashboard to help understand the activity on your server (as shown below)
- The ability to secure your Shiny applications using SSL (HTTPS)
- The ability to control which users are allowed to access which applications
- Priority support from RStudio
- Controls to fine-tune resource consumption per Shiny application
Below we'll demonstrate a few examples of using Shiny Server to make your Shiny applications available in different ways.
(See this page for a complete step-by-step walkthrough of this example.)
Shiny Server allows you to host a directory full of Shiny applications and other web assets (HTML files, CSS files, etc.) using the site_dir
configuration. By default, Shiny Server will use a site_dir
to make any applications and assets stored in /srv/shiny-server/
available. You can begin placing Shiny applications inside this directory then referencing them on your server. For instance, a Shiny application stored in /srv/shiny-server/myApp
would be available at http://myserver.org:3838/myApp
, (where myserver.org
is the name of your server) by default. You could also place HTML files in this directory to make them available on your server, as well.
(See this page for a complete step-by-step walkthrough of this example.)
In some cases, it may be desirable to allow users on a system to manage and update their own Shiny applications stored in their home directories; the user_apps
configuration allows you to do just that. Shiny Applications hosted inside users' ShinyApps
directory will be available online. For instance, a user who stored a Shiny application in /home/kim/ShinyApps/myApp
would be able to access it at http://myserver.org:3838/kim/myApp
on a server configured to use user_apps
.
(See this page for a complete step-by-step walkthrough of this example.)
Shiny Server Professional supports various forms of user authentication which can be used to require your users to login before being able to access particular Shiny applications on your server.
You can even change the appearance of the login page using the template_dir
configuration to make your login page look something like this:
(Inspired by Thibaut Courouble and Orman Clark.)
Or this:
(Inspired by Ionut Zamfir.)
To recap, Shiny Server is a useful way to share your Shiny applications. It lets you
- Automatically start and stop your applications as needed on a Linux server
- Provide a unique URL for each application
- Restrict access to particular applications, if using Shiny Server Professional
If you have any questions or would like more information, please visit http://www.rstudio.com/shiny/server/ or email us at mailto:sales@rstudio.com.