Sometimes it can be convenient to run RStudio remotely from an iPad or another machine with little RAM or disk space. This can be done quite easily using the free RStudio Server on OSX via docker. To do this:
-
Find the rocker/rstudio image on docker hub and follow the setup steps here at github.
-
Once the image is running, you should be able to connect with Safari on the host Mac to the login page eg at
open http://192.168.99.100:8787
Now there is is only a small last step needed. You need to expose the server port from the host on the local network using the OSX firewall. In the somewhat explicit language of the “new” OSX firewall this can be done using:
$ echo "rdr pass inet proto tcp from any to any port 8787 -> 127.0.0.1 port 8787" | sudo pfctl -ef -
At this point you should be able to connect remotely from your iPad to
http://<main-mac-ip-or-name>:8787
and continue your R session where you left it before eg on your main machine.
BTW: If your network can not be trusted then you should probably change the default login credentials as described in the image docs.