RStudio Server on OS X Sierra

November 25, 2016

(This article was first published on Reimagined Invention, and kindly contributed to R-bloggers)


I had to install RStudio Server in a computer recently upgraded to OS X Sierra. The steps are the same as in a previous post (RStudio Server on OS X El Capitan

Homebrew setup

If you don’t have Homebrew installed you’ll need to install it first.

In my opinion is it better to install XCode 8 Command Line Tools rather than using the App Store to download XCode 8.

Once you are ready installing Homebrew run these lines from terminal:

brew update 
brew tap homebrew/science
brew install r openssl ant
brew install homebrew/science/rstudio-server

Beware that this will relink the R binaries to /usr/local/bin. It will also install the last R version (3.3.2 on November 25, 2016). Therefore, it would be a good idea to uninstall the previous R version that you have or you will be misusing your drive space.

Additional steps

The last part won’t make rstudio-server running. You’ll need some additional steps.

Copy a pre-made plist:

sudo cp /usr/local/opt/rstudio-server/share/com.rstudio.launchd.rserver.plist /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist

Check permissions:

sudo chown root:wheel /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist 
sudo chmod 644 /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist

Modify the plist and enable rstudio-server autostart:

sudo nano /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist

and replace the content by this



Copy a pam:

sudo cp /etc/pam.d/ftpd /etc/pam.d/rstudio

Launch the daemon and start rstudio-server (i.e. sometimes you can’t restart your server without affecting other users):

sudo launchctl load -w /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist
sudo rstudio-server start

Create rstudio group (in OS X El Capitan and later OS X versions you need to do this):

Go to System Preferences -> Users & Groups -> Add, create a group named rstudio and click all the users you want to authorize to use rstudio-server.

Using rstudio-server

From your server go to localhost:8787 and you should be able to login usign your OS X credentials.

To login from another computer on the same network, from your browser go to your server’s IP on port 8787 (e.g.

To leave a comment for the author, please follow the link and comment on their blog: Reimagined Invention. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)