Claude Code on a Mac mini: set it up once, reach it from your phone
A Mac mini is a cheap way to give Claude Code a machine that never closes its lid. The setup is short. The part people get wrong is what happens after you walk away from it.
Short answer: To run Claude Code on a Mac mini, install it with the one-line command from Anthropic's docs, stop the Mac from sleeping in System Settings, turn on Remote Login, and run Claude Code inside tmux so sessions survive a dropped connection. To reach it from your phone, use an SSH app, Anthropic's Remote Control, or MightyMouse, which gives you the Mac's live screen, a trackpad, and lock-screen answers to your agent's questions.
Claude Code does not need a big machine. It needs a machine that is on, signed in, and connected to the internet. That is the whole reason people put it on a Mac mini: it sits in a corner, draws little power, and keeps working while your laptop is in your bag. This page is the setup in order, then the part nobody writes about, which is how you check on it from your phone without walking back to the desk.
What you are building
One Mac mini that stays awake, holds your code, and runs Claude Code sessions that keep going when you leave. You reach it three ways: a terminal on your phone, Anthropic's own phone and browser view of a session, or a screen-and-trackpad view of the whole Mac. Each one covers a different need, and the end of this page tells you which to pick.
Does RAM matter for Claude Code?
Less than people think, and the reason is simple. Claude Code does not run the AI model on your Mac. Anthropic's own network requirements page lists api.anthropic.com as the host for "Claude API requests", so every thought the agent has happens on Anthropic's servers. Anthropic's setup page lists the hardware requirement as "4 GB+ RAM, x64 or ARM64 processor" and macOS 13.0 or later (checked October 2026).
So RAM does not decide how smart the agent is. It decides how fast your own work runs: the compiler, the test suite, the dev server, a Docker container, the three Claude Code sessions you started at once. Pick the Mac mini by what your project needs to build and test, not by the AI. If your tests already run fine on a laptop with a given amount of memory, a mini with the same amount will do the same job. I am not going to name a magic number, because it depends entirely on your project.
Set it up: 7 steps
- Finish the first-run setup with a monitor attached. A brand-new Mac mini needs a display, keyboard and mouse once, for the setup assistant and your Apple Account. After that it can live without them. Running a Mac mini without a monitor covers what changes day to day.
- Install Claude Code. Open Terminal and run the command from Anthropic's docs:
curl -fsSL https://claude.ai/install.sh | bash. Open a new terminal window and runclaude --version. A version number means it worked. Anthropic also documentsbrew install --cask claude-codeif you prefer Homebrew, and says native installs update themselves in the background while Homebrew installs do not. - Log in. Run
claudein your project folder and follow the browser prompts. Anthropic says Claude Code needs a Pro, Max, Team, Enterprise or Console account, and that the free claude.ai plan does not include it. Do this step while you are at the mini, because the sign-in opens a browser. - Stop it sleeping. On the mini, open System Settings, click Energy in the sidebar, and turn on "Prevent automatic sleeping when the display is off", as Apple's sleep and wake page describes. Turn on "Wake for network access" there too. In Terminal,
pmset -gprints the power settings macOS is actually using right now, which is the quick way to confirm your change stuck. - Turn on Remote Login. Go to System Settings, General, Sharing, and switch on Remote Login. Apple's Remote Login page shows the exact
ssh username@hostnameline under the switch. Choose "Allow access for" and pick only your own account. SSH from your iPhone to your Mac walks through the phone side. - Install tmux and run Claude Code inside it. Run
brew install tmux, thentmux new -s claude, thenclaude. Detach with Ctrl-b then d, and come back later withtmux attach -t claude. The session keeps running when your SSH connection drops, which on a phone is constantly. - Sign the mini in to GitHub. GitHub's own docs recommend GitHub CLI or Git Credential Manager to remember your credentials over HTTPS. With GitHub CLI, run
gh auth loginand follow the prompts. Do it once at the mini. Otherwise the first time Claude Code tries to push, it stops and waits for a login you cannot see.
That is a working box. Everything below is about the one thing that makes it useful: knowing what it is doing when you are not in the room.
Three ways to reach it from your phone
These are not rivals. They answer different questions, and plenty of people use two of them.
1. An SSH app: the terminal, exactly as it is
Any SSH app on your phone can run ssh you@your-mini and then tmux attach -t claude. You get the real terminal with the real output, which is the closest thing to sitting at the mini. The costs: typing on a phone keyboard into a terminal is slow, and away from home you need a way to reach the mini at all, such as a VPN. If you go this route, our SSH page covers it end to end.
2. Anthropic's Remote Control: the session, in the Claude app
Remote Control is Anthropic's own feature. In your project folder, run claude remote-control. It prints a session URL, and pressing the spacebar shows a QR code you scan with your phone. You then continue that session from claude.ai/code or the Claude app. Anthropic's Remote Control docs say the session "run[s] directly on your machine", the phone is "a window into that local session", and "your computer has to stay on and the claude process has to keep running" (checked October 2026). That last line is why the Mac mini and Remote Control fit so well together.
The limits are in the same docs. It works on Pro, Max, Team and Enterprise plans, API keys are not supported, and it does not work if you route Claude Code through Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, or a custom gateway. It also only shows you Claude Code sessions. If you want to see the Mac itself, you need something else. Claude Code on iPhone compares the options, and our Claude Remote Control comparison goes deeper.
3. MightyMouse: the Mac's screen, a trackpad, and answers on your lock screen
MightyMouse turns your iPhone into a live screen, trackpad, keyboard and microphone for your Mac. You install the Mac app on the mini, scan a QR code from Settings, and a control page opens in iPhone Safari. There is no app to install on the phone for that part. For a coding box this gives you two things the other options do not.
- The whole Mac, not one session. You see the actual desktop, so you can read a failing build in a window, dismiss a macOS dialog that is blocking Claude Code, or open a file the agent mentioned. You steer it with a real trackpad and keyboard.
- Your agent's questions on the lock screen. The MightyMouse agent relay lets Claude Code send you a notification, ask a question, or ask for approval. These arrive as push notifications on your iPhone, and you answer without opening anything. An approval nobody answers before the timeout counts as a no, and an unanswered question comes back to the agent as timed out. Claude Code notifications on your phone and approving an agent from the lock screen cover the setup.
- Away Mode. Once you switch it on in MightyMouse Settings, then while your phone is connected, Away Mode stops the Mac from arming its password screen and, once the Mac has sat idle, puts a black cover over every display, so a screen you left on is not readable to anyone walking past. If someone touches the Mac, Away Mode ends and the normal lock comes back. Your phone still sees the live desktop underneath. The cover is a privacy screen, not a security lock, and someone sitting at the machine can get past it.
On your own Wi-Fi, phone control is free and unlimited. Away from home it runs over a connection the Mac opens for itself, with no router settings to change, and that has a free monthly allowance before it costs anything. More on the control side in controlling your Mac from your iPhone.
What this costs you: the honest limits
A box that is always on sounds like a box you can always reach. It is not quite that. Read these before you buy a mini for this.
- Nothing here wakes a sleeping Mac or gets past a password screen. MightyMouse cannot wake the mini, and it cannot defeat a password screen that has already come up. Away Mode prevents the screen from arming while your phone is connected. It cannot undo a lock that already happened. If the mini restarts after a power cut, it will sit at the login window until someone types the password. Waking a Mac remotely explains what actually works, and what does not.
- The agent relay is cards, not a live feed. You get discrete notifications, questions and approvals. You do not get a token-by-token tail of what Claude Code is printing. For that, use SSH with tmux, or the live screen.
- First setup needs a display. You cannot do the very first boot from a phone.
- The mirror follows one display. MightyMouse shows the Mac's main display. You cannot pick a different monitor from the phone, and only the phone can start a mirror.
- It is a Mac app. The mini has to run macOS for any of this. Remote Control and SSH have their own requirements, listed above.
- Remote Control and the agent relay need Claude Code to be running. If the process was never started or crashed, no phone feature can talk to it. That is what tmux and a quick look at the live screen are for.
Which one should you pick?
- You just want to keep a session going and send a message now and then. Remote Control. It is Anthropic's own, and it needs no extra software.
- You want the raw terminal, and you are comfortable typing commands. SSH plus tmux.
- You want to see the whole Mac, fix a stuck dialog, and answer your agent from the lock screen. MightyMouse.
- You want all of it. They do not conflict. Run Claude Code in tmux, turn on Remote Control, and keep MightyMouse on the mini for the screen and the lock-screen answers.
A quick checklist before you leave the house
- Run
pmset -gon the mini and check that sleep is not set to trigger while you are gone. - Confirm you are signed in on the mini and that Claude Code is running inside tmux.
- Test your phone connection from your own Wi-Fi first, then once from cellular, while you are still near the mini.
- Push or commit your work, so a crash does not cost you an afternoon.
- Walk away. Check back from your phone.
If you want to see how this plays out for long runs, running coding agents from your phone is the broader guide, and voice coding with Claude Code covers talking to the agent instead of typing.
See your Mac mini and answer Claude Code from your iPhone.
Free on your own network. No card to try it.
Common questions
How much RAM do I need for Claude Code on a Mac mini?
Anthropic lists 4 GB or more of RAM as the requirement. Claude Code sends requests to Anthropic's API instead of running the model on your Mac, so extra RAM helps your own builds, tests and parallel sessions rather than the AI.
How do I keep my Mac mini awake for Claude Code?
Open System Settings, click Energy, and turn on "Prevent automatic sleeping when the display is off". Turn on "Wake for network access" too. You can run pmset -g in Terminal to check the settings in use.
Can I use Claude Code on a Mac mini from my phone?
Yes. You can use an SSH app with tmux, Anthropic's Remote Control (run claude remote-control and scan the QR code), or MightyMouse for a live view of the Mac and lock-screen answers. Remote Control needs a Pro, Max, Team or Enterprise plan.
Does Claude Code keep running if I close the SSH connection?
Only if it runs inside something that outlives the connection, such as tmux. Start tmux, run claude inside it, detach with Ctrl-b then d, and reattach later with tmux attach.
Can I wake my Mac mini from my phone if it goes to sleep?
MightyMouse cannot wake a sleeping Mac or get past a password screen. The reliable fix is to stop the mini sleeping in Energy settings, so you never need to wake it.
Do I need a monitor for a Mac mini running Claude Code?
You need one for the first setup. After that, the mini can run without a monitor for SSH and Remote Control, which do not need one. To see its screen with MightyMouse, plug in a small HDMI dummy plug.
Want to see the whole mini and answer your agent without walking to the desk? MightyMouse turns your iPhone into a live screen, trackpad and lock-screen inbox for your Mac, paired in one QR scan.