RStudio Server on a Mac

See here for a more recent posting on this topic.

I really like RStudio Server (and should blog about some its cool features another time). But this post is more focused: getting RStudio Server on a Mac. I had the chance to speak to Joe Cheng, one of the RStudio engineers, at R/Finance 2011 and it seems there is little demand out there for a version of RStudio Server for Mac OS X. Still, it can be done, though I cheat a little to do it.

How? Run it in Ubuntu on a VirtualBox virtual machine. Setting up the virtual machine with R and RStudio Server is surprisingly easy (no need to burn CDs!). The only quirk is that I needed to click an icon at the bottom of the Ubuntu window to make the networking “bridged” (I don’t remember the exact term and I’m not at my computer right now to check); the effect of this was to give my Ubuntu instance its own IP address so I could access it from elsewhere (being low tech, I went to whatismyip.com to get my IP address).

Following the instructions at the RStudio site, I then had an instance of RStudio Server that I could access from anywhere (even from my iPad … though it turns out I can’t really use it there). Very cool.

Note that the biggest downside I see is that a VM ties up RAM (I have ordered some more), and perhaps quite a bit if you want R to be amply supplied. As discussed previously, there isn’t necessarily a performance hit for a Mac user running R in this way. Also, even though I installed the desktop version of Ubuntu (easier to do for me), I can run it in “headless” mode, so I hardly even notice it on the Mac side. I still have most of my data on the Mac side, but I added my new IP address to the list of IPs that can access my PostgreSQL data and have no trouble getting to that from Ubuntu R using RPostgreSQL.

Advertisements
This entry was posted in R and tagged , , , , . Bookmark the permalink.

10 Responses to RStudio Server on a Mac

  1. Ronan says:

    Hi,

    Thank you for this post. It helped me. I have some questions.

    I’ve done:
    1. Install R and RStudio Server on a fresh Linux Mint VM.
    2. Find the local IP of the VM.
    3. Connect to RStudio on another machine of the network, i.e. the same computer.
    4. Port forward on your router.
    5. Connect to RStudio with your internet IP from everywhere.
    6. See I can access to all the files on my VM.

    I want:
    1. Build RStudio Server on Mac OS X (Tell me if you’ve build it).
    2. Create new users with restricted access (Is that on the RStudio side or on the OS side?).

    • iangow says:

      1. I haven’t built RStudio Server on Mac OS X. I now have a dedicated Ubuntu box and RStudio Server works so well on that (I generally access it from my Macs).
      2. I think that’s all on the OS side, with RStudio Server building off that in some way. There’s some discussion of that on the RStudio support pages.

  2. MattNapsAlot says:

    After quite a bit of troubleshooting, I was able to work out how to build Rstudio server on OSx Lion. The process is complicated and time consuming, but fairly straightforward. I documented the procedure on this wiki:

    http://sagebionetworks.jira.com/wiki/display/SYNR/Building+RStudio+from+Source+%28OSx+Lion%29

  3. iangow says:

    Matt’s documentation was very helpful. I successfully got RStudio Server up and running under Mac OS X today. It takes quite some time, so one wishes a binary were available somewhere (rstudio.org ideally, I guess).

    A few notes:
    1. The path to Qt differed a little in my set-up (more recent version).
    2. I didn’t need to edit rstudio/dependencies/common/install-boost.
    3. I set up the launch daemon under /Library/, rather than under /System/Library/

    I didn’t test it thoroughly, but it seemed exactly as it is under Ubuntu, except that the Ubuntu version doesn’t seem to mind shutting down the system, whereas the Mac OS X instance complained about a crash when I came back into it.

  4. ejjunju says:

    I successfully set up rstudio on my mac and i can use the server as long as i am on my home network. But the moment i try to access it from outside the home, over the internet i dont even get to the log in window? what could be my problem?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s