Chasing the Ultimate Remote Development Setup
Using an iPad
Although this blog covers aspects of remote development specific to the iPad, this blog is meant to serve as a journal for my experiments with remote development and can be used with any computer/server and any client device.
It’s been a year since I started as a Robotics grad student at the University of Maryland. One of the first purchases I made was an e-scooter (highly recommend) and then as any other student would, I picked up a shiny new 2022 M2 iPad Pro.
While working with an iPad is great for student tasks like note-taking, and watching content (the display is amazing) and in recent years has become a decent powerhouse due to stage manager, the iPad OS is pretty limited, because what is a computer anyway (looking at you Apple)
Now as much as I’d like to load up a dual boot with macOS or a flavor of Linux, that is not possible, so this is a blog documenting my efforts to make the iPad useful for remote development. This will be a continuous process, so feel free to reach out if you find another method and I’ll try to keep the blog up to date.
My Setup
The 2 main computers I work with are my laptop, an Acer Nitro 5 with Ubuntu 22.04, and an Nvidia Jetson Orion Nano that I’m working with for a project I’ll hopefully write about soon. I hate how bulky my laptop is and the battery life on gaming laptops is nothing to write home about.
I initially started looking for a quick way to connect to these devices to run scripts remotely. SSH is a go-to solution for accessing remote servers securely and efficiently. Whether you’re managing code on a cloud server, deploying applications, or debugging issues on a production machine, SSH allows you to connect to a remote system as if you’re sitting right in front of it by giving you terminal access.
There is a variant of SSH with x-forwarding that can be used for GUI applications but that could be covered in another blog (let me know).
iPad and Accessories
These are the accessories I got that make the iPad a decent candidate to be my primary computer: a keyboard case (recommended), and a USB C to HDMI cable (optional). I also got the Apple Pencil as it’s a lifesaver for note-taking.
Links: ZAGG — Pro Keys, USB C to HDMI cable (YMMV).
SSH Clients and Filesystems
There are many SSH clients on the iPad. Most of them are good and in theory, any app would work. The two I’ve tested are Termius and Secure Shellfish.
Secure Shellfish has a paid subscription for filesystem management (Load up an entire directory and mess with files on your host computer on the files app). I haven’t used the filesystem management on Termius, as Secure Shellfish worked well for me.
We require filesystem management to work on remote folders as that’s the only way we can edit code with text editors like Koder and Textastic (Covered below).
Both apps have pretty much the same functionality and provide terminal access and access to the filesystem over ssh.
ngrok
ngrok is a unified ingress platform that has a reverse proxy, load balancer, API gateway, firewall, delivery network, and DDoS protection in one platform. That’s all extremely fancy for developing big web applications, but for this use case, we’re just using it for its reverse proxy and tunneling capabilities.
To set up an ngrok instance on your server (Remote device)
On your host machine install ngrok here. The easiest method to install it is as a snap if your platform supports it. Then make and link your ngrok account using your authtoken from your dashboard.
$ ngrok authtoken NGROK_AUTHTOKEN
$ ngrok tcp 22
You should see a screen like the image below, keep this service active and your machine turned on and you can connect to it from any machine using the forwarding link.
Tailscale
Tailscale eliminates the need for a public-facing SSH proxy or setting up a dedicated reverse proxy like ngrok. It sets up a mesh network of all your devices no matter what network each device is on by creating something called ‘Tailnet’. It’s pretty much a VPN without a central concentrator and also takes care of the NAT traversal. The peer-to-peer mesh VPN can be set up within minutes and is extremely easy to use.
There’s an entire blog dedicated to how Tailscale works and is definitely worth a read.
First, install the Tailscale on the host machine. (Instructions for Ubuntu 22.04)
$ curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
$ curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
$ sudo apt-get update
$ sudo apt-get install tailscale
For non-linux machines, you can download Tailscale here. Connect to your tailscale network authenticate in your browser and then find your tailscale IPv4 address by running.
# Connect to your tailscale network
$ sudo tailscale up
# You can find your Tailscale IPv4 address by running:
$ tailscale ip -4
On your iPad, download the Tailscale app, log in, and connect to the Tailscale network. Use the Tailscale VPN as the address for remote SSH development.
Juno Connect
I really wanted a remote Jupyter Notebook client with which I could essentially get CUDA support working on the iPad (indirectly).
Juno Connect is a neat app that allows for editing Jupyter Notebook files running on a remote server. It supports connection via ssh and works with every previous connection method.
It does require some setup as it requires the legacy jupyter notebook but that can be installed in your python environment with,
# Install nbclassic
$ pip install nbclassic
To launch the jupyter server, run the following command on your host, preferably in a virtualenv.
# Launch nbclassic
$ jupyter nbclassic
On the iPad, set up the host using the details from any of the previous methods of connection.
And voila! We can edit PyTorch code on the iPad. Wild times.
Textastic
Textastic is a fantastic code editor where you can add a folder from your filesystem and edit it on the iPad. It has ssh terminal access and comes with a few handy tools, especially for frontend web development (Live preview).
Alas, Textastic does not directly support editing remote files and folders. It works only with the files app, although I suspect it’s a limitation imposed by the iPad’s architecture.
The workaround as mentioned earlier is to add the remote filesystem to the files app using apps like Secure Shellfish (mentioned earlier).
VSCode
At last. VSCode. There is no native vscode application at the time of writing this blog. But this is not a blog trying to be clickbait. There’s a method where we can get most of the functionality of vscode using vscode-server.
To install and setup vscode-server, use these commands
# Download and install code-server
$ curl -fsSL https://code-server.dev/install.sh | sh
# Configure code-server
$ sudo systemctl enable --now code-server@$USER
On your iPad, visit the URL based on the method of connection on port 8080
You can add it as an app to your home screen to get rid of the Safari controls and make it seem more like an app. The result is a clean vscode window with your familiar workspace.
That’s it! I hopefully keep this blog up to date and hopefully Apple makes it easier to use the iPad in versatile ways.