Accessing Shiny apps from other computers using standard RStudio

2,008 views
Skip to first unread message

Juan Manuel Truppia

unread,
Jan 15, 2015, 4:21:10 PM1/15/15
to shiny-...@googlegroups.com
Hi, I'm running my Shiny apps in my W7 box from RStudio, in my office, where we have a NTLM proxy. I have no problem accessing them from my browser (while they are running of course) using localhost:port or 127.0.0.1:port.
But if I open my browser and type my own NetBIOS name, or IP (I have a static one) it fails. Obviously, if somebody else tries to access my app, it fails also. I'm running JIRA in a Tomcat from my machine, and people can access it with no problem. Also, in the past, sometimes it was possible to access my own apps from other machines in the network (inconsistently). Not anymore.

Is it possible to host shiny apps from plain R (or RStudio for that matter) and have other people in the same network access it? (behind a firewall and proxy as most corporate enviroments are)

Thanks!

Johnathan Alexander

unread,
Jan 15, 2015, 5:30:58 PM1/15/15
to shiny-...@googlegroups.com
It's pretty hard to diagnose the exact issue from this end but the three things I would try:
1) Make sure you setInternet2() in R 
2) Possibly add host='0.0.0.0' into the runApp arguments on Shiny
3) Look into CNTLM: http://cntlm.sourceforge.net/ (most IT teams will probably not be a fan of you having this on your computer) 

Juan Manuel Truppia

unread,
Jan 15, 2015, 5:37:08 PM1/15/15
to Johnathan Alexander, shiny-...@googlegroups.com
I already have CNTLM running on my machine (I use it for all the apps that don't support NTLM proxies). I used ntlmaps before also.
I'm using internet2 also (I'm in RStudio and can download packages, and also can use download.file without issues). I'll try the host ='0.0.0.0' argument. What is that supposed to do?

--
You received this message because you are subscribed to a topic in the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/shiny-discuss/PEqjLAqdbTU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/ae7d7753-ffe7-4719-a655-a8f0f92f92a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johnathan Alexander

unread,
Jan 15, 2015, 5:39:24 PM1/15/15
to shiny-...@googlegroups.com, jav...@gmail.com

"The host parameter was introduced in Shiny 0.9.0. Its default value of "127.0.0.1" means that, contrary to previous versions of Shiny, only the current machine can access locally hosted Shiny apps. To allow other clients to connect, use the value "0.0.0.0" instead (which was the value that was hard-coded into Shiny in 0.8.0 and earlier)."


Juan Manuel Truppia

unread,
Jan 15, 2015, 5:40:42 PM1/15/15
to Johnathan Alexander, shiny-...@googlegroups.com
Great! It worked. So that's why it worked before. Many many thanks! May I ask why was this design decision made?

Johnathan Alexander

unread,
Jan 15, 2015, 5:44:14 PM1/15/15
to shiny-...@googlegroups.com, jav...@gmail.com
No idea. I'm not affiliated with Shiny. Likely it was a security decision; keep the application private unless explicitly told not to do so now that the ability to define a host has been added. 

Joe Cheng

unread,
Jan 15, 2015, 11:39:19 PM1/15/15
to Johnathan Alexander, shiny-...@googlegroups.com

That's exactly right. Many people are using shiny for sensitive purposes and so you have to tell it explicitly to allow other computers to access your app.

You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/21a7c3fc-d804-4917-8799-4513ea1aa284%40googlegroups.com.

Juan Manuel Truppia

unread,
Jan 16, 2015, 6:48:11 AM1/16/15
to Joe Cheng, Johnathan Alexander, shiny-...@googlegroups.com

Thanks Joe! Are there other useful values for the host parameter?


Joe Cheng

unread,
Jan 16, 2015, 4:24:45 PM1/16/15
to Juan Manuel Truppia, shiny-...@googlegroups.com, Johnathan Alexander

Petty much everyone will use either 127.0.0.1 or 0.0.0.0. (You could provide other values if you want the app to work on one physical network adapter but not another, for example; but it's hard to imagine people doing that without using Shiny Server.)

Reply all
Reply to author
Forward
0 new messages