Work from anywhere.
Compute at home.
Stay connected from an iPhone to the Mac mini at home and develop there. What you wrote at the cafe resumes exactly where you left it when you get back. Here's how the trick works, step by step.
First: where is everything actually happening?
The phone in your hand is just a window. The real work keeps running inside the Mac mini at home. mosh is the road between the two; tmux is what keeps the work alive inside the house.
mosh and tmux do different jobs.
They get mixed up all the time, but one protects the connection and the other protects the session. Only together do they let you resume from anywhere.
A remote shell you use instead of SSH. Because it runs on UDP, it survives dropped lines, Wi-Fi switches, and IP changes — resuming automatically while keeping your session.
Local echo means your keystrokes appear instantly even on painfully slow connections. It just feels fast.
- Stays connected when the subway kills your signal
- Switch from tethering to Wi-Fi — still fine
- Wake from sleep — still connected
A terminal multiplexer. It creates a 'session' container inside the Mac mini and runs nvim or npm run dev inside it. When the client disconnects, the session itself keeps running.
Later, tmux attach from any device drops you back into the same screen. Windows and splits are preserved as-is.
- Close the iPhone — the work keeps running
- Rejoin the same screen from the desk Mac
- Leave a long build unattended, safely
つまり ── mosh keeps the road between your phone and the Mac mini from breaking, and tmux keeps the work inside the Mac mini from disappearing. Combine them and every device you pick up rejoins the same session that never stopped.
mosh guards the connection,
tmux guards the session.
The line drops, the screen closes — the work stays right there
Open the iPhone. The Mac mini at home is right there.
Set the iced coffee down, pull the iPhone out of a pocket. Connect to the Mac mini at home with mosh.
Then tmux attach. The nvim I thought I closed at 11pm last night is still blinking at line 142. Nothing was lost.
Even with no signal, the session doesn't die.
Get on the subway. The signal disappears. Regular SSH would drop instantly — and reconnecting wouldn't bring the old screen back.
mosh runs on UDP, so it doesn't panic when the line dies. Back above ground, even with a new IP address, it reconnects on its own. The tmux session has been running on the Mac mini the whole time — your screen just has to catch up.
- 14:08mosh connect at the cafe / tmux attach
- 14:32Subway — iPhone goes into the pocket
- 14:33No signal — mosh goes into standby
- 14:51Above ground, new IP, Wi-Fi switch
- 14:51Auto-reconnect — nvim, still at line 142
Sit down at the desk. The next line is waiting.
Get home, open the Mac mini's terminal, and attach to the same tmux session. The screen you were poking at on the iPhone spreads out across 27 inches.
It's not "write outside, continue at home."
It's "one session that kept running across devices the whole time." That's all.
Location stops constraining development.
Same philosophy as a Chromebook + GPU box: keep the hand light, keep the compute at home. The difference — this one happens inside your pocket.
# on the Mac mini brew install mosh tmux tmux new -s work # on the iPhone / iPad / Chromebook mosh mac-mini.local tmux attach -t work
