How to install RStudio Server in Ubuntu?

RStudio is an Integrated Development Environment (IDE) for the R programmers which includes different tools like code editors, builds automation, debugger, etc. RStudio comes in two different versions i.e. RStudio IDE and RStudio server.

If you are using a command-line-based system without GUI then still you can use RStudio IDE and other R development tools by installing the RStudio server on this system and accessing it remotely through a browser.

In this article, I will show you the steps to set up an RStudio Server in Ubuntu.

Prerequisites

  • A system with a recent version of the Ubuntu server (here I will use Ubuntu server 20.04 LTS ) installed on it.
  • You should have root access to the system
  • Install a recent version of R on your system

Installing RStudio Server in Ubuntu

Before you run the command to install RStudio Server, make sure you have R programming is installed on your system.

You can simply install the R programming language by using the given command in your terminal –

sudo apt install r-base -y

Next, use the following command to install Gdebi for installing RStudio debian package on your system –

sudo apt install gdebi-core -y

Download RStudio Server deb package by using –

wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-2021.09.0-351-amd64.deb

Finally, run the given command to install the RStudio server in your system –

sudo gdebi rstudio-server-2021.09.0-351-amd64.deb

Once the installation is complete the Rstudio server will be started automatically you can check its status by using the given command –

sudo systemctl status rstudio-server

This should display the output as given in the image below.

rstudio server status

Open and access RStudio Server

You have successfully installed RStudio Server on a Ubuntu system. To access RStudio remotely open a browser on another system and enter the given URL –

http://ip_or_domain:8787

For example –

http://localhost:8787

RStudio login

Enter your server credentials and click on Sign In, now RStudio IDE will be open in the browser as you can see in the image below.

RStudio

Conclusion

You have successfully set up the RStudio Server in Ubuntu. Now if you have a query or feedback then leave it in the comments below.

Leave a comment

Your email address will not be published. Required fields are marked *