s__
s__

Reputation: 9495

Shiny app on Server: not publish it, only make it run

I am working on an Shiny app in R. My goal is to put in on a server, not on my local pc.

EDIT: my goal is not to publish it on the web, but only make it run on the server locally.

I have installed R on the server, added all the libraries I need, lastly I tried to launch my app that it is quite long, the schema is more or less this:

data preprocessing (with RODBC)
some custom functions
server<- etc.
ui<- etc.
shinyapp(server,ui)

Well in my local pc everything is fine, but on the server I cannot have a result, it is impossible to reach the address.

I decided to do something like this, create the two files called server and ui, and launching them with:

runApp(".../shiny")

Having the idea to use the option of runApp. Well it is arriving this

ERROR: Error sourcing C:\Users\...\AppData\Local\Temp\Rtmp8YeSOV\file22281c0c2f6d

First of all, this procedure is going to help me? If so, could you tell me what that error mean? Thanks in advance.

Upvotes: 0

Views: 627

Answers (2)

s__
s__

Reputation: 9495

The answer is quite simple, I was using IE as browser: if you use Chrome specifying it on the runApp statement, everything works fine.

Upvotes: 0

Geovany
Geovany

Reputation: 5687

I'm not sure, but I think it's not possible to reach a shiny app running in a local computer (or server). For that purpose you can use the Shiny Sever, which allow you to put your Shiny apps accessible online.

It seems that your server is a Windows computer, so your options are:

  1. Build Shiny Server from its source code, (maybe a little difficult).
  2. Use a virtual machine like VMware Player (free for non-commercial use) and install Ubuntu or other Linux distribution to use the pre-built binary of Shiny Server. With this option you can restrict the access to only your local network and maybe faster access to your DB's.
  3. Use a DigitalOcean virtual server (for a very reasonable price), in this case you apps will be on the cloud and accesible everywhere.

For option 2 and 3 you can follow the very useful and well written tutorial of Dean Attali about installing and setting up a Shiny Sever. It is for DigitalOcean but is pretty much the same if you decide to use a virtual machine with Linux.

Upvotes: 1

Related Questions