Back to Blog

OpenClaw on a Mac mini: how to run a 24/7 AI agent server

Which Mac mini to buy for an always-on OpenClaw agent, how to stop macOS sleeping, run the gateway under launchd, reach it remotely and what power costs.

Sam Okafor12 min read

This post is the decision: which Mac mini to buy for OpenClaw, what it costs to keep running, and how to reach it from anywhere. If you already have the machine and want the step-by-step install instead, go straight to the complete Mac mini setup guide.

#Which Mac mini should you buy for OpenClaw?

Buy the Mac mini with M6 and 16GB of unified memory if your agent calls cloud models. Apple's published U.S. starting price is $899 as of September 19, 2026, and the reason 16GB is enough is that the gateway spends its life waiting on a provider API rather than computing.

Buy the Mac mini with M5 Pro, whose published U.S. starting price is $1,699 with 24GB as of September 19, 2026, if you want to run models locally. The M6 tops out at 32GB of unified memory and the M5 Pro configures up to 64GB, which is the whole reason the local-model pick is the more expensive chip.

One timing note before you order. Apple announced both machines on August 25, 2026 and opened pre-orders the same day. Apple lists availability starting September 22, 2026, so check whether the configuration you want is shipping before you order.

Apple publishes starting prices in its announcement and availability on the Mac mini pages. We could not read per-configuration prices from Apple's store pages at the time of this update, so every price here is a published starting price and upgrade pricing is marked as not read rather than estimated. Check the current price on Apple's store page for the exact configuration you want.

If you already own an Apple silicon Mac mini, keep it. Apple's power page lists the 2024 M4 at 4W idle and 65W maximum, and the M4 Pro at 5W and 140W, which is the same order of magnitude as the new machines. Check the software floor against how you plan to run it. The Node-based CLI and gateway, which is the setup in this post, need the official Node 24 or Node 26 macOS binaries, and OpenClaw documents those as requiring macOS 13.5 or later. The OpenClaw.app desktop app is stricter at macOS 15.0 (Sequoia) or later, and Voice Wake and push-to-talk require macOS 26 or later.

#Hardware options compared

Prices are Apple's published U.S. starting prices as of September 19, 2026. "Price not read" means Apple lists the configuration on its tech specs and store pages, but we could not read its price at the time of this update. Model download sizes are Ollama's own figures from the qwen3.6 library page, and the sizing advice leaves headroom for macOS and the KV cache rather than matching the download size to the memory size.

ModelRAMPriceLocal models it runs comfortably
Mac mini, M616GB standardFrom $899None. The smallest qwen3.6 build, qwen3.6:27b, is an 18GB download, which does not leave room for macOS.
Mac mini, M624GB, standard on one SKUPrice not readqwen3.6:27b (18GB)
Mac mini, M632GB, the M6 maximumPrice not readqwen3.6:27b (18GB). The 23GB qwen3.6:35b fits, but 48GB leaves more room for macOS and a long context.
Mac mini, M5 Pro24GB standardFrom $1,699qwen3.6:27b (18GB)
Mac mini, M5 Pro48GB or 64GBPrice not readqwen3.6:35b (23GB), with headroom for macOS and a long context

Two more specs for the record. The M6 has a 12-core CPU and 12-core GPU. The 16GB configurations run at 153GB/s and the 24GB and 32GB configurations at 170GB/s. The M5 Pro starts at a 15-core CPU and 16-core GPU with 307GB/s of memory bandwidth and configures to 18 CPU cores and 20 GPU cores. Every Mac mini in the lineup shares the same electrical rating: 100 to 240V AC and a maximum continuous power of 155W.

Want step-by-step guides for this and more?

ClawDocx Pro includes 500+ curated prompts, setup guides, SKILL.md files, and templates — everything to make your AI agent unstoppable.

See plans & pricing

#How do you set up macOS for always-on operation?

Four settings turn a desktop into a server, and all four are documented by Apple.

Stop it sleeping. Open Apple menu > System Settings, then click Energy in the sidebar. Turn on "Prevent automatic sleeping when the display is off", which Apple describes as "Prevent your Mac from going to sleep automatically when its display is off."

Come back after a power cut. In the same Energy pane, turn on "Start up automatically after a power failure", which Apple describes as "Start up your Mac after a power interruption." Some models show a "Start up when power is connected" control instead, with the choices Never, After power failure and Always. Apple documents the Terminal equivalent as well:

bash
sudo systemsetup -setwaitforstartupafterpowerfailure seconds

Apple specifies that seconds must be 0 or a multiple of 30.

Leave "Wake for network access" on. Apple describes it as waking your Mac even in sleep "to provide access to shared resources, such as shared printers or Music playlists." A machine that never sleeps never uses it, which is exactly why it is worth leaving on: it covers the case where something puts the Mac to sleep anyway.

Log in without a keyboard. Go to System Settings > Users & Groups, choose your account from the "Automatically log in as" menu and enter the account password. This matters more than it looks. OpenClaw's gateway runs as a per-user LaunchAgent that starts at login, and Tailscale's App Store and standalone macOS variants are both documented as not running before login. Without automatic login, a reboot leaves your agent and your remote access sitting at the login window.

Apple lists the conditions under which automatic login is unavailable: "FileVault is turned on", the Mac is supervised by a profile that prohibits automatic login, or "The account is set up to use an Apple Account password to log in." Turning automatic login on therefore means giving up FileVault on that machine. Decide that deliberately, and keep the Mac mini somewhere physically controlled.

#Install OpenClaw

The documented installer for macOS is one line:

bash
curl -fsSL https://openclaw.ai/install.sh | bash

OpenClaw requires Node 24.16+ or Node 26.1+, recommends Node 26, and the installer provisions Node 26 on macOS when Node is missing. The latest release listed in the OpenClaw docs as of September 19, 2026 is v2026.9.5.

Run the wizard next. It is the documented path to a first configuration, alongside the CLI and editing the file directly:

bash
openclaw onboard

OpenClaw "reads an optional JSON5 config from ~/.openclaw/openclaw.json", and falls back to safe defaults when the file is missing. Model refs take the form provider/model, and they live under agents.defaults.model, where primary is what the agent starts on and fallbacks is an ordered list it tries when the primary is unavailable.

json5
// ~/.openclaw/openclaw.json
{
agents: {
defaults: {
model: {
primary: "anthropic/claude-sonnet-5",
fallbacks: ["anthropic/claude-haiku-4-5"],
},
},
},
}

If you bought the machine to run models locally, install Ollama first. Ollama's macOS download requires macOS 14 Sonoma or later and documents a script install:

bash
curl -fsSL https://ollama.com/install.sh | sh
ollama run qwen3.6:27b

Pin the tag. Ollama's default qwen3.6 tag is the 23GB build, not the 18GB 27b one.

Then point OpenClaw at it with a provider block:

json5
{
models: {
providers: {
ollama: {
baseUrl: "http://127.0.0.1:11434",
apiKey: "ollama-local",
api: "ollama",
models: [
{ id: "qwen3.6:27b", name: "Qwen3.6 27B" },
],
},
},
},
agents: {
defaults: {
model: {
primary: "ollama/qwen3.6:27b",
fallbacks: ["anthropic/claude-haiku-4-5"],
},
},
},
}

Two details the OpenClaw docs are explicit about. On the baseUrl, the docs say "Do not add /v1. That path selects OpenAI-compatible mode, where tool calling is not reliable." The base URL above is Ollama's default local endpoint; the docs' own examples use a remote host. And apiKey: "ollama-local" is the placeholder the docs use; you can omit it when OLLAMA_API_KEY is set, because OpenClaw fills it in for availability checks. The gateway enforces strict schema validation and refuses to start when the config does not match the schema, so a typo here shows up as a gateway that will not come back rather than as a silent default.

#How do you keep the gateway running after a reboot?

One command installs and starts the service:

bash
openclaw gateway install

On macOS that writes a per-user LaunchAgent. The label is ai.openclaw.gateway for the default profile, or ai.openclaw.<profile> for a named profile, and the plist lands at ~/Library/LaunchAgents/ai.openclaw.gateway.plist. The docs describe what you get from it: "Launchd provides auto-start at login, crash restarts, and one predictable log location without tying the Gateway lifetime to the app process." OpenClaw installs and manages a per-user LaunchAgent and does not install or manage system LaunchDaemons.

The install writes LaunchAgent plists with mode 0644, while "Secrets stay in the generated owner-only environment file (0600), loaded through an owner-only wrapper (0700)." Your provider keys are not sitting in a world-readable plist.

After a reboot, one command tells you whether the agent came back:

bash
openclaw gateway status

A healthy baseline reports Runtime: running, Connectivity probe: ok and a matching Capability line. When it does not, the docs point at three deeper checks:

bash
openclaw gateway status --deep
openclaw doctor
openclaw logs --follow

Use openclaw gateway restart when you need a restart. The docs are direct about this: "Do not chain openclaw gateway stop and openclaw gateway start as a restart substitute."

If you also run the OpenClaw macOS app, it owns LaunchAgent install and update for the default profile in Local mode, and quitting the app does not stop the gateway because launchd keeps it alive. Do not go hunting for a process to kill when you close the window.

#How do you reach the Mac mini from anywhere?

Put the Mac mini on a tailnet and drive it over ssh. Tailscale documents three macOS variants, and the differences decide the design of this section. Only the open source variant, the tailscale plus tailscaled CLI build, is marked in Tailscale's comparison table as able to "Run before login" and as able to be a Tailscale SSH server. The App Store and standalone builds are marked no on both. Tailscale's install page points macOS users at the standalone variant.

So on a normal Mac mini, use Tailscale for the network and macOS Remote Login for the shell.

First, turn on Remote Login. Choose Apple menu > System Settings, click General in the sidebar, then click Sharing, and turn on Remote Login. Apple's page notes that this gives access "using SSH (Secure Shell Protocol) or SFTP (SSH File Transfer Protocol)", lets you choose "All users" or "Only these users", and warns plainly that "Allowing remote login to your Mac can make it less secure." Choose "Only these users" and add one account.

Second, install Tailscale on the Mac mini and on your laptop or phone, and sign both into the same tailnet. MagicDNS then gives the machine a name: Tailscale documents that "Tailnets created on or after October 20, 2022 have MagicDNS enabled by default", registering names of the form machine.tailnet-name.ts.net.

Third, connect by name from anywhere on the tailnet:

bash
ssh youruser@mac-mini

Use SSH keys rather than a password for that account. Copy your public key to the Mac mini with ssh-copy-id youruser@mac-mini before you rely on remote access, confirm a key-based login works, and remember that Remote Login accepts connections from your local network too, not only from the tailnet.

Where the tailscale CLI lives depends on which variant you installed, which is worth knowing the first time it is not on your PATH. Tailscale documents /usr/local/bin/tailscale for the standalone variant once you install its CLI integration, and the binary inside the app bundle for the App Store variant:

bash
# standalone variant, after installing the CLI launcher
/usr/local/bin/tailscale status
# App Store variant
/Applications/Tailscale.app/Contents/MacOS/Tailscale status

If you specifically want Tailscale SSH, with its key distribution and tailnet policy rules instead of macOS accounts, the enabling command is tailscale set --ssh on the destination device, and it needs the open source tailscaled build on macOS. That is a deliberate trade of the GUI app for a CLI-only install.

#What does it cost to run 24/7?

Apple's product environmental report for the Mac mini introduced August 25, 2026 gives three measured figures, identical at 100V, 115V and 230V: 0.19W off, 0.7W asleep, and 3.0W idle with the display on. Apple defines that idle state as the system on and finished loading macOS, connected to Ethernet. Apple's tech specs separately list a maximum continuous power of 155W.

For the electricity price, use the U.S. average residential rate of 18.34 cents per kWh, which EIA reported for June 2026 in Electric Power Monthly, Table 5.6.A.

At idle, running 24 hours a day for 30 days:

3.0 W x 24 h x 30 days = 2,160 Wh = 2.16 kWh
2.16 kWh x $0.1834 = $0.40 per month
3.0 W x 24 h x 365 days = 26.28 kWh x $0.1834 = $4.82 per year

At Apple's listed maximum continuous power, for the same 30 days:

155 W x 24 h x 30 days = 111,600 Wh = 111.6 kWh
111.6 kWh x $0.1834 = $20.47 per month

So the monthly range is about $0.40 to $20.47, and the top of it is a ceiling rather than a forecast. 155W is Apple's electrical rating, not a measured agent workload, and nothing holds a Mac mini at maximum draw around the clock. A gateway that calls cloud models sits close to the idle figure, so budget near the bottom. A machine generating tokens locally spends real time above idle, and we found no published measurement of sustained local inference draw on the M6 or M5 Pro, so treat the middle of that range as unmeasured rather than estimated.

Two adjustments to make for yourself. 18.34 cents is a national average and EIA's table breaks the same month out by state, so check your own bill. And the Energy pane offers Low Power Mode, which Apple describes as reducing energy usage for computers that are always on, such as those used as servers, along with fan noise.

Frequently asked questions

Is a Mac mini good for running OpenClaw?
Yes, and it is close to ideal for an agent that calls cloud models. It is built to sit on a desk and stay on, Apple's product environmental report for the Mac mini introduced August 25, 2026 measures 3.0W at idle with the display on, and at the U.S. average residential rate EIA reported for June 2026 that is about $0.40 a month of electricity. The gateway runs under launchd, so it comes back after a reboot once automatic login is on, because the LaunchAgent is per-user and starts at login. It is not required, though: OpenClaw's install page lists macOS, Linux and Windows as supported, so a cheap Linux VPS does the same job with no hardware to buy.
Which Mac mini should I buy for OpenClaw?
For an agent that calls cloud models, the Mac mini with M6 and 16GB of unified memory is enough, and Apple's published U.S. starting price is $899 as of September 19, 2026. For running models locally, buy the Mac mini with M5 Pro, which starts at $1,699 with 24GB as of September 19, 2026 and is the only Mac mini that configures up to 64GB. Both went on pre-order on August 25, 2026 and Apple lists availability starting September 22, 2026.
How much RAM does a Mac mini need for OpenClaw?
16GB is enough if OpenClaw talks to a provider API, because the gateway spends its time waiting on the network rather than computing. Local models set the real floor: Ollama lists qwen3.6:27b as an 18GB download and qwen3.6:35b as 23GB, so 24GB is the practical minimum for the 27b build and 48GB or more leaves the 35b build room for macOS and a long KV cache.
How much does it cost to run a Mac mini 24/7?
Apple's product environmental report for the Mac mini introduced August 25, 2026 measures 3.0W at idle with the display on. At 3.0W for 24 hours across 30 days that is 2.16 kWh, and at the U.S. average residential price of 18.34 cents per kWh that EIA reported for June 2026, about $0.40 a month or $4.82 a year. Apple's tech specs list a maximum continuous power of 155W, which works out to $20.47 a month as a ceiling no agent workload actually sustains.
How do I access my Mac mini OpenClaw server remotely?
Install Tailscale on the Mac mini and on your laptop or phone, then turn on Remote Login in System Settings under General and Sharing and connect with ssh over the tailnet. Tailscale enables MagicDNS by default for tailnets created on or after October 20, 2022, so the machine answers to its name. Tailscale's own SSH server component does not run on the App Store or standalone macOS builds, only on Linux and the open source tailscaled variant, so use macOS Remote Login for the shell.
How do I keep the OpenClaw gateway running after a reboot?
Run openclaw gateway install, which on macOS writes a per-user LaunchAgent labelled ai.openclaw.gateway at ~/Library/LaunchAgents/ai.openclaw.gateway.plist. The OpenClaw docs describe launchd as providing auto-start at login, crash restarts and one predictable log location. Because it is a per-user agent that starts at login, turn on automatic login too, then check openclaw gateway status after a reboot.

Sources

  1. Apple Newsroom: Apple unveils a more powerful Mac mini featuring the all-new M6 and M5 Pro
  2. Mac mini technical specifications
  3. Buy Mac mini
  4. Mac mini Product Environmental Report, August 2026
  5. Apple Support: Mac mini power consumption and thermal output (BTU) information
  6. Apple Support: Change Energy settings on a Mac desktop computer
  7. Apple Support: How to log in automatically to a Mac user account
  8. Apple Support: Restart computers using Terminal on Mac
  9. Apple Support: Allow a remote computer to access your Mac
  10. OpenClaw: Install
  11. OpenClaw: Gateway runbook
  12. OpenClaw: Configuration
  13. OpenClaw: Gateway on macOS
  14. OpenClaw: macOS app
  15. OpenClaw: Daemon
  16. OpenClaw: Models CLI
  17. OpenClaw: Ollama configuration
  18. OpenClaw: v2026.9.5
  19. Qwen3.6 in the Ollama library
  20. Download Ollama for macOS
  21. EIA Electric Power Monthly, Table 5.6.A: average price of electricity to ultimate customers
  22. Tailscale: three ways to run Tailscale on macOS
  23. Tailscale: install on macOS
  24. Tailscale: Tailscale SSH
  25. Tailscale: MagicDNS
  26. Tailscale: CLI

Get the full experience with ClawDocx Pro

Access 500+ prompts, step-by-step guides, SKILL.md files, and more. Everything you need to master OpenClaw.

Start Free Trial

Related Posts