shiny-server

Application server for the Shiny web framework for R

npm install shiny-server
1 downloads in the last day
29 downloads in the last week
133 downloads in the last month

Shiny Server

Shiny Server is a server program that makes Shiny applications available over the web.

Features

  • 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!

Installing

(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:

Now you're ready to install Shiny Server:

  • Run as root (or sudo): npm install -g shiny-server
  • Optional: Create a config file (see below)

Quick start

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 sudo):

# 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:

sudo shiny-server

Now start a web browser and point it to http://<hostname>:3838/MY-APP/

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

  • Run sudo shiny-server
  • Optionally, you can pass a custom configuration file path (see below) as a parameter. Otherwise, /etc/shiny-server/shiny-server.conf will 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/
  • Run sudo start shiny-server to start and sudo stop shiny-server to stop.
  • Run sudo reload shiny-server to 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.

Configuration

See the document Shiny Server Configuration Reference for details.

Contact

Please direct questions to the shiny-discuss group.

npm loves you