Rstudio Server vs El Capitan I am trying to install RStudio Server in OSX El Capitan.

I did these steps from terminal

brew install openssl

brew install homebrew/science/rstudio-server


I have the login window at localhost:8787 but I can't login. If I run

sudo rstudio-server status 


then I get

Could not find service "com.rstudio.launchd.rserver" in domain for 


To check the installation I run

sudo rstudio-server verify-installation


and I get

21 Oct 2016 05:11:44 [rserver] ERROR system error 48 (Address already in use); 
OCCURRED AT: rstudio::core::Error rstudio::core::http::initTcpIpAcceptor(SocketAcceptorService&lt;boost::asio::ip::tcp&gt; &amp;, const std::string &amp;, const std::string &amp;) /tmp/rstudio-server-20161017-46697-nr3wo3/rstudio-
0.99.902/src/cpp/core/include/core/http/TcpIpSocketUtils.hpp:103; LOGGED FROM: int main(int, char *const *) /tmp/rstudio-server-20161017-46697-nr3wo3/rstudio-0.99.902/src/cpp/server/ServerMain.cpp:438


How can I fix this?
You forgot to install and launch the related launch daemon and modify some other things. To fix this do the following:


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:

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


and replace

&lt;key&gt;ProgramArguments&lt;/key&gt;
&lt;array&gt;
    &lt;string&gt;/usr/local/opt/rstudio-server/bin/rserver&lt;/string&gt;
    &lt;string&gt;--server-daemonize=0&lt;/string&gt;
&lt;/array&gt;


by

&lt;key&gt;ProgramArguments&lt;/key&gt;
&lt;array&gt;
    &lt;string&gt;/usr/local/opt/rstudio-server/bin/rserver&lt;/string&gt;
    &lt;string&gt;--server-daemonize=0&lt;/string&gt;
    &lt;string&gt;--auth-minimum-user-id=500&lt;/string&gt;
&lt;/array&gt;


This step is necessary because rstudio-server's default auth-minimum-user-id is 1000 and the common OS X user's first ID is 501, the second user's ID is 502 etc.
Copy a pam:

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

Launch the daemon and start rstudio:

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



Finally launch a broswer, enter localhost:8787 in the address bar and log-in with your OS X user credentials. 

To stop rstudio server enter sudo rstudio-server stop. After a reboot you have to enter sudo rstudio-server start to start it again.



If you want the rstudio-server to be launched automatically while booting, stop the server, unload the launch daemon,

sudo rstudio-server stop
sudo launchctl unload -w /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist


modify the file /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist with nano and set the RunAtLoad key from false to true. Finally load the launch daemon again:

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