How can I host my own R Shiny App instead of hosted it at https://www.shinyapps.io?
I run these lines below and my app is uploaded to the server above,
> library(shiny)
> library(shinyapps)
> setwd("C:/firstapp")
> deployApp()
but we have our own live server that support R, so can we do that?
ps. I follow this tutorial and get our app hosted at shinyapps.io but we prefer host it our own. Is it possible?
The deployApp() function only works with shinyapps.io. When running your own installation of shiny server, you will have to take care of deploying and managing your applications manually. This includes installing any required R packages.
To host your own shiny-server, you should get started by downloading shiny-server or shiny-server pro from here: http://www.rstudio.com/products/shiny/shiny-server/
Download and install the shiny server from RStudio:
http://www.rstudio.com/products/shiny/shiny-server/
obviously you'll need a machine to host it on if you don't want your desktop getting thrashed.
You need to set-up a shiny server on your personal server if you want to host outside from shinyapps.io
http://www.rstudio.com/products/shiny/shiny-server/
Related
I have developed some shiny apps and search for a proper way to host the app. As far as I know, there may be several ways to do it:
1. shiny-server
2. Rstudio connect
3. shinyapps.io
4. shinyproxy + Docker
I get a windows server(2016) but I find that the above host way need to work on the linux, I have tried shinyproxy but it seems not work for my windows server.
Then I find a simpler way:
app <- shinyApp(ui, server)
runApp(app, launch.browser=FALSE, host = "0.0.0.0", port = 1234)
then I can visit the app via <my-server-ip>:1234
It is really straightforward and simple, I have tested it can support multi users, and I can open new R and Rstudio session to run other scripts.
I have still considering if there is any disadvantage for this method? since we also have Linux servers, we are considering if we need to host the app on linux.
I have a Shiny app that I would like to run on an existing Apache server. I am completely new to servers and don't have much idea of where to start. Unfortunately most of the resources I've found online have been about NGINX and not Apache.
I know something like this is possible, but I am not sure how to start. How can I get started with hosting my own Shiny app on an Apache server?
So you don't run a Shiny app on Apache, Shiny Apps must be run on a Shiny Server. You have several options for deploying a Shiny app to your website. The simplest approach is to publish your app to shinyapps.io then add an IFrame to your website that will display your deployed Shiny app.
Since you have asked about how to run a Shiny App on Apache, I assume you want to deploy your own Shiny Server, which can be deployed on the same machine as your Apache server or on a different machine. Instructions for doing this may be found here: https://www.rstudio.com/products/shiny/download-server/
Once you shiny server is installed you will need to publish your app there. This is accomplished by moving your r files to the appropriate location on your Shiny Server. For details see: http://docs.rstudio.com/shiny-server/#host-a-directory-of-applications-1
Once you have done this and have your app running on Shiny Server, you need to set up Apache(Nginx or another webserver) to act as a proxy to Shiny Server. Here is a link that walks you through the steps: https://support.rstudio.com/hc/en-us/articles/213733868-Running-Shiny-Server-with-a-Proxy
If you have not done this before and do not have experience with Linux or servers, I would expect it to take at least 4 hours.
Apache can't run Shiny.
Alternatively, I suggest a nice and clear tutorial about running the R web app (aka Shiny) using Google cloud. Google cloud offers 300 USD free credit to any new user that I think is good for begninners.
https://www.theorsociety.com/media/3832/data-visualisation-workshop-uploading-a-shiny-app-to-a-server-_14062018122240.pdf
I have developed a shiny app using R. When i run the app in the local server it runs well but after installing shiny server in a different remote server when i run the app it shows error:there is no library called 'xyz'
Please help!.
I am trying to host a Shiny app on a machine hooked up to a LAN. In the directory housing my app, I have the server.R, ui.R, and launcher.R scripts. The launcher.R file looks like:
#!/usr/bin/Rscript
library(shiny)
setwd("~/path/to/shinyApp/")
shiny::runApp(host="0.0.0.0",port=4414)
When I run this via RStudio, the app launches, behaves normally, and can be accessed by other machines through the LAN by going to 987.65.43.21:4414 in a browser. When I run the app with launch.browser=T, the address reads 127.0.0.1:4414.
I want to be able to run the launcher and host the app without RStudio running. When I try running the launcher code via command line, the app gives the usual messages
Loading required package: methods
Listening on http://0.0.0.0:4414
but I cannot access the app through a LAN browser. If I navigate to the 127.0.0.1:4414 on the host machine, I can access it, but not via the machine's IP on another machine like I could when running RStudio.
Does anyone have any insight on what could be going on? Thanks!
Install shiny-server from here this will allow you to access your shiny apps from your LAN. Just put your shiny files in /srv/shiny-server/myApp and you can access them through xx.xx.xx.xx:3838/myApp/
I have shiny servers running on ubuntu for some time, but I can`t make it work on debian, I found some tutorials on google, like this
http://mars.wiwi.hu-berlin.de/mediawiki/sk/index.php/Shiny
but none of them worked for me. In this same server my Rsudio server works and I can log in and run a shiny app in the browser, is there a way to share the web link to run shiny server through Rstudio?
You can distribute your shiny app on https://www.shinyapps.io/ and share it with others.
If you will really want to host your app with Rstudio-server, maybe this answer is helpful:
Publish Rstudio Shiny App in intranet