Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View my shiny page from browser

I got a 64-bit ubuntu instance running on Amazon EC2, and then followed the instructions here to get the shiny server (for R) running. Next I ran

cd /var/shiny-server/www
sudo git clone https://github.com/trestletech/shiny-sandbox.git .

as instructed here to put a simple example shiny application within reach of the shiny server. (I also used scp to move a second toy set of shiny application files, server.R and ui.R into a folder in my home directory.)

Finally, I want to access my shiny apps from a browser, as if I were an ordinary web user. However (obviously) I know next to nothing about how web pages,servers, and addresses conspire to make the internet work. How can I visit my server/app?

This page suggested entering

http://<your amazon machine name>:3838/

in a browser. I've tried substituting several things in for <your amazon machine name> including the public and private IP address, my Amazon "instance ID", my "Public DNS", but none of these things results in a web page loading.

like image 411
zkurtz Avatar asked Sep 17 '25 03:09

zkurtz


1 Answers

A couple of things you'll need to check:

  1. Try this guide instead of the one you referenced. The link you provide is older and suggests using an older directory that isn't used anymore (/var/...). Nowadays shiny-server expects your applications to be hosted in /srv/shiny-server. And actually, if you're using the recently released version 1.1 of Shiny Server, there should be some content at http://<server address>:3838/ without you having to even deploy any apps yet. But, of course, feel free to setup your applications first.
  2. On EC2, you need to worry about "security groups" which control how your machine can be accessed. In particular, you need to make sure that port 3838 is open on your server.
  3. Your "Public DNS" entry is probably the safest way to get to your server.
  4. If you're still not having any luck, you can check the server log in /var/log/shiny-server.log to see if there are any helpful error messages there and post them back here.
like image 124
Jeff Allen Avatar answered Sep 19 '25 18:09

Jeff Allen