Embed a shiny app in a private website

shiny

#1

Is there a way to embed a shiny app in a private website (not using R server or R server Pro)?


#2

Hi @sana, you can use an iframe to embed in a shiny app in a normal website. See Rstudio website Is this what you are looking for?


#3

Hi @ginberg, thank you for your response. I've already looked at this website. There is nothing about iframe. Would you please let me know if there is any other instructions of how to use iframe for this purpose? Thanks.


#4

you are right, there is no technical instruction on how to do this, but if you look at the source of the website, you can find it how to do embed an app.

This is a simplified version of how the google trend index app is integrated on the RStudio website

<html>
<head><title>Shiny App Iframe</title></head>
<body>
<iframe id="example1" src="https://gallery.shinyapps.io/goog-trend-index/" style="border: none; width: 100%; height: 850px" frameborder="0"></iframe>
</body>
</html>

#5

Thank you @ginberg for your help. I tried that but it seems that the app should be deployed on a website first to be integrated to another website. I couldn't embed the html file that is located on the localhost.


#6

Yes, you need to have an app that is deployed somewhere (e.g. shinyapps.io, RSConnect or shiny server) for this to work.
I am not totally sure, what you are trying to achieve. Could you explain a bit more?


#7

I'm trying to deploy the app, that has not been published anywhere, in my own website. Some websites like that one you mentioned are not available in my home country.


#8

If you can't access certain cloud services, I think the best option is to deploy the app on a host where you can install shiny server yourself. If that works, use the link to your app in your website.