Dave Stanton PhD

The Minimal Setup for Coding While Walking

2026-06-02

I wanted to code while walking.

Not “review a PR” or “answer a Slack message.” Actually code — think through architecture, write features, iterate with an AI pair programmer — while putting in miles with earbuds in. This is the minimal setup that makes that possible.

Why Not Just Use Claude Code’s Built-In Remote?

Claude Code has a /remote-control feature that lets you take a session on the road. You can use it. But it requires you to decide in advance that you’re going mobile. My setup is always on. I keep 10–15 named tmux sessions running at any time — one for infrastructure, one for observability, one per application I’m actively working on. When inspiration hits, or someone emails me a quick change, I just pick up my phone and jump into whatever session I need. No pre-planning required.

What You Need

  • A Mac with Claude Code installed
  • Homebrew
  • An ngrok account (free tier works)
  • An iOS SSH client — I built one called Hermit SSH (free, open source), but any SSH client works

Step 1: Install tmux

brew install tmux

That’s it.

Step 2: Set Up ngrok for SSH

ngrok is a cloud proxy that punches a hole through your home network so your phone can reach your Mac over SSH from anywhere.

  1. Create a free account at ngrok.com
  2. Install the CLI: brew install ngrok
  3. Authenticate: ngrok config add-authtoken YOUR_TOKEN

You’ll start the actual tunnel later. For now, just get it installed.

Gotcha: System Approval Dialogs. The first time you run ngrok (and Claude Code) after installing or upgrading, macOS will prompt you to approve the app in System Settings → Privacy & Security. This requires physical access to your Mac. Plan for this — if you update ngrok or Claude Code remotely and then lose your SSH session, you’ll need to be near your machine to approve the new binary before it’ll run again.

Step 3: Generate an SSH Key Pair on Your Mac

Generate the key pair on your Mac, not in your SSH client app. This way you know the private key never left your machine until you intentionally copy it.

ssh-keygen -t ed25519 -C "phone-key"

Accept the default location (~/.ssh/id_ed25519) or choose your own. Then add the public key to your authorized keys:

cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

You’ll copy the private key (~/.ssh/id_ed25519) into your SSH client app in a later step.

Step 4: Install Hermit SSH (or Your Preferred SSH Client)

Hermit SSH is the app I built for exactly this workflow. It’s free, open source, and optimized for tmux and Claude Code sessions on a phone screen.

If you prefer a different SSH client, that’s fine — the rest of the steps are the same concept.

Step 5: Configure Your SSH Host in the App

Before you fill in the host details, you need the ngrok address and port. Start the tunnel on your Mac:

ngrok tcp 22

ngrok will display something like:

Forwarding  tcp://0.tcp.ngrok.io:12345 -> localhost:22

That hostname and port are what you’ll enter in your SSH client.

In Hermit SSH, create a new host:

Field Value
Host 0.tcp.ngrok.io (yours will vary)
Port 12345 (yours will vary)
Username your Mac username
Private Key paste contents of ~/.ssh/id_ed25519
tmux Session hello (or whatever you named yours)

That last field is why I built Hermit SSH. When you tap Connect, the app drops you directly into your named tmux session — no manual tmux attach command required. If you use a different SSH client, you’ll need to run tmux attach -t hello yourself after connecting.

Note: The ngrok TCP address changes each time you restart the tunnel on the free tier. You’ll need to update the host config in your app when it changes. A paid ngrok plan gives you a static address.

Step 6: Set Up Your tmux Sessions on Your Mac

Open a terminal and create your sessions. For this walkthrough, let’s start simple:

tmux new-session -s hello

You’re now inside a tmux session named “hello.” This name is how you’ll navigate back to it from your phone.

For reference, here’s how I personally organize my sessions:

  • infra — infrastructure and devops tasks
  • otel — my observability stack (OpenTelemetry / Watchtower)
  • One session per application I’m actively working on

You don’t need all of that. One session is enough to start.

Step 7: Start Claude Code

Inside your tmux session, start Claude Code:

claude

Approve any system dialogs that appear. Claude Code will prompt for permissions on first run — this is expected, approve them.

Step 8: Keep Your Mac Awake

Open a second terminal tab — outside your tmux session — and run:

caffeinate -id

This prevents your Mac from sleeping. If it sleeps, your ngrok tunnel dies and your phone can’t reach back.

Leaving your laptop’s display on all the time isn’t ideal for a machine you actually carry around. The cleaner version of this setup runs on a dedicated machine you leave at home — a Mac mini or a spare MacBook in a home office — that’s always plugged in, always awake, and always tunneled. That’s where this gets really good. You’re out walking, your phone reaches back to a machine that never goes idle.

For now, caffeinate -id in a second terminal tab is enough to get started.

Step 9: Connect From Your Phone

In Hermit SSH, tap your saved host to connect. That’s it — you land directly inside your named tmux session and your Claude Code session is right there waiting.


The Voice Piece

Once you’re connected, voice-to-text is just your iPhone keyboard. Tap the microphone, speak your prompt, and it lands in Claude Code’s input. I do full architecture discussions, feature planning, and debugging this way — while walking.

How Do You Actually See What You Built?

Fair question — if you’re walking around dictating to Claude Code, at some point you want to look at the thing it’s making.

A few options:

  • Another ngrok tunnel to your dev server. A cheap paid ngrok plan gives you HTTPS tunnels you can spin up on demand to expose localhost:3000 (or whatever port your app runs on), look at the work in your phone’s browser, then shut the tunnel back down for security when you’re done. Reserved domains make this less painful than the free tier.
  • Push to a preview environment. Set up GitHub Actions, the gcloud CLI, or whatever you like to auto-deploy your branch to a preview URL on every push. Same idea as Vercel previews, just wired to Heroku, Cloud Run, Render, or wherever your stack lives. The trip from “Claude wrote the code” to “I can see it on my phone” is git push plus a coffee.
  • Don’t look at it yet. Lots of work — refactors, infrastructure, backend changes — has no UI to look at. Tests pass, commit goes up, move on.

Quick Reference

# On your Mac — start everything
tmux new-session -s hello    # or attach: tmux attach -t hello
claude                        # start Claude Code inside tmux
ngrok tcp 22                  # in a second tab — start the SSH tunnel
caffeinate -id                # in a third tab — keep the Mac awake

# On your phone
# → Connect via SSH client → tmux attach -t hello

What’s Next

This is the minimal setup. Once you’re comfortable:

  • Named sessions for everything — give each project its own session so you can context-switch instantly
  • Static ngrok address — upgrade to a paid plan so your host config never changes
  • Persistent sessions — tmux keeps your session alive even if you disconnect; reconnect from anywhere and pick up exactly where you left off
  • Always-on machine — move the whole setup to a dedicated Mac mini or a spare MacBook you leave in a home office. Add launch control lists to start tmux, Claude Code, and ngrok automatically on boot, plus a watchdog that auto-repairs the tunnel if it drops. I rarely have to touch the machine in my office.

Don’t worry about any of that at the start. Just get tmux, Claude Code, ngrok, and caffeinate running, then connect from your phone. The first time you push a commit from a park bench mid-walk, you’ll wonder why you ever needed a desk.