This link provides step by step instructions for setting up RStudio Server and Shiny on a Digital Ocean Ubuntu droplet: Dean Attali’s Blog Entry
It is very important to note that if one follows Step 9: Make pretty URLs for RStudio Server and Shiny Server, that one also follows these additional steps (from Dean Attali’s blog):
Bonus for advanced users: The above setup should be just fine for most users, but I did notice a few small issues with RStudio that seem to be fixed by allowing nginx to proxy WebSockets. For example, I noticed that when using the
ggvispackage in my RStudio, tooltips were not working. The fix is to add the following three lines inside the
location /rstudio/settings (keep the
proxy_passline and just add these three, and remember you have to restart nginx after changing the settings):
proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
If you’re hosting a Shiny Server, add these 3 lines after the
location /shiny/as well.
If those steps are not taken, then one will not be able to execute shiny apps from RStudio server (i.e., the app will start but the window will “gray” out). Complications may also appear with the R shiny server. However, allowing nginx to proxy Websockets remedies the problems.