RStudio
RStudio
by Open Trade Statistics

Version 1.2

OS Ubuntu 18.04

Create RStudio Droplet

Description

RStudio Server is the premier integrated development environment for R that allows to move computation close to the data and scale compute and RAM centrally.

This is a pre-configured image with open source editions of RStudio Server 1.2. and Shiny Server 1.5. All dependencies are solved for you to just go and use this droplet with already configured tidyverse, shiny, and even h2o so that in three clicks and no more than five minutes you'll have your server running and ready to fit models and more.

Aside of fully solved dependencies, this image features full LaTeX installation and OpenBLAS to boost some operations.

Please notice that the software listing is limited to end-side software. For example, it lists tidyverse, but it doesn't list dplyr as it was installed beforehand as a dependency of tidyverse.

This image is prepared, to a wide extent, to install packages such as sf and h20 as a wide variety of dependencies for different R packages are already solved.

Software Included

Getting started after deploying RStudio

Creating a system administrator account

It is highly recommended that you create an administrator account separate from root.

With your just created droplet, you can access to the shell from Digital Ocean Control Panel (i.e. from the console link in this image) or by using ssh.

If you want to use ssh (recommended) open a terminal on your local and login as root assuming the IP is 203.0.113.0 (look for the real IP in your control panel):

ssh root@203.0.113.0

Let's create the user paul:

adduser paul
usermod -aG sudo paul

For the full reference please check this DigitalOcean tutorial.

Adding more users

Let's create three users that will only be able to install R packages to their personal directory (and of course to use R, RStudio and Shiny):

adduser john 
adduser george 
adduser ringo

Using RStudio Server

From any modern browser such as Firefox, type 203.0.113.0:8787 (see your droplet IP in control panel) on the address bar and then enter with any of the users you created before.

Another option is to access by using an ssh tunnel, with nice benefit of being encrypted. If your network has blocked ports, probably you need this method. Run this command from the terminal:

ssh -f root@203.0.113.0 -L 8787:203.0.113.0:8787 -N

And then, from the browser go to localhost:8787.

Optional: custom domain and enabled https

Let's say that you want people from your organization access RStudio Server from rstudio.ourcompany.us instead of 203.0.113.0:8787. DigitalOcean tutorials already covered the additional steps to do that by using Nginx or Apache.

API Creation

In addition to creating a Droplet from the RStudio 1-Click App via the control panel, you can also use the DigitalOcean API.

As an example, to create a 4GB RStudio Droplet in the SFO2 region, you can use the following curl command. You’ll need to either save your API access token to an environment variable or substitute it into the command below.


  curl -X POST -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer '$TOKEN'' -d \
      '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image":"simplystatistics-rstudio-18-04"}' \
      "https://api.digitalocean.com/v2/droplets"
      

Support Details

Hours:09.00 - 18.00
Support URL:https://github.com/pachamaltese/rstudio-server-droplet/issues

More DigitalOcean Links

DigitalOcean Community

Developers supporting developers

Ask a Question

Ask anything related to system administration, programming, devops, open source, or the DigitalOcean platform.

List your 1-Click App in the DigitalOcean Marketplace

Partner with us to build traction for your open source project or software company