Home > Software engineering >  Run shinyApp locally
Run shinyApp locally

Time:07-26

I want to create a shinyApp that runs just locally, i.e. withouth a URL that can be accessed by others.

Here a minimal example:

library(shiny)
ui <- fluidPage("Some app")
server <- function(input, output) {}
shinyApp(ui = ui, server = server)

While running this, the console says:

console

If I type the URL into my browser, I see the App I am writing on. How can I hinder the app to go online? This is important for my use case because we handle sensible data which must remain locally.

CodePudding user response:

Just to leave a clear answer regarding your question:

Your app never was online.

Via 127.0.0.1 your browser is accessing the standard address for IPv4 loopback traffic on your localhost (your PC) - please see this.

runApp()'s default for the host parameter is:

host = getOption("shiny.host", "127.0.0.1")

On the other hand using runApp("0.0.0.0") as described here makes your app accessible from the LAN.

To share your shiny applications online you can e.g. publish them on shinyapps.io.

  • Related