Claude Code over Tailscale

The common way to reach Claude Code on an always-on computer at home is Tailscale, an SSH app and tmux. How that setup works, what it leaves to you, and an EnvHaven workspace that is reachable from anywhere without it.

Updated November 23, 2026

Claude Code runs where it is installed, and most people install it on the computer in front of them. To keep it working while they are out, they leave a computer on at home, often a Mac mini, and reach it from a phone. Tailscale is the usual way in. It joins the home computer and the phone into one private network over encrypted connections that work without opening ports (Tailscale), so an SSH app reaches the computer from anywhere while nothing at home faces the internet (Tailscale).

The setup at home

  1. An always-on computer with Claude Code, installed, signed in and set never to sleep. Do you need a Mac mini for AI agents? covers the Mac side, sleep settings included.
  2. Tailscale on the computer and on the phone, signed in to the same account (iPhone and iPad, Android). MagicDNS, on by default in new tailnets, lets you reach the computer by its name (Tailscale).
  3. SSH on the computer. On a Mac, turn on Remote Login (Apple). On Linux, Tailscale SSH can answer SSH logins on the tailnet instead, turned on with tailscale set --ssh; its server runs on Linux and on Tailscale’s open-source command-line build for macOS (Tailscale).
  4. An SSH app on the phone, such as Termius or Blink, connecting to the computer by its tailnet name.
  5. tmux on the computer, so the session outlives the phone’s connection:
tmux new -s claude      # once, on the computer
claude
# later, from the phone, after connecting over SSH:
tmux attach -t claude

Tailscale’s Personal plan is free, for up to 6 users with unlimited devices of theirs (pricing), so the setup costs the computer and its electricity.

What the setup leaves to you

  • The computer. It has to stay awake, come back after power cuts and updates, and keep Claude Code current.
  • The keyboard. Claude Code leans on Esc, Ctrl and the arrow keys, and every SSH app handles them its own way.
  • Seeing what it builds. A dev server on the computer is reachable from the phone at the computer’s tailnet name and port, when the server listens on all interfaces.
  • One machine for everything. A second always-on agent, or a second person, shares that computer or needs another.

The same reach, without the setup

An EnvHaven workspace is an always-on Linux server that is reachable from anywhere by design, so there is no VPN to set up:

  1. Open the workspace in the phone’s browser. An SSH app works too, once your public key is added, or imported from GitHub, under Remote Access in the workspace’s EnvHaven sidebar; both land in the same tmux session. Coding agents over SSH covers Termius and Blink.
  2. Tap Launch, choose Claude Code and tap Sign in: approve the workspace on claude.ai and paste the short code the page shows, and your Claude plan works with no API key.
  3. Give it a task. Claude Code starts without permission prompts there, because the workspace is its sandbox.
  4. Lock the phone. The work continues, and when you come back the terminal’s key bar supplies Esc, Ctrl, Tab and the arrows.

What it builds is live at the workspace’s public preview URL, with HTTPS. Claude Code on iPhone walks through the phone side.

When Tailscale still helps with a workspace

  • Private apps. Apps you self-host on the workspace can live on your tailnet instead of the public internet, each at an HTTPS address only your devices can open: Keep self-hosted apps private with Tailscale.
  • Every dev server, privately. With Tailscale running in the workspace, a connection from your devices reaches the same port on it (Tailscale), so a dev server on any port opens on your phone by the workspace’s tailnet name, even one listening only on localhost.
  • Machines at home. In the same mode, the workspace reaches other machines on your tailnet through Tailscale’s SOCKS5 or HTTP proxy (Tailscale), so an agent there can talk to a server in your home.

Each of these is a request to the agent in the workspace, such as “Put this workspace on my tailnet. Follow https://envhaven.com/guides/self-host-privately-with-tailscale.md”.

Other agents

The setup at home carries Codex, OpenCode or any other terminal agent the same way. OpenClaw can put its own dashboard on your tailnet with Tailscale Serve, through its gateway.tailscale.mode setting (OpenClaw), and Hermes Agent’s docs suggest Tailscale for reaching its dashboard privately (Hermes Agent). Claude Code’s own remote option, Remote Control, needs no Tailscale: it connects over outbound HTTPS only, and the computer and the claude process have to keep running (Anthropic). In a workspace, all 17 agents are built in and signed in from the same Launch menu.