1. Warum OpenClaw auf einem Mac Mini betreiben?
Cloud-VPS-Anbieter berechnen nach Rechenzeit und fügen GPU-Aufschläge für KI-Inferenz hinzu. Ein Mac Mini M4 bietet Ihnen dediziertes Apple Silicon zu einem pauschalen Preis von 85 $/Monat, keine Pay-per-Call-Überraschungen, voller SSH-Zugriff und die Möglichkeit, lokale LLMs neben OpenClaw für nahezu keine Inferenzkosten laufen zu lassen.
| Merkmal | Cloud-VPS (KI-Stufe) | Mac Mini M4 (MyRemoteMac) |
|---|---|---|
| Monatliche Kosten | Preise der GPU-Stufe (variieren) | 85 $/Monat (Pauschale) |
| Unterstützung lokaler LLMs | Zusatzkosten / eingeschränkt | Nativ (Ollama, llama.cpp) |
| Always-On-Verfügbarkeit | Ja | Ja (99,9 % SLA) |
| Apple-Integrationen | Keine | iMessage, Shortcuts, Automator |
| Einrichtungskomplexität | Mittel | Gering (SSH-Zugriff inklusive) |
| Datenschutz | Gemeinsam genutztes Rechenzentrum | Dedizierte Hardware |
Wichtigster Vorteil: Anders als bei einem Cloud-VPS läuft Ihr Mac Mini M4 Ollama oder llama.cpp nativ auf Apple Silicon. Sie können OpenClaw für sensible Aufgaben an ein lokales LLM leiten und dann für komplexe Anfragen auf Claude zurückgreifen, alles ohne pro Token zu bezahlen.
2. Voraussetzungen
Bevor Sie beginnen, stellen Sie sicher, dass Sie Folgendes haben:
- Einen Mac Mini M4 Server (ab 85 $/Monat) oder Mac mini M6 (ab 149 $/Monat) von MyRemoteMac
- SSH-Zugriff auf Ihren Mac Mini (im MyRemoteMac-Abonnement enthalten)
- Einen Anthropic API-Schlüssel (für Claude), erhältlich unter console.anthropic.com
- Ein Messaging-Konto bei Telegram, Discord oder WhatsApp, um Ihren Agenten zu verbinden
- Grundkenntnisse in Terminal-Befehlen und im Bearbeiten einer JSON5-Konfigurationsdatei (~/.openclaw/openclaw.json)
3. Schritt 1: Mit Ihrem Mac Mini verbinden und Node.js installieren
Verbinden Sie sich zunächst per SSH mit Ihrem Mac Mini M4. Sie haben Ihre Zugangsdaten bei der Einrichtung Ihres MyRemoteMac-Servers erhalten.
Per SSH verbinden
# Connect to your Mac Mini M4
ssh admin@your-server-ip
# Verify you're on Apple Silicon
uname -m
# Expected output: arm64
# Check macOS version (official Node.js 24/26 macOS binaries need macOS 13.5+)
sw_vers
# ProductName: macOS
# ProductVersion: 15.4
Node.js mit Homebrew installieren
# Install Node.js 26 with Homebrew (documented method on macOS)
# Homebrew missing? /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install node
# Must print v26.x (or v24.16+). Node 22, 23 and 25 are unsupported.
node --version
# v26.x.x
npm --version
Ein unterstütztes Node.js installieren (26.1+ oder 24.16+)
OpenClaw benötigt Node.js 26.1+ (empfohlen) oder 24.16+, Node 22, 23 und 25 werden seit Release 2026.9.3 nicht mehr unterstützt. Homebrew ist die dokumentierte Methode unter macOS. Wenn Sie nvm bevorzugen, installieren Sie Node 26 (niemals --lts) und stellen Sie sicher, dass nvm in ~/.zshrc initialisiert wird, sonst ist openclaw nicht in Ihrem PATH:
# Prefer nvm? Target Node 26: never --lts
nvm install 26
nvm alias default 26
# nvm must be initialised in ~/.zshrc, otherwise `openclaw` is not on PATH in new sessions
echo 'export NVM_DIR="$HOME/.nvm"; [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' >> ~/.zshrc
Die Installation überprüfen
# Confirm Node.js is running on Apple Silicon
node -e "console.log(process.platform, process.arch)"
# darwin arm64
4. Schritt 2: OpenClaw installieren und Claude API-Schlüssel konfigurieren
Mit fertigem Node.js installieren Sie die OpenClaw-CLI global, eine projektlokale Installation gibt es nicht. OpenClaw wird als npm-Paket openclaw verteilt; ein Einzeiler-Installer (openclaw.ai/install.sh) ist ebenfalls verfügbar und richtet Node 26 für Sie ein, falls es fehlt.
OpenClaw installieren
# Option A: one-line installer (provisions Node 26 if missing, then launches the wizard)
curl -fsSL https://openclaw.ai/install.sh | bash
# (append `-s -- --no-onboard` to skip the wizard)
# Option B: global npm install (you manage Node)
npm install -g openclaw@latest --allow-scripts=openclaw
# omit --allow-scripts on npm <= 11.15
openclaw --version
# 2026.9.6
Den Onboarding-Assistenten ausführen
OpenClaw liest seine Einstellungen aus ~/.openclaw/openclaw.json (JSON5). Schreiben Sie die Datei nicht von Hand: Der Onboarding-Assistent erstellt sie, fragt nach Ihrem Anthropic API-Schlüssel, prüft den Modellzugriff und registriert den launchd-Dienst in einem Durchgang:
# Onboarding wizard + launchd service in one go
openclaw onboard --install-daemon
# Non-interactive over SSH (key from console.anthropic.com):
export ANTHROPIC_API_KEY="sk-ant-YOUR_API_KEY_HERE"
openclaw onboard --anthropic-api-key "$ANTHROPIC_API_KEY" --install-daemon
# Choose the default Claude model (provider/model format)
openclaw models set anthropic/claude-sonnet-5
# cheaper: openclaw models set anthropic/claude-haiku-4-5
openclaw models status
# Settings now live in ~/.openclaw/openclaw.json (JSON5). After any hand edit:
openclaw doctor --fix
Fügen Sie Ihren Schlüssel von console.anthropic.com ein, wenn der Assistent danach fragt (oder übergeben Sie ihn mit --anthropic-api-key). Modell-IDs benötigen das Anbieter-Präfix: Verwenden Sie anthropic/claude-sonnet-5 für komplexe Aufgaben oder anthropic/claude-haiku-4-5 für schnellere, günstigere Antworten, die Standardeinstellung von OpenClaw bei einer Neuinstallation ist anthropic/claude-opus-5-5.
Das Gateway überprüfen und eine erste Nachricht senden
# Check the Gateway service installed by --install-daemon
openclaw gateway status
# Runtime: running
# Connectivity probe: ok
# Send a first message through the running Gateway
openclaw agent --agent main --message "Hello, are you alive?"
# Control UI from your laptop, the Gateway stays loopback-only on 127.0.0.1:18789
ssh -N -L 18789:127.0.0.1:18789 admin@your-server-ip
# then open http://127.0.0.1:18789 (or run `openclaw dashboard` over VNC)
5. Schritt 3: Messaging-Kanäle verbinden
OpenClaw unterstützt Telegram, Discord, WhatsApp, iMessage, Slack, Signal, Microsoft Teams, Google Chat und über 20 weitere Kanäle. Telegram ist bereits enthalten und am schnellsten einsatzbereit, erstellen Sie einen Bot über @BotFather, fügen Sie das Token hinzu und genehmigen Sie dann Ihre erste Direktnachricht mit dem Pairing-Code, den der Bot zurücksendet:
# Step 1: Open Telegram and search for @BotFather
# Step 2: Send /newbot and follow the prompts
# Step 3: Copy the token (format: 1234567890:AAF...)
# Test your bot token is valid:
curl -s "https://api.telegram.org/botYOUR_TOKEN/getMe"
# {"ok":true,"result":{"id":...,"first_name":"My Agent","username":"myagent_bot",...}}
# Add the channel (Telegram is bundled: nothing to install)
openclaw channels add --channel telegram --token YOUR_TELEGRAM_BOT_TOKEN
openclaw channels status --probe
# DM your bot once: it answers with a pairing code. Approve it:
openclaw pairing approve telegram <CODE>
# Groups: disable Privacy Mode via BotFather (/setprivacy) or make the bot a group admin
Discord verbinden
Um einen Discord-Bot zu verbinden, erstellen Sie eine Anwendung im Discord Developer Portal, aktivieren Sie den Message Content Intent (erforderlich) und laden Sie den Bot mit den Scopes bot + applications.commands ein. Installieren Sie das offizielle Plugin, referenzieren Sie das Token aus der Umgebungsvariablen DISCORD_BOT_TOKEN und genehmigen Sie Ihre erste Direktnachricht:
# In Discord Developer Portal (https://discord.com/developers/applications):
# 1. Create a New Application and give it a name
# 2. Open the Bot page, click Reset Token and copy the token (despite the name, it creates your first token)
# 3. Enable "Message Content Intent" (required) and "Server Members Intent" (recommended)
# 4. Under OAuth2 > URL Generator select scopes bot + applications.commands,
# permissions View Channels, Send Messages, Read Message History, Embed Links, Attach Files
# 5. Use the generated URL to invite the bot to your server
# Install the official plugin and reference the token from an env var
openclaw plugins install @openclaw/discord
cat > ./discord.patch.json5 << 'EOF'
{ env: { vars: { DISCORD_BOT_TOKEN: "YOUR_DISCORD_BOT_TOKEN" } },
channels: { discord: { enabled: true, token: { source: "env", provider: "default", id: "DISCORD_BOT_TOKEN" } } } }
EOF
openclaw config patch --file ./discord.patch.json5
rm ./discord.patch.json5 # the token now lives in ~/.openclaw/openclaw.json: do not leave a copy behind
# Approve your first DM
openclaw pairing approve discord <CODE>
# WhatsApp (optional, QR login, do it over VNC, use a separate number):
# openclaw plugins install @openclaw/whatsapp && openclaw channels login --channel whatsapp
6. Schritt 4: Als persistenten launchd-Dienst ausführen
Für den Betrieb rund um die Uhr muss das OpenClaw-Gateway automatisch beim Booten starten und bei einem Fehler neu starten. OpenClaw übernimmt das selbst: openclaw gateway install (oder das Flag --install-daemon aus Schritt 2) registriert einen überwachten launchd-LaunchAgent namens ai.openclaw.gateway in ~/Library/LaunchAgents/, schreiben Sie die plist niemals von Hand.
Den Gateway-Dienst installieren
Falls Sie --install-daemon in Schritt 2 übersprungen haben, registrieren Sie den Dienst jetzt. Deaktivieren Sie anschließend den Ruhezustand von macOS, damit das Gateway Netzwerkunterbrechungen durch den Wartungs-Ruhezustand übersteht (offizielle Empfehlung):
# Register the supervised LaunchAgent ai.openclaw.gateway
# (skip if you already ran `openclaw onboard --install-daemon`)
openclaw gateway install
# The plist lives at ~/Library/LaunchAgents/ai.openclaw.gateway.plist: do not edit it by hand
# Keep the Mac awake: avoids maintenance-sleep network flaps (official recommendation)
sudo pmset -a sleep 0 disksleep 0 standby 0 powernap 0
Den Dienst verwalten
openclaw gateway status --deep # CLI vs service version, port, runtime
openclaw gateway restart # never chain `stop` + `start` as a restart
openclaw gateway stop # add --disable to keep it off across reboots
openclaw gateway install --runtime node --force # retarget the service after a Node.js change
Überprüfen, ob der Dienst läuft
openclaw gateway status
# Runtime: running
# Connectivity probe: ok
openclaw gateway health
# Live logs
openclaw logs --follow
# Files: /tmp/openclaw/openclaw-YYYY-MM-DD.log and ~/Library/Logs/openclaw/gateway.log
# Raw launchd view (troubleshooting only)
launchctl print gui/$UID/ai.openclaw.gateway
OpenClaw aktualisieren
# Back up your state first (automatic config copies are not a full backup)
cp -R ~/.openclaw ~/openclaw-backup-$(date +%F)
# Update: stages the package, validates config, runs doctor, restarts the Gateway
openclaw update
openclaw doctor
openclaw gateway restart
openclaw health
# Prefer the LTS-equivalent line (currently 2026.7.35):
# openclaw update --channel extended-stable
7. Häufige Probleme beheben
Gateway startet nicht oder meldet einen Versionskonflikt
Eine ungültige ~/.openclaw/openclaw.json (ein einziger unbekannter Schlüssel genügt) führt dazu, dass das Gateway den Start verweigert, und ein Node.js-Wechsel kann CLI und Dienst auf unterschiedlichen Versionen zurücklassen. Führen Sie die integrierte Diagnose aus und reparieren Sie den Dienst:
# Validate and auto-repair the config
openclaw doctor --fix
# CLI vs service version skew
openclaw gateway status --deep
openclaw logs --follow
# Re-register the service on the new Node.js after a runtime change
openclaw gateway install --runtime node --force
Claude API gibt 401 Unauthorized zurück
Ihr API-Schlüssel fehlt, ist falsch oder Ihr Anthropic-Konto hat keine verbleibenden Credits. Prüfen Sie zuerst den Anbieterstatus aus OpenClaw heraus und testen Sie den Schlüssel bei Bedarf direkt:
# Check provider auth from OpenClaw
openclaw models status
openclaw doctor
# Optional: test the key directly
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-haiku-4-5","max_tokens":10,"messages":[{"role":"user","content":"Hi"}]}'
# Expected: {"id":"msg_...","type":"message",...}
# If you get 401: check your key at console.anthropic.com
Telegram-Bot reagiert nicht mehr
Das Bot-Token wurde möglicherweise widerrufen, Ihre Direktnachricht wartet noch auf die Pairing-Genehmigung oder das Gateway wurde gestoppt. Prüfen Sie den Kanal, genehmigen Sie ausstehende Pairings und starten Sie neu:
# Verify the bot token is still valid
curl -s "https://api.telegram.org/botYOUR_TOKEN/getMe"
# Probe the channel and approve any pending pairing
openclaw channels status --probe
openclaw pairing approve telegram <CODE>
# Restart the Gateway
openclaw gateway restart
# If the token was revoked, generate a new one via @BotFather (/mybots > API Token)
Bot verstummt nach einigen Stunden unter macOS
Der Wartungs-Ruhezustand von macOS kann das Netzwerk trennen (ENETDOWN) und Kanäle stummschalten, bis Sie den Mac wieder anfassen. Deaktivieren Sie den Ruhezustand, prüfen Sie die Stabilitätsprotokolle, achten Sie auf Warnungen zum Speicherdruck und fügen Sie den offiziellen launchd-Watchdog hinzu:
# Disable macOS maintenance sleep (ENETDOWN network flaps)
sudo pmset -a sleep 0 disksleep 0 standby 0 powernap 0
# Stability logs and memory-pressure warnings
ls ~/.openclaw/logs/stability/
grep -i "memory pressure" /tmp/openclaw/openclaw-$(date +%F).log
# Official liveness watchdog: re-arm launchd's respawn gate
launchctl kickstart -k gui/$UID/ai.openclaw.gateway
8. Kostenanalyse vs. Cloud-VPS
Hier ist ein realistischer Kostenvergleich für den Betrieb eines KI-Agenten rund um die Uhr bei verschiedenen Nutzungsstufen:
| Anwendungsfall | KI-Aufrufe/Monat | Cloud-VPS-Kosten | MyRemoteMac Kosten | Monatliche Ersparnis |
|---|---|---|---|---|
| Persönlicher Assistent | ~500 Aufrufe | 120 $/Monat (einfacher GPU-VPS) | 85 $/Monat | 45 $/Monat |
| Kleiner Team-Bot | ~5.000 Aufrufe | 200 $/Monat | 85 $/Monat | 125 $/Monat |
| Lokales LLM + Agent | Unbegrenzt (lokal) | 350+ $/Monat (GPU-VPS) | 85 $/Monat | 275+ $/Monat |
| Multi-Agenten-System | 10.000+ Aufrufe | 600+ $/Monat | 229 $/Monat (M4 Pro) | 371+ $/Monat |
Fazit: Der Betrieb von OpenClaw auf einem Mac Mini M4 ist deutlich günstiger als ein GPU-Cloud-VPS. Sie erhalten außerdem natives Apple Silicon für lokale LLMs über Ollama, leiten Sie nicht sensible Aufgaben an ein lokales Modell (openclaw models set ollama/gemma4) und richten Sie den integrierten 30-Minuten-Heartbeat auf anthropic/claude-haiku-4-5, um die API-Kosten im Leerlauf niedrig zu halten.
Quellen (offizielle OpenClaw-Dokumentation)
- docs.openclaw.ai/install
- docs.openclaw.ai/install/node
- docs.openclaw.ai/gateway/configuration
- docs.openclaw.ai/providers/anthropic
- docs.openclaw.ai/channels/telegram/setup
- docs.openclaw.ai/channels/discord/setup
- docs.openclaw.ai/cli/agent
- docs.openclaw.ai/cli/gateway/service
- docs.openclaw.ai/gateway/troubleshooting/gateway-service-and-process
- docs.openclaw.ai/cli/update
- docs.openclaw.ai/gateway/heartbeat
- platform.claude.com, Claude models overview
Verwandte Anleitungen
LLMs auf Mac Mini M4 ausführen
Führen Sie Ollama, llama.cpp und lokale Sprachmodelle nativ auf Apple Silicon für kostenlose KI-Inferenz aus.
Mac Mini als KI- & ML-Server
Verwandeln Sie Ihren Mac Mini in einen privaten KI-Inferenzserver für Machine-Learning-Workloads.
Hermes Agent rund um die Uhr auf einem Mac mini betreiben
Der selbstverbessernde Open-Source-Agent von Nous Research: Einzeiler-Installer, Telegram/Discord-Gateway, launchd-Dienst, optional lokales Ollama.