How to Run Claude Code from Your Phone with Twingate, Termius, and tmux

Emily Lehman

Director of Product Marketing

Mar 5, 2026

Use Twingate to securely SSH into your Mac from your phone and run Claude Code sessions remotely. Full walkthrough with tmux for persistent sessions and Termius as the mobile SSH client.

Claude Code is a powerful CLI tool, but it runs on your Mac. Your Mac is at home, or in your office, or wherever you left it. You are not.

The Claude iOS app exists, but it can't access your filesystem, your Git repos, your test runners, or your local toolchain. It's a chat interface, not a development environment. If you want to run Claude Code for real work from your phone, you need to SSH into the machine where your code lives.

The problem is obvious: exposing SSH to the public internet is a terrible idea. Port 22 sitting open, protected by nothing but a password or key pair, reachable by every scanner on the planet. You know this. We know this.

The solution is straightforward. Keep SSH locked down with no inbound ports exposed, use Twingate to create a private network path from your phone to your Mac, and use tmux to keep your Claude Code sessions alive between connections.

Here's the full setup.

What You Need

Before you start, make sure you have:

  • A Mac running Claude Code (or any machine you want to SSH into)

  • An iPhone (or iPad, or Android device)

  • A Twingate account (free for up to 5 users)

  • Termius installed on your phone (free tier works fine)

  • Homebrew installed on your Mac

Step 1: Enable SSH on Your Mac

Open System Settings, go to General, then Sharing, and turn on Remote Login. This enables the SSH server on your Mac.

Note that Remote Login only listens on your local network interfaces by default. With Twingate, your phone connects through a private encrypted tunnel, so your Mac's SSH port is never exposed to the public internet.

Step 2: Set Up Twingate

If you don't already have Twingate running, the setup takes a few minutes:

  1. Sign up for Twingate (it's free!) and create a Remote Network

  2. Deploy a Connector on your local network (this can run on your Mac, a Raspberry Pi, a NAS, or a Docker container on any machine)

  3. Add your Mac as a Resource in the Twingate admin console using its local IP address

  4. Install the Twingate Client on your iPhone from the App Store

  5. Authenticate and connect

Once Twingate is active, your phone can reach your Mac's SSH port through an encrypted, identity-verified connection. No open ports. No port forwarding. No dynamic DNS.

For detailed Connector setup instructions, see the Twingate documentation.

Step 3: Install and Configure tmux

tmux is what makes this workflow practical. Without it, your Claude Code session dies every time your phone locks, your network switches, or you close Termius. With tmux, the session keeps running on your Mac and you reattach whenever you reconnect.

Install tmux via Homebrew:

Create a named session for Claude Code:

tmux new -s claude -n

This creates a session called claude with a window also named claude. You can add a second window for other tasks:

tmux new-window -t claude -n

Enable mouse scrolling so you can scroll through Claude Code output on your phone's touchscreen:

echo 'set -g mouse on'

If you get disconnected, reattach with:

tmux attach -t

Your Claude Code session will be exactly where you left it.

Step 4: Set Up Termius on Your Phone

Termius is a solid mobile SSH client with a keyboard designed for terminal work. Install it from the App Store, then create a new host:

  • Host: Your Mac's Twingate Resource address (the hostname or IP you configured in the Twingate admin console)

  • Port: 22

  • Username: Your macOS username

Connect, and you'll get a terminal session on your Mac. Run tmux attach -t claude and you're in.

Navigating tmux from Your Phone

tmux keybindings can be awkward on a phone keyboard. Here are the commands you'll use most, typed directly into the terminal instead of using key chords:

List your windows:

tmux list-windows -t

Switch between windows:

tmux select-window -t claude:claude
tmux select-window -t

Detach from the session (without killing it):

Why Not Use Screen Sharing or Claude Remote Control?

You might be wondering why not just use a remote desktop app. Screen sharing over a mobile connection is painful. The UI scales badly on a phone screen, touch targets are tiny, and every interaction has latency. You're fighting the interface the entire time.

A terminal session is different. Text renders cleanly at any size. Claude Code's output is designed for a terminal. The bandwidth requirements are minimal, so it works on cellular connections without lag. And tmux means your session survives any network interruption.

Claude Code does have a built-in remote control feature, but it comes with a significant limitation: you can continue an existing session someone else started, but you can't initiate a new one. If nothing is already running on your Mac, you're stuck. That constraint makes it useful for handoffs and collaboration, but not for solo remote work where you need to spin up a session from scratch.

The Twingate and tmux approach has no such restriction. You can start a fresh Claude Code session, open new windows, navigate your project, and run commands — exactly as if you were sitting at your desk. tmux handles the persistence, so even if your phone locks or your connection drops mid-session, your work is still there when you reconnect.

Your phone becomes a lightweight terminal into a powerful backend. Claude Code runs on your Mac with full access to your filesystem, your Git repos, your test suites, and your entire toolchain. You just happen to be controlling it from the couch, the train, or a coffee shop.

The Workflow

The real power of this setup is what it enables. You can:

  • Start a Claude Code session at your desk, walk away, authenitcate with Twingate, and pick it up from your phone

  • Review pull requests and approve deployments from anywhere

  • Kick off long-running tasks (builds, test suites, data migrations) and check back later

  • Prototype ideas the moment they come to you, against your actual codebase

Pair this with Vercel or a similar platform that creates preview URLs for every branch, and you can go from idea to working preview entirely from your phone. Push the branch, Vercel builds it, review the preview URL on your phone's browser.

What You've Set Up

You now have secure, persistent access to Claude Code from your phone:

  • Twingate provides encrypted, identity-verified access to your Mac without exposing any ports to the internet

  • tmux keeps your sessions alive between connections, so you never lose context

  • Termius gives you a clean terminal interface on iOS with a keyboard built for the job

No VPN to configure. No port forwarding rules to maintain. No SSH keys to distribute across devices. Your Mac stays invisible to the internet while remaining fully accessible to you.

Get Started

For a complete walkthrough of setting up Twingate on your network, check out the Twingate documentation. The Connector deployment guide and Resource configuration pages cover everything you need.


New to Twingate? You can use Twingate for free for up to 5 users, request a personalized demo, or reach out to the team over on the Twingate subreddit.

Rapidly implement a modern Zero Trust network that is more secure and maintainable than VPNs.

/

Claude Code + Termius + tmux

How to Run Claude Code from Your Phone with Twingate, Termius, and tmux

Emily Lehman

Director of Product Marketing

Mar 5, 2026

Use Twingate to securely SSH into your Mac from your phone and run Claude Code sessions remotely. Full walkthrough with tmux for persistent sessions and Termius as the mobile SSH client.

Claude Code is a powerful CLI tool, but it runs on your Mac. Your Mac is at home, or in your office, or wherever you left it. You are not.

The Claude iOS app exists, but it can't access your filesystem, your Git repos, your test runners, or your local toolchain. It's a chat interface, not a development environment. If you want to run Claude Code for real work from your phone, you need to SSH into the machine where your code lives.

The problem is obvious: exposing SSH to the public internet is a terrible idea. Port 22 sitting open, protected by nothing but a password or key pair, reachable by every scanner on the planet. You know this. We know this.

The solution is straightforward. Keep SSH locked down with no inbound ports exposed, use Twingate to create a private network path from your phone to your Mac, and use tmux to keep your Claude Code sessions alive between connections.

Here's the full setup.

What You Need

Before you start, make sure you have:

  • A Mac running Claude Code (or any machine you want to SSH into)

  • An iPhone (or iPad, or Android device)

  • A Twingate account (free for up to 5 users)

  • Termius installed on your phone (free tier works fine)

  • Homebrew installed on your Mac

Step 1: Enable SSH on Your Mac

Open System Settings, go to General, then Sharing, and turn on Remote Login. This enables the SSH server on your Mac.

Note that Remote Login only listens on your local network interfaces by default. With Twingate, your phone connects through a private encrypted tunnel, so your Mac's SSH port is never exposed to the public internet.

Step 2: Set Up Twingate

If you don't already have Twingate running, the setup takes a few minutes:

  1. Sign up for Twingate (it's free!) and create a Remote Network

  2. Deploy a Connector on your local network (this can run on your Mac, a Raspberry Pi, a NAS, or a Docker container on any machine)

  3. Add your Mac as a Resource in the Twingate admin console using its local IP address

  4. Install the Twingate Client on your iPhone from the App Store

  5. Authenticate and connect

Once Twingate is active, your phone can reach your Mac's SSH port through an encrypted, identity-verified connection. No open ports. No port forwarding. No dynamic DNS.

For detailed Connector setup instructions, see the Twingate documentation.

Step 3: Install and Configure tmux

tmux is what makes this workflow practical. Without it, your Claude Code session dies every time your phone locks, your network switches, or you close Termius. With tmux, the session keeps running on your Mac and you reattach whenever you reconnect.

Install tmux via Homebrew:

Create a named session for Claude Code:

tmux new -s claude -n

This creates a session called claude with a window also named claude. You can add a second window for other tasks:

tmux new-window -t claude -n

Enable mouse scrolling so you can scroll through Claude Code output on your phone's touchscreen:

echo 'set -g mouse on'

If you get disconnected, reattach with:

tmux attach -t

Your Claude Code session will be exactly where you left it.

Step 4: Set Up Termius on Your Phone

Termius is a solid mobile SSH client with a keyboard designed for terminal work. Install it from the App Store, then create a new host:

  • Host: Your Mac's Twingate Resource address (the hostname or IP you configured in the Twingate admin console)

  • Port: 22

  • Username: Your macOS username

Connect, and you'll get a terminal session on your Mac. Run tmux attach -t claude and you're in.

Navigating tmux from Your Phone

tmux keybindings can be awkward on a phone keyboard. Here are the commands you'll use most, typed directly into the terminal instead of using key chords:

List your windows:

tmux list-windows -t

Switch between windows:

tmux select-window -t claude:claude
tmux select-window -t

Detach from the session (without killing it):

Why Not Use Screen Sharing or Claude Remote Control?

You might be wondering why not just use a remote desktop app. Screen sharing over a mobile connection is painful. The UI scales badly on a phone screen, touch targets are tiny, and every interaction has latency. You're fighting the interface the entire time.

A terminal session is different. Text renders cleanly at any size. Claude Code's output is designed for a terminal. The bandwidth requirements are minimal, so it works on cellular connections without lag. And tmux means your session survives any network interruption.

Claude Code does have a built-in remote control feature, but it comes with a significant limitation: you can continue an existing session someone else started, but you can't initiate a new one. If nothing is already running on your Mac, you're stuck. That constraint makes it useful for handoffs and collaboration, but not for solo remote work where you need to spin up a session from scratch.

The Twingate and tmux approach has no such restriction. You can start a fresh Claude Code session, open new windows, navigate your project, and run commands — exactly as if you were sitting at your desk. tmux handles the persistence, so even if your phone locks or your connection drops mid-session, your work is still there when you reconnect.

Your phone becomes a lightweight terminal into a powerful backend. Claude Code runs on your Mac with full access to your filesystem, your Git repos, your test suites, and your entire toolchain. You just happen to be controlling it from the couch, the train, or a coffee shop.

The Workflow

The real power of this setup is what it enables. You can:

  • Start a Claude Code session at your desk, walk away, authenitcate with Twingate, and pick it up from your phone

  • Review pull requests and approve deployments from anywhere

  • Kick off long-running tasks (builds, test suites, data migrations) and check back later

  • Prototype ideas the moment they come to you, against your actual codebase

Pair this with Vercel or a similar platform that creates preview URLs for every branch, and you can go from idea to working preview entirely from your phone. Push the branch, Vercel builds it, review the preview URL on your phone's browser.

What You've Set Up

You now have secure, persistent access to Claude Code from your phone:

  • Twingate provides encrypted, identity-verified access to your Mac without exposing any ports to the internet

  • tmux keeps your sessions alive between connections, so you never lose context

  • Termius gives you a clean terminal interface on iOS with a keyboard built for the job

No VPN to configure. No port forwarding rules to maintain. No SSH keys to distribute across devices. Your Mac stays invisible to the internet while remaining fully accessible to you.

Get Started

For a complete walkthrough of setting up Twingate on your network, check out the Twingate documentation. The Connector deployment guide and Resource configuration pages cover everything you need.


New to Twingate? You can use Twingate for free for up to 5 users, request a personalized demo, or reach out to the team over on the Twingate subreddit.

Rapidly implement a modern Zero Trust network that is more secure and maintainable than VPNs.

How to Run Claude Code from Your Phone with Twingate, Termius, and tmux

Emily Lehman

Director of Product Marketing

Mar 5, 2026

Use Twingate to securely SSH into your Mac from your phone and run Claude Code sessions remotely. Full walkthrough with tmux for persistent sessions and Termius as the mobile SSH client.

Claude Code is a powerful CLI tool, but it runs on your Mac. Your Mac is at home, or in your office, or wherever you left it. You are not.

The Claude iOS app exists, but it can't access your filesystem, your Git repos, your test runners, or your local toolchain. It's a chat interface, not a development environment. If you want to run Claude Code for real work from your phone, you need to SSH into the machine where your code lives.

The problem is obvious: exposing SSH to the public internet is a terrible idea. Port 22 sitting open, protected by nothing but a password or key pair, reachable by every scanner on the planet. You know this. We know this.

The solution is straightforward. Keep SSH locked down with no inbound ports exposed, use Twingate to create a private network path from your phone to your Mac, and use tmux to keep your Claude Code sessions alive between connections.

Here's the full setup.

What You Need

Before you start, make sure you have:

  • A Mac running Claude Code (or any machine you want to SSH into)

  • An iPhone (or iPad, or Android device)

  • A Twingate account (free for up to 5 users)

  • Termius installed on your phone (free tier works fine)

  • Homebrew installed on your Mac

Step 1: Enable SSH on Your Mac

Open System Settings, go to General, then Sharing, and turn on Remote Login. This enables the SSH server on your Mac.

Note that Remote Login only listens on your local network interfaces by default. With Twingate, your phone connects through a private encrypted tunnel, so your Mac's SSH port is never exposed to the public internet.

Step 2: Set Up Twingate

If you don't already have Twingate running, the setup takes a few minutes:

  1. Sign up for Twingate (it's free!) and create a Remote Network

  2. Deploy a Connector on your local network (this can run on your Mac, a Raspberry Pi, a NAS, or a Docker container on any machine)

  3. Add your Mac as a Resource in the Twingate admin console using its local IP address

  4. Install the Twingate Client on your iPhone from the App Store

  5. Authenticate and connect

Once Twingate is active, your phone can reach your Mac's SSH port through an encrypted, identity-verified connection. No open ports. No port forwarding. No dynamic DNS.

For detailed Connector setup instructions, see the Twingate documentation.

Step 3: Install and Configure tmux

tmux is what makes this workflow practical. Without it, your Claude Code session dies every time your phone locks, your network switches, or you close Termius. With tmux, the session keeps running on your Mac and you reattach whenever you reconnect.

Install tmux via Homebrew:

Create a named session for Claude Code:

tmux new -s claude -n

This creates a session called claude with a window also named claude. You can add a second window for other tasks:

tmux new-window -t claude -n

Enable mouse scrolling so you can scroll through Claude Code output on your phone's touchscreen:

echo 'set -g mouse on'

If you get disconnected, reattach with:

tmux attach -t

Your Claude Code session will be exactly where you left it.

Step 4: Set Up Termius on Your Phone

Termius is a solid mobile SSH client with a keyboard designed for terminal work. Install it from the App Store, then create a new host:

  • Host: Your Mac's Twingate Resource address (the hostname or IP you configured in the Twingate admin console)

  • Port: 22

  • Username: Your macOS username

Connect, and you'll get a terminal session on your Mac. Run tmux attach -t claude and you're in.

Navigating tmux from Your Phone

tmux keybindings can be awkward on a phone keyboard. Here are the commands you'll use most, typed directly into the terminal instead of using key chords:

List your windows:

tmux list-windows -t

Switch between windows:

tmux select-window -t claude:claude
tmux select-window -t

Detach from the session (without killing it):

Why Not Use Screen Sharing or Claude Remote Control?

You might be wondering why not just use a remote desktop app. Screen sharing over a mobile connection is painful. The UI scales badly on a phone screen, touch targets are tiny, and every interaction has latency. You're fighting the interface the entire time.

A terminal session is different. Text renders cleanly at any size. Claude Code's output is designed for a terminal. The bandwidth requirements are minimal, so it works on cellular connections without lag. And tmux means your session survives any network interruption.

Claude Code does have a built-in remote control feature, but it comes with a significant limitation: you can continue an existing session someone else started, but you can't initiate a new one. If nothing is already running on your Mac, you're stuck. That constraint makes it useful for handoffs and collaboration, but not for solo remote work where you need to spin up a session from scratch.

The Twingate and tmux approach has no such restriction. You can start a fresh Claude Code session, open new windows, navigate your project, and run commands — exactly as if you were sitting at your desk. tmux handles the persistence, so even if your phone locks or your connection drops mid-session, your work is still there when you reconnect.

Your phone becomes a lightweight terminal into a powerful backend. Claude Code runs on your Mac with full access to your filesystem, your Git repos, your test suites, and your entire toolchain. You just happen to be controlling it from the couch, the train, or a coffee shop.

The Workflow

The real power of this setup is what it enables. You can:

  • Start a Claude Code session at your desk, walk away, authenitcate with Twingate, and pick it up from your phone

  • Review pull requests and approve deployments from anywhere

  • Kick off long-running tasks (builds, test suites, data migrations) and check back later

  • Prototype ideas the moment they come to you, against your actual codebase

Pair this with Vercel or a similar platform that creates preview URLs for every branch, and you can go from idea to working preview entirely from your phone. Push the branch, Vercel builds it, review the preview URL on your phone's browser.

What You've Set Up

You now have secure, persistent access to Claude Code from your phone:

  • Twingate provides encrypted, identity-verified access to your Mac without exposing any ports to the internet

  • tmux keeps your sessions alive between connections, so you never lose context

  • Termius gives you a clean terminal interface on iOS with a keyboard built for the job

No VPN to configure. No port forwarding rules to maintain. No SSH keys to distribute across devices. Your Mac stays invisible to the internet while remaining fully accessible to you.

Get Started

For a complete walkthrough of setting up Twingate on your network, check out the Twingate documentation. The Connector deployment guide and Resource configuration pages cover everything you need.


New to Twingate? You can use Twingate for free for up to 5 users, request a personalized demo, or reach out to the team over on the Twingate subreddit.