The "Doom Coding" post put this stack on the Hacker News front page with 577 points: an old laptop, Tailscale, Claude Code and Termius, so you can code from your phone wherever you have a connection. It's a good setup. Here it is step by step, with the security settings that matter and an honest list of the upkeep.
The short answer
- Pick a Linux machine that stays on: a spare laptop, a mini PC, or a VPS.
- Install Claude Code and sign in with your Pro or Max plan.
- Install Tailscale on the machine and your phone, then close public SSH.
- Add the machine in Termius and make every login land in the same tmux session.
- Turn on Remote Control as well, so the Claude app works alongside the terminal.
What people say about it
- "I use the VPS/SSH/Tailscale combo to run Claude Code from my phone", from a recent HN thread.
- The doom-coding repo behind the 577-point post walks through the same pieces.
- A known gap, also from HN: "The one feature drawback of tailscale/tmux/termius is no file upload." Step 5 covers that.
Step 1: the machine
Any Linux box works. Create a normal user for Claude and don't run it as root. If it's a laptop that will live closed, stop it sleeping on lid close: set HandleLidSwitch=ignore in /etc/systemd/logind.conf, then sudo systemctl restart systemd-logind.
Step 2: install Claude Code and sign in
The install command from the setup docs:
curl -fsSL https://claude.ai/install.sh | bash
claudeInside Claude, run /login and choose your claude.ai subscription. There's no browser on the box, so open the printed link on your phone or laptop and paste the code back. The headless login guide has the details. The native install updates itself in the background, and claude doctor shows the last update attempt.
Step 3: Tailscale on both ends
On the machine, using the install script from Tailscale's Linux docs:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
tailscale ip -4Install the Tailscale app on your phone and sign in to the same account. The machine is now reachable from your phone by its Tailscale IP (100.x.y.z) or its MagicDNS name.
Two settings that matter:
- Key expiry. By default a device's key expires after 180 days and connections to it stop until you sign in again, per Tailscale's key expiry docs. For a box you trust, disable key expiry for it on the Machines page of the admin console. Otherwise, put a reminder in your calendar.
- Close public SSH. With
ufw, allow SSH only on the Tailscale interface:
sudo ufw allow in on tailscale0 to any port 22 proto tcp
sudo ufw deny 22/tcp
sudo ufw enableRun that from an SSH session that's already over Tailscale, so you don't lock yourself out. On a VPS, also remove port 22 from the provider's firewall. Tailscale SSH (sudo tailscale set --ssh) is an alternative that handles keys for you.
Step 4: Termius on the phone
- In Termius, generate an SSH key and add its public half to
~/.ssh/authorized_keyson the machine. - Add a host: the MagicDNS name or Tailscale IP, your username, and that key.
- On the machine, make every SSH login attach to the same tmux session. Add to
~/.bashrc:
if [ -n "$SSH_CONNECTION" ] && [ -z "$TMUX" ]; then
tmux new -A -s claude
fiNow opening the host in Termius drops you straight into the session you left, whether you were away for a minute or a week.
Phone tips:
- You'll need Esc (to interrupt Claude) and Ctrl (for
Ctrl-b dto detach). Termius has an extra key row above the keyboard for these. - If the display gets messy on a small screen, run
/tui fullscreenin Claude Code. - Add the tmux config lines from the docs so notifications pass through.
Step 5: add Remote Control
Inside the tmux session, start Claude with Remote Control:
claude --remote-controlNow the same session also shows in the Claude app under Code. Use whichever is easier at the moment: Termius for the shell, git and logs; the app for chat, tapping "yes" on permission prompts, and attaching files. Per the mobile docs, files you attach in the app are downloaded to the machine, which closes the "no file upload" gap.
Remote Control doesn't need Tailscale at all. The Remote Control docs say the session "makes outbound HTTPS requests only and never opens inbound ports". Tailscale is there for your SSH access.
The upkeep
This is the part the setup posts skip. Once it works, you own:
- OS updates.
sudo apt install unattended-upgradescovers security patches. Reboots still need you. - Reboots. tmux dies with the machine. A systemd unit can start Claude in tmux at boot.
- The Claude login. It expires. Claude Code warns three days ahead, but only when it starts, so a session that runs for weeks can miss the warning. Then it's
/loginfrom Termius. - Tailscale key expiry, unless you turned it off.
- Power and network at home. A power cut or a router restart takes the box offline until someone turns it back on.
- Disk space. Logs,
node_modulesand old worktrees add up on a small VPS.
None of it is hard. It's just yours, and it tends to come due when you're away from a keyboard.
Related guides
- A tmux alternative for keeping Claude Code running: screen, background sessions and a systemd service.
- Approve Claude Code permissions from your phone: answering prompts, and getting fewer of them.
- Claude Code Remote Control keeps disconnecting: when the app says "disconnected".
- Running Claude Code on a server: the always-on setup in general.
If you'd rather skip the setup
Podway is an always-on cloud computer for Claude Code, so there's no box to keep powered, patched and reachable. You sign in with your own Pro or Max plan and open the session from the Claude app via Remote Control. A pod never sleeps, and if the agent crashes, Podway restarts it and Remote Control reconnects. Before your Claude login expires, Podway tells you, with a one-click reconnect. On Team or Enterprise, your org Owner has to enable Remote Control first.
Your first pod is free, no card needed, and pods start at $4/month. Start a pod, or see the agent computer page.