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!
(Ubuntu users: this wiki page lists all the commands that are needed to install the prerequisites and Shiny Server.)
You'll need a Linux server, with the following prerequisites installed:
- Node.js 0.8.16 or later
- R 2.15 or later
Shiny R package, installed into the machine-wide site library. This is one easy way to do that:
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""
Now you're ready to install Shiny Server:
- Run as root (or
npm install -g shiny-server
- Optional: Create a config file (see below)
If you don't create a configuration file, Shiny Server will use a hardcoded default config. Follow these instructions to prepare your machine to run with these default settings.
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:
sudo cp -R ~/MY-APP /var/shiny-server/www/
Finally, start Shiny Server:
Now start a web browser and point it to
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.
Running from the Command Line
- 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.
Running from Upstart
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.