Data publicity on published shiny apps

Hello, I am working on my first Shiny App. I am working with data that I would like to keep private, but I would like to publish the plots I make from the data. If I put the data in the app folder when I publish, will the data also be made accessible?

Did you plot the data interactively ?
Otherwise, if possible, you can pre compute each plot so that you publish the plot but not the data. This is the ultimate security if you do not want the data to be sent at all on the publishing server. You just send the plot and show them based on user input choices.

But it is not really necessary to go to such extrimity

In a shiny app, everything in the app is not exposed by default. The only files accessible over network are the one in www folder of your shinyapp. If you store data as file, rds, rdata, feather, or any other format, users won't be able to download them unless you allow them with shiny::downloadHandler() or expose the file in www folder to have access to it over http. (see this community question to see an example of a user who wanted to share a pdf result over http.)
The www folder is served by default but you can also add other with addResourcePath()

You can try locally your app and see if you manage to access the file you put in App. Put another one in a www folder, and you'll see it will be accessible.

Hope it helps

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.