Shiny Server is a server program that makes Shiny applications available over the web.
- Host multiple Shiny applications, each with its own URL
- Can be configured to allow any user on the system to create and deploy their own Shiny applications
- Supports non-websocket-capable browsers, like IE8/9
- Free and open source (AGPLv3 license)
- Experimental quality. Use at your own risk!
A Linux server, with the following installed:
- Node.js 0.8.16 or later
- R 2.15 or later
Shiny R package, installed into the site-wide library. This is one easy way to do that:
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""
- Run as root (or
npm install -g shiny-server
- Optional: Create a config file (see below).
Run as root (or
# Create a system account to run Shiny apps useradd -r shiny # Create a root directory for your website mkdir -p /var/shiny-server/www # Create a directory for application logs mkdir -p /var/shiny-server/log
Next, copy your app directory to the website root, but append
.shiny to the directory name. (This is very important! If the application folder does not end with
.shiny it will be deployed as static assets, not a Shiny application!)
sudo cp -R ~/MY-APP /var/shiny-server/www/MY-APP.shiny
Finally, start Shiny Server:
Now start a web browser and point it to
http://<hostname>:3838/MY-APP/. (Notice that ".shiny" does not appear in the URL.)
If the browser is not able to connect to the server, configure your server's firewall to allow inbound TCP connections on port 3838.
To customize any of the above, or to explore the other ways Shiny Server can host Shiny apps, see the Configuration section below.
- Optionally, you can pass a custom configuration file path (see below) as a parameter. Otherwise,
/etc/shiny-server/shiny-server.confwill be assumed as the config file path.
For those UNIX systems that use the Upstart init system, such as RHEL/CentOS 6+ and Ubuntu:
- Copy config/upstart/shiny-server.conf to /etc/init/
sudo start shiny-serverto start and
sudo stop shiny-serverto stop.
sudo reload shiny-serverto re-read the config file without needing to restart the server.
The upstart script is set to start shiny-server on boot/reboot, and it will also respawn shiny-server if it goes down.
See the document Shiny Server Configuration Reference for details.
Please direct questions to the shiny-discuss group.