Coding from Your Phone

Ten years ago, I bought an iPad so I could code while traveling.
It never worked. The setup felt clunky, the workflow awkward. Eventually, I gave up. But recently, I decided to give it another shot (with a twist). Instead of buying another tablet to become a paperweight, I first wanted to see if I could code entirely from my phone.
And to my surprise... it worked well.
With just a phone, a cheap server, and an AI coding assistant, you can set up a surprisingly powerful workflow. It’s barebones, but it gets the job done.
The Minimal Setup
Here's what you need:
- A mobile SSH terminal: I like termius on iOS. It's free to get started and supports MOSH for more advanced use cases.
- A cheap VPS: Digital Ocean has some cheap offerings where you can get 1 vCPU & 1 GiB of memory for $6/mo. You can easily upgrade to a larger machine later if needed.
- An LLM Agent: Claude Code is my current choice but alternatives such as Amp, Codex, or Gemini are equally as good.
The best part today, compared to 10 years ago, is that you have plenty of alternatives for each service. If you want to give GCP a shot, you can just use a E2 machine and maybe use Gemini CLI while you're at it.
Getting Things Ready
Once you've started your server and managed to SSH into it, you should take the steps to secure your server. There are many guides for how to do this but I find the following article a good start. In a nutshell, it's best practice to create a separate user account (that is not root) with sudo privileges, enable a basic firewall, and ensure that the local packages are up to date. If you're ever stuck with the steps or have additional questions I found ChatGPT to be an excellent resource.
Once the OS is ready and you’ve logged in with your user account, you can install Node.js using the following steps:
# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"
# Download and install Node.js:
nvm install 22
# Verify the Node.js version:
node -v # Should print "v22.18.0".
nvm current # Should print "v22.18.0".
# Verify npm version:
npm -v # Should print "10.9.3".
After you have verified that Node.js is installed correctly, all you need is to download and set up your agent. A simple install command and you're done.
npm install -g @anthropic-ai/claude-code
While connecting your Anthropic account, you won't be able to open up a browser from within the VPS but it's easy to copy the browser link from it. Once you have the link, you can use Safari to get your token to paste it back to your terminal to complete the setup.
With this step done, you have everything ready at your disposal.
Extras: Terminal Multiplexers
Because we've connected through SSH, we have a single terminal screen. Using something like tmux helps you multitask effectively without requiring additional connections. You can have a pane with Claude Code and then have another pane where you run Git commands and other shell commands. You can keep an eye on the costs by using apps like ccusage. Alternatively, you can kick off new tasks as needed.
Extras: Voice Input
Apps like Voicenotes make it very easy to dictate a prompt. I found this super effective when writing longer prompts since it gets ideas out of my head much faster. It wasn't clear to me how well it works compared to what ships with iOS until I tried.
Extras: Self-hosting
For connecting to your own machine, I recommend using something like tailscale or potentially ngrok. Tailscale supports MOSH out of the box, which is similar to SSH but offers additional features meant to improve usability for mobile users. For example, it keeps your session alive through network drops and lets you roam between Wi-Fi and cellular without disconnecting.