Skip to content
Edith

Guide

How to Run Claude Code on a Remote Server From Mac

Three ways to put Claude Code on a bigger machine and still keep an eye on it from your laptop.

Updated by

The short answer

The simplest way is to SSH into the server, start a tmux session and run claude inside it, so the agent keeps working after you disconnect. If you use the Claude desktop app, its SSH sessions do the setup for you and give you the app's interface on top. Once you have agents on more than one machine, a fleet view such as Edith's Machines and Agents extensions shows all of them, and their usage, from your Mac.

Why run Claude Code somewhere else

  • The build or test suite needs more cores, more memory or a GPU than your laptop has.
  • The code, data or database only exists on that network, or must not leave it.
  • You want the agent to keep working while the laptop sleeps or travels.
  • The target is Linux, and you want the agent to test on the real operating system.

Method 1: SSH and tmux

Free, works anywhere

A detachable session on the server

Install Claude Code on the server, sign in once, then run it inside tmux so closing your SSH connection does not kill it.

Terminal
ssh dev@build-boxtmux new -s claudecd ~/code/my-app && claudetmux attach -t claude

Press Ctrl-b then d to detach and leave it running. Later, SSH in again and tmux attach -t claude brings the session back. zellij works the same way if you prefer it.

This costs nothing and works on any Linux box or Mac you can SSH into. The catch is visibility: the agent cannot tell you it is waiting unless you are attached, and each server is one more tmux session to remember.

Method 2: SSH sessions in the Claude desktop app

The Claude desktop app can run a Code session on a remote machine while you use the app on your Mac. You add an SSH connection with a host, an optional key and a folder for worktrees, and Anthropic's desktop documentation says the app installs Claude Code on the remote machine the first time you connect. The server needs SFTP enabled and about 1 GB free in your home folder, and it can run Linux, macOS or Windows.

It is a good choice if you live in the desktop app. The docs list some limits: no browser preview pane for the remote app, merge when ready is off for those sessions, and a session can stop when its sign-in expires. It covers Claude Code only.

Method 3: keep Claude on your Mac, run the work remotely

Sometimes the agent does not need to live on the server at all, only the commands it runs. Claude Code on your laptop can run builds and tests on a server over SSH if it knows how to reach it. That is what Edith's edith-remote-work skill teaches it: find the machine, explore the project there, run builds and tests over SSH and manage containers, while Claude itself stays local. Open Plugins in Edith, press Preview on Edith Remote Work to read exactly what it tells Claude, then press Install and pick Claude Code. The arrow next to Install installs it for a single agent.

Where the do-it-yourself setup falls short

  • No overview. Three servers mean three tmux sessions and no single place that says which agent is blocked.
  • Usage disappears. Tokens spent on the server are not in any report you read on your laptop.
  • The machine itself is invisible. You only find out the disk is full or the CPU is pinned when the agent's build fails.

The Edith way: Machines, Agents and Usage together

Machines keeps a list of the computers you reach over SSH, using the OpenSSH client that ships with macOS, so your keys, agent and ~/.ssh/config work as they do in Terminal. Agents runs coding agents in herdr panes, on this Mac or on any machine in that list with herdr installed, and shows them on one board. Usage collects token and cost history from those machines and adds it to your totals.

  1. 1

    Install Machines, Agents and Usage

    Open Library in Edith's sidebar and press Install on Machines, Agents and Usage.

  2. 2

    Add the server

    In Machines, press Add machine and enter its address and username, or pick a host from your SSH config. It shows up with live CPU, memory and disk, and you can open a terminal on it from there.

  3. 3

    Start an agent on it

    On the Agents page, press New agent. Choose the agent, then the machine, then a space. Machines without herdr are dimmed and say Herdr is not installed here, so install herdr on the server first. The agent opens in a pane you can watch and type into from your Mac.

  4. 4

    See remote agents next to local ones

    The board lists both, with the machine named on each card. Edith notifies you when one needs you, finishes or hits an error.

  5. 5

    Count the server in your usage

    In Usage's settings, under Collected over SSH, tick the server and press Collect now. The first run can take a few minutes because it installs what it needs in a cache folder there. After that, the Machines picker on the Usage page shows or hides each machine in the charts.

From the terminal

The same setup as commands, for scripts:

Terminal
ed machines add build-box --host build.example.com --user deved machines exec build-box -- claude --versioned agents ls --machine build-boxed usage machines collect build-boxed skills install edith-remote-work --agent claude-code --yes

Which approach to pick

  • One server, occasional use: SSH and tmux. Free and nothing to install on your Mac.
  • You already work in the Claude desktop app: its SSH sessions.
  • The agent should stay local: Claude Code on your Mac with the edith-remote-work skill.
  • Several machines and several agents: Edith's Machines, Agents and Usage, which also cover Codex, OpenCode and other agents.

Common questions

Does Edith run Claude Code in the cloud?

No. Agents run on your own machines only: this Mac and the computers you add over SSH. For sessions on Anthropic's infrastructure, use Claude Code's cloud sessions.

Which servers does Machines support?

Macs, Linux servers and Windows PCs running an SSH server. Some features, such as service management, depend on the system.

Do I need a separate Claude plan for the server?

Claude Code on the server signs in with your account like anywhere else, and its usage counts against the same plan limits as your laptop.

Is there a mobile app?

No. Edith is a Mac app for macOS 14 or later on Apple silicon, with no iPhone app and no sync between devices.

Go further

Manage servers from your Mac covers the rest of Machines: files, Docker, port forwards and snippets. Running multiple Claude Code agents explains worktrees, and installing Claude Code skills covers the skill above. Machines, Agents and Usage come with one Edith license; see pricing.

Keep reading

One app. Every tool your Mac is missing.

Pay once · No account · 30-day refund · macOS 14+ on Apple silicon