1. Home
  2. Tutorials
  3. How To Set Up RStudio On An Ubuntu Cloud Server

How To Set Up RStudio On An Ubuntu Cloud Server

How To Set Up RStudio On An Ubuntu Cloud Server
How To Set Up RStudio On An Ubuntu Cloud Server

What is RStudio?

RStudio IDE is the open source integrated Development Environment for the statistical analysis program R.

RStudio Server gives a web version of RStudio IDE which grants easy development on a VPS

Installing RStudio In a VPS

To begin, install R, apparmor, and gdebi

sudo apt-get install r-base libapparmor1 gdebi-core

Now, we’ll download and install the right package for your architecture. On a 32-bit Ubuntu, run the following commands:

wget http://download2.rstudio.org/rstudio-server-0.97.336-i386.deb -O rstudio.deb

For Ubuntu 64-bit, run the following commands:

wget http://download2.rstudio.org/rstudio-server-0.97.336-amd64.deb -O rstudio.deb

Install the Package.

sudo gdebi rstudio.deb

Creating RStudio User

It is not recommended to use the root account with RStudio, It’s better to simply create a normal user account for RStudio. You may name the account as anything you want, and the account password is going to be the one you’ll be using in the web interface.

sudo adduser rstudio

RStudio is going to use the user’s home directory as it’s default workspace.

Using R Studio

RStudio could be accessed from port 8787. Every user is accessible with a password in RStudio.

Let’s confirm that RStudio is working right by installing a quantitative finance package from CRAN, the R package repository.

Execute the following command within RStudio to install quantmod.


Now, let’s verify RStudio’s graphing capabilities by plotting the stock price of Apple. The graph is going to show up in the bottom right panel of RStudio.


data <- new.env()

getSymbols('AAPL', data)


R is quite powerful, and there are many useful packages available from CRAN.

You may learn the basics of R at Try R.

Updated on January 5, 2018

Was this article helpful?

Related Articles

Add A Comment