Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup R shiny server in Azure Virtual Machine

Tags:

r

azure

shiny

Is it possible to setup R shiny server (open source version) on Azure virtual machine?

like image 713
Thisara Watawana Avatar asked Jul 20 '16 05:07

Thisara Watawana


People also ask

Does Shiny require a server?

You might be eager to deploy your Shiny app to a remote server. But the simplest way to run a Shiny app is to run it locally. You only need the shiny R package installed, and you can run the app in your browser.

Where is R Shiny hosted?

We currently host 100% of shinyapps.io in Amazon's AWS US-East region. We intend to make it possible to deploy your applications in different regions, depending on the demand for the regions.


1 Answers

You can install Shiny Server normally, connecting through ssh to your R Server following this manual:

sudo su - \
-c "R -e \"install.packages('shiny', repos='https://cran.rstudio.com/')\""
sudo apt-get update
sudo apt-get install gdebi-core
wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.3.838-amd64.deb
sudo gdebi shiny-server-1.5.3.838-amd64.deb

By default Rstudio Server 3838 port is not allowed, to alter this just

  • go to your Network Security groups
  • click security group associated with your virtual machine
  • go to Inbound security rules within selected security group
  • By default default-allow-ssh should be visible. Click Add+ and allow new name=allow-shiny with protocol=TCP protocol and port range=3838 And that's it.
  • Open your browser and go to http://your_public_ip:3838 - You should see RStudio login panel.

Same process can be repeated to install RStudio Server

If you have smaller instances some packages installation can be impossible due to memory insufficiency. You can resize your virtual machine just for a time of installation. After installation is done, resize back down

Enjoy!

like image 142
GoGonzo Avatar answered Oct 29 '22 05:10

GoGonzo