R- Shiny webserver on a local server

后端 未结 3 1190
野性不改
野性不改 2020-12-24 06:54

I have a windows machine with IIS and I can see the IIS welcome page on http://myname/. I have recently started using Shiny through its own server and I can see

相关标签:
3条回答
  • 2020-12-24 07:29

    The comments have already said this, but in the interest of providing an answer:

    You can use shiny server (free and pro) to host apps on your own server. I believe this will allow you to set it up on http://myname/, however shiny server should be running in a linux environment as listed by @pops.

    https://www.rstudio.com/products/shiny/shiny-server/

    Or

    you can use shiny.io to host them for you, with premium versions having the ability to set your own domain

    https://www.shinyapps.io/

    0 讨论(0)
  • 2020-12-24 07:34

    When using Shiny localy the library set a server in which you can access the Shiny application. If you want to make it accesible on a LAN you have to set up a Shiny server.

    You will need a Linux server with R and Shiny instaled, in addition to all the libraries your application needs. To configure it you can follow this

    Once the server is totally configured you can add your own applications to the server adding the applications to the folder:

    /srv/Shiny-server/myApp

    And will be available inyourServerAddress:3838/myApp

    0 讨论(0)
  • 2020-12-24 07:38

    You should make following:

    1. Find your IP ("ipconfig" from cmd prompt in Windows)
    2. Set Shiny to start from port "XXXX" and your IP (instead of 127.0.0.1)

      For example:

      options(shiny.port = 7775)

      options(shiny.host = "192.0.0.45")

    3. Run your App

      runApp(app)

    Make sure the port is opened in your firewall.

    To be a bit more precise, this is how your file startApp.R might look like:

    library(shiny)
    options(shiny.host = '0.0.0.0')
    options(shiny.port = 8888)
    runApp('shinyapp')
    

    This is an example of how you would set the options if Shiny was running behind nginx with tcp.

    0 讨论(0)
提交回复
热议问题