Running Claude Code on a remote Mac: connect, log in, keep long jobs alive
The first hour after delivery usually gets stuck on three things: how to get in, how to log Claude Code in, and how to keep a long job from dying. This page gives the copy-paste version in order. Commands and login flows follow Anthropic's and Apple's official documentation, which governs if either changes.
Step one: get in (Tailscale + SSH, or screen sharing)
At handover you receive a Tailscale network invite and the machine's SSH address. Tailscale means no public IP and no port forwarding: the machine sits inside your own private network and devices connect directly.
Skipping a public IP also keeps the machine off scanners. An open port attracts brute-force attempts within days; a private tailnet is visible only to your own devices.
Install the client, sign in to the same tailnet, then:
tailscale status # confirm the machine is up, note the 100.x.x.x address
ssh admin@100.x.x.x # accept the host key, enter the password from handoverFor a graphical session use screen sharing: Finder → Go → Connect to Server, enter vnc://100.x.x.x:5900, or run open vnc://100.x.x.x:5900. macOS screen sharing over Tailscale is usually steadier than third-party remote desktop tools. SSH tunnels or a public port also work without Tailscale, but they depend more on network quality and are harder to debug.
Step two: install and log in to Claude Code
Claude Code needs Node.js 18 or newer. Machines are delivered with Node and Claude Code already installed, so you can usually skip to the login. If not:
If npm throws a permissions error, check which Node you have: global installs under /usr/local need root, Homebrew's /opt/homebrew does not. Reaching for sudo npm usually creates a worse problem than it solves.
node -v # confirm >= 18
npm i -g @anthropic-ai/claude-code # install
claude --version # verifyThere are two common ways to authenticate: run claude and follow the browser authorisation (copy the link into your own browser, sign in, paste the code back into the terminal), or set ANTHROPIC_API_KEY if you already have a key. Either way you sign in with your own account; the login step is yours to complete. Login state lives in your home directory, so reconnects and restarts usually keep it; a different system user does not share it and must authenticate again.
Step three: keep long jobs alive
A dropped SSH session kills foreground processes, which is the usual reason a run “disappears halfway”. Put the work in tmux and a disconnect only takes down your connection, not the job.
To tell whether a job is actually running, check two things: tmux ls still lists the session, and the output file you redirected to is still growing. A closed screen-sharing window is not a dead job — look at the session before restarting anything.
tmux new -s cc # new session; run claude inside it
# after reconnecting:
tmux attach -t cc # back to the same screenThe other trap is sleep. macOS tries to sleep when idle and suspends long jobs. Block it with caffeinate: run caffeinate -dimsu in the background, or wrap the job as caffeinate -i tmux new -d -s cc 'claude'. Put that in a LaunchAgent so it comes back after a reboot; an active screen-sharing session also inhibits sleep, but do not rely on it.
Step four: scheduled jobs (launchd, or cron)
For work that must run at a fixed time (daily reports, syncs, batch passes), launchd is more reliable than cron on macOS because it does not silently skip a run missed during sleep.
The difference is reliability, not syntax: cron drops a scheduled point it slept through, launchd catches up after wake. For anything that must happen once a day, use launchd. Save this plist as ~/Library/LaunchAgents/com.easycc.job.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
<key>Label</key><string>com.easycc.job</string>
<key>ProgramArguments</key>
<array>
<string>/bin/zsh</string><string>-lc</string>
<string>cd ~/work && claude -p "..." >> ~/logs/job.log 2>&1</string>
</array>
<key>StartCalendarInterval</key><dict>
<key>Hour</key><integer>3</integer><key>Minute</key><integer>0</integer>
</dict>
<key>RunAtLoad</key><false/>
</dict></plist>Load it with launchctl load -w ~/Library/LaunchAgents/com.easycc.job.plist. For simple cases crontab -e still works, but cron's PATH is minimal: write full paths for node and npm, and source ~/.zshrc or export PATH at the top of the script.
The three traps that catch almost everyone
These three cost a new user half an hour each. Knowing them in advance costs nothing.
- Different PATH: a non-interactive SSH login does not read ~/.zshrc, and npm globals live under /opt/homebrew/bin, so cron cannot find the command. Use absolute paths, or source the profile explicitly.
- EACCES on a global npm install: system Node needs elevated permissions for global packages. Homebrew or nvm installs usually do not. If you already hit it, change npm's prefix rather than reaching for sudo npm.
- The process vanishes after a disconnect: the machine did not crash, the foreground process ended with the SSH session. Use tmux or nohup; never run a long job in a bare ssh session.
Watch the timezone too: the machine runs UTC+5, so “3 a.m.” is a different moment than you think. launchd's StartCalendarInterval follows the machine's local time — print date once in the script to confirm.
Once it works, make the setup boring
After the first successful session, pin a few things down: keep projects under ~/work with one long-lived tmux session, put anything that must survive a reboot into a LaunchAgent, and send logs to ~/logs split by day. Then a reboot, a flaky network or a different laptop changes nothing about the work already running.
One thing people forget is disk headroom. Claude Code session transcripts, build artefacts and Xcode's DerivedData all grow; a 256 GB machine gets tight within a month or two of heavy use. Clearing ~/Library/Developer/Xcode/DerivedData and old build directories periodically is far cheaper than upgrading later.
Five questions about connecting and running
Do I have to use Tailscale?
The authorisation page opens in my browser at home — does that still work?
Do jobs survive a reboot?
Screen sharing feels laggy — what should I change?
Can I migrate my local Claude Code setup?
Related reading
Claude bans: what you can and cannot fix
Network factors versus account factors
ReadProxy vs cloud Mac vs residential Mac
Six dimensions, four options
ReadWhat an overseas Mac is
Forms, uses and boundaries
ReadMac mini colocation
Host the machine you already own
ReadFirst connection guide
The full delivery-day walkthrough
ReadMachine already delivered and stuck?
Your handover message contains the Tailscale invite, the SSH address and the current egress IP. Connecting, logging in and running a long job usually takes half an hour; if it does not, message us.
Tell us what you need, we reply within 12 business hours
Free to request, no payment, no passwords. We come back with a machine, a city and a price.
Prefer not to fill a form?
Message us on Telegram or WeChat for price, city and delivery time. Straight answers.
Delivery in 3–7 days after payment, 7–15 days at peak
Claude is a trademark of Anthropic. EasyCC is an independent provider, not affiliated with Anthropic. Commands shown are examples only; installation and login follow the official documentation.

