0

I am trying to access a flexdashboard from another machine in my local network (both windows machines).

From this this post I found out shiny behavior was changed to avoid this by default starting from version 0.9.0. For a shiny application only, this could be easily done setting the host option when calling runApp (source):

runApp("app_name",host="0.0.0.0",port=3168)

Is there a way to specify host paramenter on a flexdashboard header? Or alternatively configure shiny to use a specific host by defult? The header of my current flexdashboard is:

---
title: "My analysis"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    social: menu
    source_code: embed
runtime: shiny
---
Community
  • 1
  • 1
brodoll
  • 1,851
  • 5
  • 22
  • 25
  • 1
    This [answer](http://stackoverflow.com/questions/25765996/r-markdown-with-shiny-server-change-host-parameter) should help you. – NicE Feb 17 '17 at 17:14
  • Thank you @NicE, indeed, doing that helped to shed some light into the problem, but did not solve it. When I run [a simple shiny app](https://github.com/rstudio/shiny-examples/blob/master/084-single-file/app.R) I am able to access from the other machine. I also get this in the console: > shiny::runApp() Loading required package: shiny Listening on http://0.0.0.0:3721 . However if I run the flexdashboard I get this in the R Markdown tab on RStudio: Loading required package: shiny Listening on http://127.0.0.1:5419. It looks like the flexdashboard ignored `options(shiny.host="0.0.0.0")` – brodoll Feb 17 '17 at 18:03
  • are you running it using `Running document` in Rstudio. As the answer states that wouldn't work. It only works if you run your flex_dashboard by running `options(shiny.host="0.0.0.0"); rmarkdown::run("myfile.Rmd")` in the console. I did a quick test and it runs fine. – NicE Feb 17 '17 at 18:22
  • @NicE, you were right, I missed the `Running document` warning when I skimmed thourgh the answer. That solved the issue! Essentially it was a "how to configure shiny on a specific session" issue instead of a flexdashboard one. If you make this into an answer I'll gladly accept it. Thank you for your time and help – brodoll Feb 17 '17 at 18:33
  • Glad it worked, you can upvote the answer to that question, I'll just mark this one as a duplicate so people can get their answer. – NicE Feb 17 '17 at 18:36
  • @NicE Sounds good to me! – brodoll Feb 17 '17 at 18:37

0 Answers0