Search code examples
ubuntugoogle-compute-enginegoogle-cloud-platformrstudio-server

Rstudio server on google computing engine


I am trying to access the rstudio server installed on ubuntu. The rstudio server was installed on ubuntu preconfigured image on google compute engine (VM instance) through following commands

$ sudo apt-get install r-base
$ sudo apt-get install gdebi-core
$ wget https://download2.rstudio.org/rstudio-server-0.99.896-amd64.deb
$ sudo gdebi rstudio-server-0.99.896-amd64.deb

I am trying to access the server through http://external-ip:8787 but I am getting error : This site can't be reached. It took too long to respond


Solution

  • in order to use R-Server you need to open the port. Go to https://console.cloud.google.com/networking/firewalls/ Or in Google console navigate to

    Networking -> Firewall rules.

    There "Create firewall rule":

    Name: "r-server"
    Source IP range: 0.0.0.0/0
    Allowed protocols and ports: tcp:8787
    

    -> "Create" button. After some time (probably seconds) R-Server will be available on http://external-ip:8787