Back to Blog
TutorialFebruary 2, 202612 min

Mac Mini AI Server Setup with OpenClaw

Run your personal AI assistant 24/7 on a Mac Mini. Complete setup guide for OpenClaw, formerly known as Clawdbot and MoltBot.

mac miniself-hostedopenclawclawdbotmoltbot

Molted Team

Molted.cloud

The Mac Mini sits quietly on your desk, drawing barely 7 watts at idle. Yet inside that aluminum shell lives an M-series chip capable of running large language models locally. For anyone tired of API rate limits, privacy concerns, or monthly bills that scale with usage, turning a Mac Mini into a dedicated AI server makes a lot of sense.

OpenClaw (formerly known as Clawdbot and MoltBot) is an open-source personal AI assistant that connects to Claude or OpenAI and works across WhatsApp, Discord, Telegram, and Slack. Running it on your own hardware means your conversations stay on your network, you control the uptime, and you pay only for the API calls you actually make.

Why the Mac Mini works for this

Apple Silicon changed the game for local AI workloads. The unified memory architecture means the GPU and CPU share the same RAM pool, which is exactly what you want when loading model weights. An M2 Mac Mini with 16GB handles OpenClaw beautifully, and the M4 models with 24GB or 32GB give you headroom for local models too.

Power consumption matters when something runs 24/7. A Mac Mini pulls 5-10W at idle and maybe 30W under load. Compare that to a gaming PC repurposed as a server, which idles at 80-150W. Over a year, that difference adds up to real money on your electric bill.

The form factor helps too. No fan noise at idle, small footprint, and macOS handles sleep/wake gracefully if you want to save power during off-hours.

Hardware requirements

  • Mac Mini M1/M2/M4 - Any Apple Silicon model works. M1 is the minimum, M2 or M4 recommended.
  • 16GB RAM minimum - OpenClaw itself is lightweight, but you want headroom. 24GB+ if you plan to run local models alongside.
  • 256GB storage minimum - OpenClaw needs maybe 2GB, but logs and Docker images add up.
  • Ethernet connection - WiFi works but wired is more reliable for a server.
  • Static IP or dynamic DNS - If you want to access it outside your network.

Software prerequisites

Before installing OpenClaw, you need a few things set up on your Mac Mini.

Install Homebrew

Homebrew is the package manager for macOS. Open Terminal and run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Follow the prompts. After installation, add Homebrew to your PATH if the installer tells you to.

Install Docker Desktop

OpenClaw runs in a Docker container, which makes updates and isolation simple.

brew install --cask docker

Launch Docker Desktop from Applications. On first run, it asks for permissions. Grant them and wait for Docker to start (you will see the whale icon in your menu bar).

Install Git

brew install git

Installing OpenClaw

With the prerequisites in place, the actual installation takes about five minutes. OpenClaw now offers a streamlined installer that handles everything.

Option 1: npm install (recommended)

The simplest method uses npm to install OpenClaw globally:

npm install -g openclaw@latest
openclaw onboard --install-daemon

The onboard wizard walks you through API key setup, channel configuration, and starts the daemon automatically.

Option 2: Docker setup

If you prefer containerized deployment:

cd ~
git clone https://github.com/openclaw/openclaw.git
cd openclaw
./docker-setup.sh

The setup script builds the image, runs the onboarding wizard, and starts the gateway. After completion, OpenClaw runs at http://127.0.0.1:18789/.

Link WhatsApp

Connect your WhatsApp account using the channels CLI:

openclaw channels login

For Docker installations:

docker compose run --rm openclaw-cli channels login

Scan the QR code with WhatsApp on your phone (Settings → Linked Devices → Link a Device). Once linked, you can message your own number and OpenClaw responds.

Skip the hassle?

Molted deploys OpenClaw for you in 60 seconds. No Docker, no config.

Start free trial

API key configuration

The onboard wizard handles API key setup interactively. If you need to reconfigure later, edit your OpenClaw config file (usually at ~/.config/openclaw/config.json5).

Important: You don't necessarily need an API key. If you have a Claude Pro, ChatGPT Plus, or Gemini Advanced subscription, you can use your subscription token instead. This is often much cheaper than pay-as-you-go API pricing—you're already paying $20/month, why pay $100+ more for API access?

Anthropic (Claude)

Get your API key from console.anthropic.com, or use your Claude Pro/Max subscription token. Claude is the recommended model for OpenClaw because of its strong instruction-following and 200K context window.

In your config file, set the model:

{
  agents: {
    defaults: {
      model: { primary: "anthropic/claude-sonnet-4-20250514" }
    }
  }
}

OpenAI (GPT-4)

If you prefer OpenAI, get your key from platform.openai.com:

{
  agents: {
    defaults: {
      model: { primary: "openai/gpt-4o" }
    }
  }
}

OpenClaw supports switching between providers by updating the config and restarting. Run openclaw onboard again to reconfigure interactively.

Auto-start with launchd

You want OpenClaw to survive reboots. If you used openclaw onboard --install-daemon, this is already handled - the daemon runs as a launchd service automatically.

To check if the daemon is running:

openclaw status

For Docker installations

If you used the Docker setup, you need to configure launchd manually. Create a plist file:

nano ~/Library/LaunchAgents/com.openclaw.plist

Paste this content (adjust YOUR_USERNAME):

<?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.openclaw</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/docker</string>
        <string>compose</string>
        <string>-f</string>
        <string>/Users/YOUR_USERNAME/openclaw/docker-compose.yml</string>
        <string>up</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>WorkingDirectory</key>
    <string>/Users/YOUR_USERNAME/openclaw</string>
</dict>
</plist>

Load the service:

launchctl load ~/Library/LaunchAgents/com.openclaw.plist

Now OpenClaw starts automatically when you log in. For true headless operation, enable auto-login in System Preferences → Users & Groups → Login Options.

24-hour free trial

No credit card. Full features.

Try free for 24 hours

Security configuration

Running a service at home requires some security awareness. The good news: OpenClaw does not need to be exposed to the internet if you are just using messaging platforms.

Keep port 18789 internal

OpenClaw exposes a web interface on port 18789 for configuration. This should never be accessible from the internet. If your Mac Mini is behind a router (it should be), do not forward this port.

To verify, check your router is not forwarding port 18789, and optionally enable macOS firewall:

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on

Keep macOS updated

Enable automatic updates in System Preferences → Software Update. Security patches matter when something runs 24/7.

Use strong API key practices

Set usage limits on your Anthropic/OpenAI accounts. A compromised instance could burn through your API budget quickly. Both providers let you set monthly spending caps.

Monitoring and logs

Checking if OpenClaw is running:

docker compose ps

You should see the container listed as "running".

Viewing recent logs:

docker compose logs --tail 100

Following logs in real-time:

docker compose logs -f

For long-term monitoring, consider redirecting logs to a file with rotation:

docker compose logs -f >> ~/openclaw/logs/openclaw.log 2>&1 &

Common issues and fixes

Docker not starting after reboot

Docker Desktop needs to be running before the launchd job starts OpenClaw. Either enable "Start Docker Desktop when you log in" in Docker preferences, or add a delay to your plist with StartInterval.

WhatsApp disconnecting

WhatsApp Web sessions expire periodically. If you see connection errors in logs, you need to re-scan the QR code. Check logs with docker compose logs -f and look for "QR" in the output.

High memory usage

If you see memory pressure, check if old Docker images are accumulating:

docker system prune -a

This removes unused images and frees space.

Slow responses

Response time depends on the API provider, not your Mac Mini. Claude and GPT-4 responses typically take 2-10 seconds depending on length. If responses are consistently slow, check your internet connection.

When self-hosting makes sense

Running OpenClaw on your own Mac Mini gives you complete control, privacy, and no monthly hosting fees beyond API usage. But it comes with maintenance overhead: updates, monitoring, and troubleshooting when things break at 2 AM.

This setup works well if you already have a Mac Mini, enjoy tinkering with infrastructure, and want to learn how these systems work. The initial investment is your time, and the ongoing cost is electricity plus API calls.

For those who want the benefits of OpenClaw without managing infrastructure, hosted options exist. The time you spend on Docker, launchd, and security configuration is time not spent using the AI assistant you are building.

Free 24-hour trial

Ready to try OpenClaw?

Deploy in 60 seconds. We handle uptime, security, and updates.

Start free trial

24-hour free trial · No credit card required · Cancel anytime

Ready to try OpenClaw?

Deploy your AI personal assistant in 60 seconds. No coding required.

Start free trial

24-hour free trial · No credit card required