It sounds like you may have a bit more to learn about R / Shiny and Shiny Server, as your question is pretty open-ended and hard to address as a result.
Shiny applications can be served through Shiny Server, and arbitrary R scripts can be executed on Linux (where Shiny Server runs).
I think this might be a good resource for you:
http://shiny.rstudio.com/tutorial/
Many of these articles may be helpful as well. In particular, I linked to the deployment articles, which have specific information about serving Shiny applications on shinyapps.io and on Shiny Server:
http://shiny.rstudio.com/articles/#deployment