10

I've registered for the beta hosting. I've tried to follow the directions for creating the shinyapps/myapp folder on my widnows machine. I can run shiny apps locally. I've installed the node.js program shiny requires but I can get the config file? I think my error message requires python? Is there an easier way to host the shiny app on a windows machine? Thanks

ngwells
  • 188
  • 1
  • 1
  • 8

3 Answers3

27

a bit of a late answer: it is possible to host a shiny app on Windows.

use the following run.R script below, start it as a job on the windows machine. Do make sure that the port (below 1234) is open in the local firewall.

Enjoy!

require(shiny)
folder_address = 'H:/path to app'

x <- system("ipconfig", intern=TRUE)
z <- x[grep("IPv4", x)]
ip <- gsub(".*? ([[:digit:]])", "\\1", z)
print(paste0("the Shiny Web application runs on: http://", ip, ":1234/"))

runApp(folder_address, launch.browser=FALSE, port = 1234, host = ip)
user1693885
  • 471
  • 4
  • 3
5

From the Shiny website:

You'll need a Linux server, with the following prerequisites installed:

Node.js 0.8.16 or later For Ubuntu, we have found these instructions to work well. For Red Hat/CentOS, we recommend installing from source. R 2.15 or later Shiny R package, installed into the machine-wide site library. This is one easy way to do that: sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""

You cannot natively host Shiny apps on a Windows machine right now. Running a virtual machine with Linux might be a good alternative.

Paul Hiemstra
  • 58,502
  • 12
  • 138
  • 147
  • What about through a virtual machine? – Roman Luštrik Apr 17 '13 at 05:55
  • 1
    If you install Linux on the virtual machine than you can install Shiny Server on that machine. – Paul Hiemstra Apr 17 '13 at 06:09
  • @PaulHiemstra I have been able to set up Shiny Server on a Linux VM. By using a bridged network I can also access the Shiny application on my Windows Server (also a VM currently) and host machine (Windows 10). On my Windows Server I have setup an IIS web server. Do you have an idea how I can route my application to run as part of a website hosted on an IIS web server? I am tied to finding ways to do this due to IT infrastructure, and I want to find ways to incorporate R and R Shiny in our workflow and make them available for co-workers but also external parties. – smoens Feb 11 '18 at 11:54
1

Using

https://github.com/leondutoit/shiny-server-on-ubuntu

deployment is fairly easy. Too bad, the author is not very responsive.

Dieter Menne
  • 9,916
  • 41
  • 66