← Back to Skills Marketplace
aiwithabidi

Mac Mini Server

by aiwithabidi · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
366
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install mac-mini-server
Description
Set up OpenClaw on Mac Mini as always-on AI server — hardware recommendations, macOS config, Docker Desktop, launchd auto-start, Tailscale remote access, and...
README (SKILL.md)

🖥️ Mac Mini Server

Complete guide to running OpenClaw on a Mac Mini as an always-on AI server. From hardware selection to monitoring.


1. Hardware Recommendations

Mac Mini M4 (2024) — $499 base

Spec Base Upgraded
CPU 10-core 10-core
GPU 10-core 10-core
RAM 16GB 32GB (+$200)
Storage 256GB 512GB (+$200)

Best for: Personal assistant, small team, cloud API-only usage. Recommendation: Upgrade to 32GB RAM ($699 total) — worth it for Docker overhead + future local models.

Mac Mini M4 Pro — $1,399 base

Spec Base Upgraded
CPU 12-core 14-core
GPU 16-core 20-core
RAM 24GB 48GB (+$200) / 64GB (+$400)
Storage 512GB 1TB (+$200)

Best for: Local model inference (Ollama), multiple clients, heavy workloads. Recommendation: 48GB RAM ($1,599) for running 7B-13B models locally alongside OpenClaw.

Which One?

Use Case Pick Why
Cloud APIs only (Claude, GPT) M4 32GB Plenty of power, great value
Local + cloud hybrid M4 Pro 48GB Run Ollama + OpenClaw together
Multi-client server M4 Pro 64GB Headroom for multiple agents
Budget-conscious M4 16GB Works fine for single user

2. macOS Initial Setup

Disable Sleep & Energy Settings

# Prevent sleep entirely
sudo pmset -a sleep 0
sudo pmset -a disksleep 0
sudo pmset -a displaysleep 0

# Restart after power failure
sudo pmset -a autorestart 1

# Disable hibernation
sudo pmset -a hibernatemode 0

# Verify settings
pmset -g

System Settings UI path: System Settings → Energy → set all to Never.

Enable Auto-Login

  1. System Settings → Users & Groups → Automatic Login → select your user
  2. System Settings → Lock Screen → disable "Require password"

⚠️ Only do this on a physically secure machine. The Mac Mini should be in a locked location.

Disable Automatic Updates Reboots

# Prevent auto-restart for updates
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticallyInstallMacOSUpdates -bool false

Update manually on your schedule instead.

Enable Remote Access

# Enable SSH
sudo systemsetup -setremotelogin on

# Enable Screen Sharing (optional)
sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist

3. Homebrew + Docker Desktop

Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Install Docker Desktop

brew install --cask docker

# Launch Docker Desktop
open -a Docker

# Wait for Docker to start, then verify
docker --version
docker compose version

Docker Desktop Settings:

  • Resources → CPUs: leave 2 for macOS, give rest to Docker
  • Resources → Memory: leave 4GB for macOS, give rest to Docker
  • General → Start Docker Desktop when you sign in: ✅

Install Essential Tools

brew install git node pnpm tailscale jq htop

4. OpenClaw Docker Compose Setup

Clone and Build

cd ~
git clone https://github.com/openclaw/openclaw.git
cd openclaw

# Install dependencies and build
pnpm install
pnpm build

# Build Docker image
docker build -t openclaw:latest .

Configure

mkdir -p ~/.openclaw
cp openclaw.example.json ~/.openclaw/openclaw.json
nano ~/.openclaw/openclaw.json

docker-compose.yml

version: "3.8"
services:
  openclaw-gateway:
    image: openclaw:latest
    container_name: openclaw-gateway
    restart: unless-stopped
    volumes:
      - ~/.openclaw:/home/node/.openclaw
      - ./:/host/openclaw:rw
      - /var/run/docker.sock:/var/run/docker.sock
      - ~/.ssh:/home/node/.ssh:ro
    ports:
      - "127.0.0.1:3000:3000"
    environment:
      - NODE_ENV=production

⚠️ ALWAYS use 127.0.0.1: prefix on ports. Never expose to 0.0.0.0.

Launch

docker compose up -d
docker compose logs -f  # verify startup

5. Launchd Service (Auto-Start on Boot)

Create ~/Library/LaunchAgents/com.openclaw.gateway.plist:

\x3C?xml version="1.0" encoding="UTF-8"?>
\x3C!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
\x3Cplist version="1.0">
\x3Cdict>
    \x3Ckey>Label\x3C/key>
    \x3Cstring>com.openclaw.gateway\x3C/string>
    \x3Ckey>ProgramArguments\x3C/key>
    \x3Carray>
        \x3Cstring>/usr/local/bin/docker\x3C/string>
        \x3Cstring>compose\x3C/string>
        \x3Cstring>-f\x3C/string>
        \x3Cstring>/Users/YOUR_USER/openclaw/docker-compose.yml\x3C/string>
        \x3Cstring>up\x3C/string>
        \x3Cstring>-d\x3C/string>
    \x3C/array>
    \x3Ckey>RunAtLoad\x3C/key>
    \x3Ctrue/>
    \x3Ckey>KeepAlive\x3C/key>
    \x3Cfalse/>
    \x3Ckey>StartInterval\x3C/key>
    \x3Cinteger>300\x3C/integer>
    \x3Ckey>StandardOutPath\x3C/key>
    \x3Cstring>/tmp/openclaw-launchd.log\x3C/string>
    \x3Ckey>StandardErrorPath\x3C/key>
    \x3Cstring>/tmp/openclaw-launchd-err.log\x3C/string>
    \x3Ckey>EnvironmentVariables\x3C/key>
    \x3Cdict>
        \x3Ckey>PATH\x3C/key>
        \x3Cstring>/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin\x3C/string>
    \x3C/dict>
\x3C/dict>
\x3C/plist>
# Replace YOUR_USER with actual username
sed -i '' "s/YOUR_USER/$(whoami)/g" ~/Library/LaunchAgents/com.openclaw.gateway.plist

# Load the service
launchctl load ~/Library/LaunchAgents/com.openclaw.gateway.plist

# Verify
launchctl list | grep openclaw

6. Tailscale for Remote Access

# Install (already done via brew)
brew install --cask tailscale

# Or use CLI version
brew install tailscale

# Start and authenticate
sudo tailscale up

# Get your Tailscale IP
tailscale ip -4

# Enable Tailscale Serve for HTTPS
tailscale serve https / http://127.0.0.1:3000

Access from Anywhere

  • SSH: ssh [email protected]
  • OpenClaw: https://mac-mini.tail-xxxxx.ts.net
  • No port forwarding needed
  • End-to-end encrypted

Tailscale ACLs (recommended)

In the Tailscale admin console, restrict who can access the Mac Mini:

{
  "acls": [
    {"action": "accept", "src": ["your-devices"], "dst": ["mac-mini:*"]}
  ]
}

7. Telegram Bot Configuration

# 1. Create bot via @BotFather on Telegram
# 2. Get your user ID via @userinfobot
# 3. Edit config
nano ~/.openclaw/openclaw.json

Add to config:

{
  "channels": {
    "telegram": {
      "enabled": true,
      "token": "YOUR_BOT_TOKEN",
      "dmPolicy": "allowlist",
      "dmAllowlist": ["YOUR_USER_ID"]
    }
  }
}
# Restart to apply
docker compose restart

8. Port Forwarding Alternatives

If Tailscale isn't an option:

Method Pros Cons
Tailscale (recommended) Zero config, encrypted, free Requires client on each device
Cloudflare Tunnel Free, no open ports Slight latency, CF dependency
ngrok Easy setup Free tier limited, costs for production
Router port forwarding Direct access Security risk, dynamic IP issues
WireGuard Fast, self-hosted Manual setup, maintain yourself

Cloudflare Tunnel (alternative to Tailscale)

brew install cloudflared
cloudflared tunnel login
cloudflared tunnel create openclaw
cloudflared tunnel route dns openclaw agent.yourdomain.com

# Create config: ~/.cloudflared/config.yml
cat > ~/.cloudflared/config.yml \x3C\x3C EOF
tunnel: YOUR_TUNNEL_ID
credentials-file: /Users/$USER/.cloudflared/YOUR_TUNNEL_ID.json
ingress:
  - hostname: agent.yourdomain.com
    service: http://localhost:3000
  - service: http_status:404
EOF

cloudflared tunnel run openclaw

9. UPS Recommendations

A UPS prevents data corruption during power outages and gives time for graceful shutdown.

Model Capacity Runtime Price Best For
APC BE425M 425VA ~15min $55 Budget, Mac Mini only
CyberPower CP685AVRG 685VA ~20min $80 Mac Mini + router
APC BR700G 700VA ~25min $120 Mac Mini + monitor + router
CyberPower CP1500PFCLCD 1500VA ~45min $220 Full setup with margin

Recommendation: CyberPower CP685AVRG — enough for Mac Mini + router, good price-to-runtime ratio.

Auto-Shutdown on Power Loss

# macOS reads UPS status via USB automatically
# Configure in System Settings → Energy → UPS
# Set: "Shut down after using UPS battery for: 10 minutes"

10. Monitoring and Alerts

Basic Health Check Script

Save as ~/{baseDir}/scripts/health_check.sh:

#!/bin/bash
# Check if OpenClaw container is running
if ! docker ps | grep -q openclaw-gateway; then
    echo "$(date): OpenClaw container not running! Restarting..." >> /tmp/openclaw-monitor.log
    cd ~/openclaw && docker compose up -d
    # Send alert via Telegram (if bot is available on host)
    curl -s "https://api.telegram.org/botYOUR_TOKEN/sendMessage" \
      -d "chat_id=YOUR_ID&text=⚠️ OpenClaw was down. Auto-restarted."
fi

Cron-Based Monitoring

crontab -e
# Check every 5 minutes
*/5 * * * * bash ~/{baseDir}/scripts/health_check.sh

System Metrics

# Install monitoring tools
brew install htop btop

# Check resources
htop                          # Interactive process viewer
docker stats                  # Container resource usage
df -h                         # Disk space

Uptime Monitoring (External)

Consider free external monitors:


11. Cost Comparison

Mac Mini M4 32GB ($699 one-time)

Item Monthly Cost
Electricity (~15W average) ~$2
Internet (existing) $0
Tailscale Free
AI APIs $50-500
Total $52-502/mo
Year 1 (with hardware) $1,323-6,723
Year 2+ $624-6,024

VPS (Hetzner CX32 — 4 vCPU, 8GB RAM)

Item Monthly Cost
Server $15
AI APIs $50-500
Total $65-515/mo
Year 1 $780-6,180

Cloud (AWS t3.large)

Item Monthly Cost
EC2 $60
Storage $10
Bandwidth $5-20
AI APIs $50-500
Total $125-590/mo
Year 1 $1,500-7,080

Verdict

Factor Mac Mini VPS Cloud
Upfront cost $699 $0 $0
Monthly cost Lowest Low Highest
Performance Best (M4 chip) Good Good
Latency Depends on internet Consistent Consistent
Maintenance You handle Managed Managed
Local models ✅ Yes ❌ No ❌ Expensive
Break-even vs VPS ~4 years

TL;DR: Mac Mini wins if you want local model capability or plan to run 2+ years. VPS wins for simplicity and no upfront cost. Cloud is for enterprises with compliance needs.


Quick Start Checklist

  • Buy Mac Mini (M4 32GB recommended)
  • macOS setup (disable sleep, auto-login, SSH)
  • Install Homebrew, Docker, tools
  • Clone and build OpenClaw
  • Configure openclaw.json
  • docker compose up -d
  • Set up launchd auto-start
  • Install and configure Tailscale
  • Set up Telegram bot
  • Connect UPS
  • Configure health monitoring
  • Test reboot recovery

Credits

Built by M. Abidi | agxntsix.ai YouTube | GitHub Part of the AgxntSix Skill Suite for OpenClaw agents.

📅 Need help setting up OpenClaw for your business? Book a free consultation

Usage Guidance
This guide is plausible for setting up an always‑on Mac Mini server, but before following it, be aware of these high-risk items and alternatives: - Mounting /var/run/docker.sock into a container effectively gives that container root control of the host. Only do this if you trust the container image and its maintainers; prefer alternative patterns (separate containers without socket access, Docker API with restricted credentials, or a dedicated management host). - Mounting your ~/.ssh into a container exposes private SSH keys to that container. Prefer SSH agent forwarding, use a dedicated deploy key with limited scope, or avoid mounting keys into long-running containers. - The guide recommends disabling lock screens and enabling auto-login. That materially increases local physical risk; keep the device physically secure or avoid auto-login if possible. - The Homebrew installer runs a remote script (curl | bash). Verify the official source and audit the script if you are security-conscious. - Confirm the openclaw GitHub repository is legitimate and review the Dockerfile and code before building/running images that will be given access to the host. - Tailscale setup and authentication steps are not shown; ensure you follow Tailscale best practices and do not paste tokens into untrusted scripts. If you plan to proceed: test in an isolated environment first (separate user account or VM), remove unnecessary mounts, use least privilege for keys and services, bind app ports to 127.0.0.1 as the guide suggests, and audit container images and compose files before use.
Capability Analysis
Type: OpenClaw Skill Name: mac-mini-server Version: 1.0.0 The skill bundle contains instructions for an AI agent to perform high-risk system modifications on a macOS host, including enabling SSH and Screen Sharing, disabling sleep and password requirements, and setting up persistence via launchd. Most notably, the `docker-compose.yml` configuration mounts the host's Docker socket and SSH keys (`~/.ssh`) into a container, which are high-risk practices that could lead to container escape or credential exposure. While these actions are aligned with the stated purpose of configuring a dedicated Mac Mini server, the broad permissions and security-disabling commands significantly increase the host's attack surface.
Capability Assessment
Purpose & Capability
The skill's name and description match the instructions: hardware advice, macOS power settings, Homebrew/Docker, docker-compose, launchd, and Tailscale are all sensible for an always‑on Mac Mini server. However, a few choices (mounting /var/run/docker.sock and the user's ~/.ssh into the container) are powerful host-level privileges that should be justified — they can be legitimate for some self-hosted deployments but are security-sensitive.
Instruction Scope
The SKILL.md tells the user to change system power settings, enable SSH, disable password lock/auto-login, install Homebrew via a remote install script, and create a launchd service that runs docker compose. It also instructs mounting the host docker socket and ~/.ssh into the container. These are broader-than-minimal operations and allow containers to control the host or access SSH keys; they go beyond simple application setup and materially expand the attack surface.
Install Mechanism
This is instruction-only (no install spec). The guide uses the standard Homebrew install curl | bash pattern and brew cask for Docker Desktop — common but inherently involves executing a remote script. No arbitrary binaries or unknown download hosts are used, but the remote execution step should be considered a risk and verified before running.
Credentials
No environment variables or external credentials are declared, which is fine, but the instructions request access to sensitive host artifacts (read‑only mount of ~/.ssh and /var/run/docker.sock). Those give a container (or developer following the guide) potential lateral access to private keys and full host control via the Docker socket. Tailscale is listed as an installed tool but instructions for authenticating it (which would require keys/token) are missing.
Persistence & Privilege
Persistence is implemented via a per-user launchd agent (~/Library/LaunchAgents) — appropriate for a user-level always-on service. The guide also recommends enabling auto-login and disabling lock screens, which increases physical access risk; the launchd item itself does not request system-wide privileges or 'always: true' style platform bypasses.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install mac-mini-server
  3. After installation, invoke the skill by name or use /mac-mini-server
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Complete guide to setting up OpenClaw as an always-on AI server on Mac Mini. - Hardware recommendations for Mac Mini (M4 and M4 Pro) with detailed specs and use cases. - Step-by-step macOS configuration: energy settings, auto-login, remote access, and update management. - Instructions for installing Homebrew, Docker Desktop, and essential development tools. - OpenClaw Docker Compose setup, configuration, and secure local networking. - Guidance for auto-start using launchd and remote management via Tailscale. - Telegram bot integration and alternatives to Tailscale for remote access. - Includes clear tables, command examples, and security notes throughout.
Metadata
Slug mac-mini-server
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Mac Mini Server?

Set up OpenClaw on Mac Mini as always-on AI server — hardware recommendations, macOS config, Docker Desktop, launchd auto-start, Tailscale remote access, and... It is an AI Agent Skill for Claude Code / OpenClaw, with 366 downloads so far.

How do I install Mac Mini Server?

Run "/install mac-mini-server" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Mac Mini Server free?

Yes, Mac Mini Server is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Mac Mini Server support?

Mac Mini Server is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Mac Mini Server?

It is built and maintained by aiwithabidi (@aiwithabidi); the current version is v1.0.0.

💬 Comments