Creating a dynamic Shiny web app.

I've been fiddling around with Shiny for a day or so now as I've decided to use the framework to create a website featuring "live" data (data updates automatically once weekly).

How exactly would I go about hosting a Shiny application with a CRON job (for the automation bit) that would invoke code that downloads a PDF (from online) and scrapes the PDF for data, which is outputted into a CSV file (a single file that's being updated on a weekly basis)? Ignore the functionality bit of the aforementioned as I'm only curious to know how I'd be able to run such a website -- and deploy it.

I do have a personal server (a Synology NAS DS220+) and I'm thinking of hosting it from there.

I may have some additional questions but as of now, I would appreciate if someone could give me some guidance.

I don't think the Synology NAS server is a viable option unless it lets you run containers or vms from it. For hosting your shiny app yourself you need a Linux server where you can install shiny-server and schedule cron jobs. Also, if you intend to make the app accessible over the internet, you need to have access to a public IP and configure port forwarding in your router.
Now, what would be a suitable option for you?, it depends on what kind of traffic you are expecting for your app and what computational resources are required to run it. Can you provide more details?

1 Like

I appreciate your reply.

Synology's OS (DS Server) does have a Docker package, along with the ability to run VMs. But as you had mentioned, I wouldn't be able to load shiny server on the NAS. Could I run the shiny server client via the Docker? Or would sticking with AWS be a better option (iirc, shiny server can be utilized with AWS). Or are there better options that I may not be aware of?

Regarding the purpose of this project, it wouldn't require much with regards to processing power; the data would be updated on a weekly basis and the output data would be visualized on a map.

I'm not familiar with Synology's capabilities but regarding to docker, yes, you can run shiny-server on a docker container as long as you can expose a port and forward traffic to it

This would be much simpler and if you are expecting light traffic for your app, the free tier would be enough.

Another option to consider is using to host your app, but the cron job would have to be executed somewhere else.

Yeah, I had contemplated shinyapps.os but I don't think it'll suit my needs. Is there anything else I should know with regards to running a shiny app with AWS?

The only special considerations with AWS are opening ports using the AWS console instead of a firewall on the VM itself (port 3838 or port 80/443 with a reverse proxy), and being aware that each time you restart your EC2 instance the public IP is going to change (unless you provision an elastic IP) so your domain has to be updated to point to the current IP.

Thanks for the information. On another note, would you suggest using AWS over Google cloud for my particular proposal, or are you indifferent?

Honestly, I have never used Google Cloud Computing but AWS has been around longer so there is more information around and easier integration with infrastructure management software (at least as far as I'm aware).

1 Like