RStudio Server: accessing the RStudio R IDE through your browser

I like having all my important documents and scripts in one single place. This saves me from having to synchronize them between the different workplaces I have, and makes backupping much less of a pain. One way of achieving this kind of functionality is to use a remote desktop connection tool (e.g. NoMachine for Linux), or an ssh connection. However, if you want access R remotely, there is another option. The excellent RStudio R IDE also has a server version. I installed this just now on my Ubuntu 10.04 machine, which was very easy and was done in about a minute. When RStudio Server is installed, it starts listening on a port of the computer it was installed on, by default port 8787. To access R from you browser, just type the ip address or name of the server, plus the port number into your browser. For example:

opens RStudio in my browser (Google Chrome). The functionality and speed are equivalent to running RStudio locally. I was really impressed by this option of RStudio. Now you can work on your favorite R projects from any computer. You can even upload datasets to the server using RStudio. When a friend asks you to help working on a dataset, you can just fire up his browser and start working. I also see the potential for teaching R courses. The student now only needs access to a browser to be able to start working on the course material. He or she does not need to install R or any R packages locally.

Tagged with: , ,
Posted in R stuff
11 Comments » for RStudio Server: accessing the RStudio R IDE through your browser
  1. Louis Aslett says:

    Big fan of RStudio server here too! In case you’re interested in running it in the cloud too, I’ve created Amazon EC2 AMIs for rapid deployment ( Pretty vanilla at the moment, but I’ve some ideas for making them more useful in the future (eg S3 mount points, SSL, etc).


    • Paul Hiemstra says:

      I’ve been seeing a lot about these EC2 machines from Amazon lately. Better take a look at it :). Thanks for the feedback!

      • Emre says:

        My first brush with rstudio was not all that poitisve, sadly. I did try it in a laptop with a standard small screen and not having the equivalent of SDI mode make it feel very cramped. In the graphs he plot region was a tiny fraction of the real estate and the border regions dominated, but I guess that’s what happens. There were worst things to contend with, however. I could find no way to start R with a given working directory, so any local customisations with .Renviron and/or .Rprofile were not available. Worse, it took the Documents directory to be the home directory, so the global .Rprofile and .Renviron were missed as well. Since my R_LIBS_USER was unset, this means it could not find my packages, which is a bit of an obstable to put it mildly. I could find no way to change the font in the editor (or anywhere else) and the default font is one I usually avoid (like this one, here ). In choosing the CRAN mirror I was limited to the official ones and could not set the local one apart from manually using options(). The editor, as some other commentator here eloquently pointed out, sucks. As far as I could see there was not automatic indetaton facility, no parenthesis matching and the syntax dependent coloring was minimal and apparently fixed. These are not just pretty features the contribute enormously to the effectiveness of R programming. Finally, the documentation was completely unsigned and anonymous. I find this disappointing, a sensation a bit like talking on the phone to a machine. This clearly has had a lot of work and thought put into it, but it seems to me if people really like using this kind of IDE for R, they must be using R itself in a rather limited and ineffective way.

        • Paul Hiemstra says:

          I recognize some of your frustration, although a lot has improved over the months. Parenthesis matching for example is present in the version I am using, as is auto indenting. So maybe you have to give a second try, or keep using the IDE you like. What bothers me more is that session managment does not work as smoothly as in Kate (text editor of KDE), and that there is no way to kill/restart the R session within Rstudio without killing/restarting RStudio as a whole.

    • Marcia says:

      Now that I have looked more lcesoly at it I can see that some things are not as bad as I had feared. The editor does indeed have a (very subtle) bracket matching device and it does do some rudimentary auto-indenting. This is good, I happily concede. However there remains for me a major problem in that if it is possible for the user to start the R process with something other than ~/ as the initial working directory, it is certainly not obvious how to do it from any of the documentation I have seen. Changing the start in field of the link (in Windows) seems to have no effect. It really is important to be able to do this. The initial working directory, for example, governs the initial loading of objects into the global environment from the .RData file, for example. It also determines if a .First function is to be run as part of startup and also if a local .Rprofile and/or a .Renviron file applies, also as part of the start-up process. Essentially the users loses control of the start-up process, including the inheriting of objects generated in previous sessions with a given working directory.

  2. Matt says:

    Agreed! The RStudio server version is really nice. I can begin to work on a problem using my office computer, then seamlessly continue the project, without burning extra cycles, on a home computer. The layout is very clean as well. But, I’m holding out for a vi(m) compatibility mode in the RStudio editor; It’s really difficult to give up the hard-earned efficiency one has developed with vi(m) and the like.

    • Dasha says:

      I think my favorite rftauee is the stack of plots. Each time you plot something, it doesn’t overwrite the previous so you can clearly see your changes from graphic to graphic. The export to png/pdf option is great as well.I agree with everyone about the text editor, but I was happy to see that when I opened a .Rnw file, the syntax highlighting works for both LaTeX and R, and there’s a Compile PDF button.I think the biggest annoyance that I haven’t heard mentioned yet is that the folder you choose in the Files browser does not immediately become the working directory for the console, and you even have to click the More drop-down to get the option to do so.Overall, I think its great and will continue to use it. I also think that Matlab and Stata users will find it much easier to get started with R.

  3. Elisabet says:

    I think you are correct that luietqy changing the working directory is a Very Bad Idea because that has a lot of side effects.One small improvement, however, would be to save the working directory as part of the workspace so that, when we reload, everything, including working directory, will be just as we left it. At present this does not appear to be the case.Most of us are used to navigating to a particular project’s directory and starting R there so that R loads using that project’s .Rdata, etc. Since we will typically just start RStudio now, each workspace ought to know where it was homed.

  4. Ananya says:

    I have installed r and rstudio server too in my ubuntu,
    Login page of rstudio server is opening when am calling it through port no. in browser.
    But I am facing problem in login,

    How to login in rstudio server and what username and password it will accept?

  5. Relativity says:


    I have installed R Studio server in my office desktop. It was working fine and I was able to access from different desktops when I was in office. But when I’m trying to work from home. I couldn’t access to the IP. Does R studio server high internet connection? I have 1 Mbps connection at home. Can someone help me resolve the problem. Thank you.

  6. Ramya says:

    My RStudio Server is installed on a server, I tried connecting through my browser, but, my browser displays “Problem Loading Page” . Is there anything else i need to check on this ??

1 Pings/Trackbacks for "RStudio Server: accessing the RStudio R IDE through your browser"
  1. […] playing around with R studio server for a while, I decided to write a followup to my previous blog post. I want to go over a few of the strong points of using RStudio server to access a remote machine […]

Leave a Reply

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

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see