Getting Started
Prerequisites
Java
ShinyProxy is written using mature and robust Java technology and you will need a Java 8 runtime environment to run ShinyProxy. We recommend the use of OpenJDK or a multi-platform distribution of OpenJDK like Zulu. Of course, Oracle Java will do too.
To check your version of Java is Java 8 (or higher), run
java -version
which should display something along
openjdk version "1.8.0_72"
OpenJDK Runtime Environment (Zulu 8.13.0.5-linux64) (build 1.8.0_72-b15)
OpenJDK 64-Bit Server VM (Zulu 8.13.0.5-linux64) (build 25.72-b15, mixed mode)
Docker
Installation
Every user of ShinyProxy will use its private Docker container when running a Shiny application. When running ShinyProxy you will therefore need to set up docker on your host. Docker has very complete installation instructions:
- installing Docker on Linux
- installing Docker on Mac OS
- installing Docker on Windows
and also provide information on how to get docker up and running in the cloud.
To check whether the docker daemon is up and running, use
sudo service docker status
on GNU/Linux or the equivalent on your platform. This will display something along
docker start/running, process 2424
Docker startup options
ShinyProxy needs to connect to the docker daemon to spin up the containers for the Shiny apps. By default ShinyProxy will do so on port 2375 of the docker host. In order to allow for connections on port 2375, the startup options need to be edited.
On an Ubuntu 14.04 LTS system (or a similar system that uses upstart) this can be set in the /etc/default/docker
file as follows:
[...]
# Use DOCKER_OPTS to modify the daemon startup options.
DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix://"
To restart docker use
sudo service docker restart
On an Ubuntu 16.04 LTS and 18.04 LTS system (or a similar system that uses systemd), one can create a file /etc/systemd/system/docker.service.d/override.conf
with the following contents:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H unix:// -D -H tcp://127.0.0.1:2375
To reload the configuration and restart docker use
sudo systemctl daemon-reload
sudo systemctl restart docker
On a CentOS 7 (or RHEL7) system, one can create a file /etc/systemd/system/docker.service.d/override.conf
with the following contents:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H unix:// -D -H tcp://127.0.0.1:2375
and reloading the configuration and restarting docker can be done using
sudo systemctl daemon-reload
sudo systemctl restart docker
Note:
- it is also possible to edit
/lib/systemd/system/docker.service
and replace the relevant line with
/usr/bin/dockerd -H unix:// -D -H tcp://127.0.0.1:2375
but these settings will be lost upon updating Docker on your system and are therefore not recommended.
More background on the use of the override.conf
file can be found in this Docker article.
On a Windows system, edit the file C:\ProgramData\Docker\config\daemon.json
and add:
"hosts": ["tcp://127.0.0.1:2375"]
To restart Docker use
service docker restart
More information on configuring Docker on Windows can be found here. Also see this guide for running GNU/Linux containers.
Download
ShinyProxy can be downloaded from our Download page or directly from Github.
Running ShinyProxy
Pulling the demo image
In order to run ShinyProxy, you need… Shiny apps. In ShinyProxy such Shiny apps are typically shipped in docker containers and
the openanalytics/shinyproxy-demo
is a demo image that has been made available to start playing with Shiny Proxy.
Once docker is installed on your system, you can pull (i.e. download) the docker image with the demo applications using
sudo docker pull openanalytics/shinyproxy-demo
or the equivalent commands on your system. You can check whether you already have openanalytics/shinyproxy-demo
on your system using
sudo docker images | grep shinyproxy
which should display something along
openanalytics/shinyproxy-demo latest fce70ee5ba84 15 hours ago 787 MB
Running ShinyProxy
ShinyProxy can be run using the following command
java -jar shinyproxy-2.5.0.jar
less than 10 seconds later, you can point your browser to http://localhost:8080 and use your Shiny apps!
More advanced information on the usage and configuration of ShinyProxy is available on the Configuration page.