Tag Archives: shiny

Installing R and Shiny on Cloud 9

I wanted to see if I could run an instance of RStudio’s Shiny server on Cloud 9 and after a bit of finagling with the right set of steps to get it set up I have an instance running. Here’s what I did starting from a workspace using the stock HTML template.

strefethen:~/workspace/ $ sudo sh -c 'echo &quot;deb http://cran.rstudio.com/bin/linux/ubuntu trusty/&quot; &amp;gt;&amp;gt; /etc/apt/sources.list<br />
strefethen:~/workspace/ $ gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9<br />
strefethen:~/workspace/ $ sudo apt-get update<br />
strefethen:~/workspace/ $ sudo su - \<br />
-c &quot;R -e \&quot;install.packages('shiny', repos='https://cran.rstudio.com/')\&quot;&quot;<br />
strefethen:~/workspace/ $ sudo su - -c &quot;R -e \&quot;install.packages('shiny', repos='https://cran.rstudio.com/')\&quot;&quot;<br />
strefethen:/etc/shiny-server $ sudo shiny-server<br />
[2016-09-02 02:25:04.460] [INFO] shiny-server - Shiny Server v1.4.4.801 (Node.js v0.10.46)<br />
[2016-09-02 02:25:04.463] [INFO] shiny-server - Using config file &quot;/etc/shiny-server/shiny-server.conf&quot;<br />
[2016-09-02 02:25:04.535] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.<br />
[2016-09-02 02:25:04.539] [INFO] shiny-server - Starting listener on<br />

I need to look into the user “shiny” to see about fixing the above warning. Then edit /etc/shiny-server/shiny-server.conf and change the port from 3838 -> 8081 so Cloud 9 will server the content and start the server:
<br />
sudo shiny-server<br />

Browse to http://<project-name>-<username>.c9users.io:8081/ and you should see:

Default Shiny app running on Cloud 9