Setting up an RStudio server for iPad access

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 [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
  • 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 -> port 8787" | sudo pfctl -ef -

    At this point you should be able to connect remotely from your iPad to


    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.

    4 thoughts on “Setting up an RStudio server for iPad access

    1. Eva

      Thanks for the very handy tutorial! I managed to make it work on the browser, but it can’t do the server exposing part. It gives me the folowing message back ” /dev/pf: Permission denied” or “No ALTQ support in kernel ALTQ related functions disabled” if i use it with the sudo command.
      Since I am not that good at working with terminal yet, would you maybe have an advice on how to deal with this and make it work?
      Thanks in advance!

      1. dirkd Post author

        Thanks Eva, and sorry for the late response. Your error message suggests that your user does not have the permission to access the network device. Did you maybe forget the “sudo” in the packet filter command?
        BTW: In the meantime I also found that docker on the mac has a simpler option via the virtual box network configuration to export ports. Let me know in case your still have that problem and I’ll extend the post with the additional receipt.

    2. Bruce L

      I ran across your solution to using Rstudio on the iPad. Here is one that I figured out that solves the mouse issue with Safari because it doesn’t use Safari.

      I setup Rstudio on Win10 with Amazon’s workspaces. The cost is reasonable at 7.95/mo and 22 cents/hr of use for the basic tier. There is an Amazon Workspaces iOS app that actually seems to be usable.

      I am not that interested in programming on my iPad. I am more interested in running programs and seeing the output. This definitely is feasible with Amazon Workspaces. But programming might actually be feasible. YMMV.

    3. dirkd Post author

      Indeed another very valid approach. I’m actually also not really programming much via the ipad, but rather run canned analysis scrips. I’m also using one central machines remotely since they have more RAM and some of my datasets are above 100 GB in RAM and loading them only once in once place can be convenient.


    Leave a Reply

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