1. ¿Por qué usar un Mac Mini para OpenClaw?
Los proveedores de VPS cloud cobran por tiempo de cómputo y añaden cargos adicionales por GPU para la inferencia IA. Un Mac Mini M4 te ofrece Apple Silicon dedicado a un precio fijo de 75 $/mes — sin sorpresas en la factura, con acceso SSH completo y la posibilidad de ejecutar LLM locales junto a OpenClaw.
| Característica | VPS cloud (tier IA) | Mac Mini M4 (MyRemoteMac) |
|---|---|---|
| Coste mensual | 150–400 $/mes (VPS GPU) | 75 $/mes (tarifa plana) |
| LLM locales | Coste adicional / limitado | Nativo (Ollama, llama.cpp) |
| Disponibilidad 24/7 | Sí | Sí (SLA 99,9 %) |
| Integraciones Apple | Ninguna | iMessage, Atajos, Automator |
| Complejidad de configuración | Media | Baja (acceso SSH incluido) |
| Privacidad | Datacenter compartido | Hardware dedicado |
Ventaja clave: A diferencia de un VPS cloud, tu Mac Mini M4 ejecuta Ollama o llama.cpp de forma nativa en Apple Silicon. Puedes enrutar OpenClaw hacia un LLM local para tareas sensibles y usar Claude para consultas complejas — sin pagar por token.
2. Requisitos previos
Antes de empezar, asegúrate de tener lo siguiente:
- Un servidor Mac Mini M4 de MyRemoteMac (desde 75 $/mes)
- Acceso SSH a tu Mac Mini (incluido con tu suscripción a MyRemoteMac)
- Una clave API de Anthropic (para Claude) — obtenla en console.anthropic.com
- Una cuenta de mensajería en Telegram, Discord o WhatsApp para conectar tu agente
- Conocimientos básicos de línea de comandos y archivos de configuración JSON
3. Paso 1: Conectar al Mac Mini e instalar Node.js
Primero, conéctate por SSH a tu Mac Mini M4. Habrás recibido tus credenciales al configurar tu servidor MyRemoteMac.
Conexión vía SSH
# 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
sw_vers
# ProductName: macOS
# ProductVersion: 15.4
Instalación de nvm (Node Version Manager)
# Install nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Load nvm into the current session
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Verify nvm is available
nvm --version
# 0.39.7
Instalación de Node.js LTS
Recomendamos usar nvm para gestionar versiones de Node.js — evita problemas de permisos y facilita las actualizaciones:
# Install the latest LTS version of Node.js
nvm install --lts
# Set it as the default for new sessions
nvm alias default node
# Verify the installation
node --version
# v22.x.x
npm --version
# 10.x.x
Verificación de la instalación
# Confirm Node.js is running on Apple Silicon
node -e "console.log(process.platform, process.arch)"
# darwin arm64
# Note the exact Node.js binary path (needed for launchd in Step 4)
which node
# /Users/admin/.nvm/versions/node/v22.14.0/bin/node
4. Paso 2: Instalar OpenClaw y configurar la clave Claude
Con Node.js listo, instala OpenClaw en un directorio dedicado. OpenClaw se distribuye como paquete npm.
Instalación de OpenClaw
# Create a directory for your OpenClaw agent
mkdir -p ~/openclaw
cd ~/openclaw
# Initialize a Node.js project
npm init -y
# Install OpenClaw
npm install openclaw
# Create the logs directory
mkdir -p logs
Creación del archivo de configuración
OpenClaw lee su configuración desde un archivo config.json. Créalo en el directorio de tu proyecto:
# Create config.json in your project directory
cat > ~/openclaw/config.json << 'EOF'
{
"model": "claude-sonnet-4-6",
"apiKey": "sk-ant-YOUR_API_KEY_HERE",
"channels": {
"telegram": {
"enabled": true,
"token": "YOUR_TELEGRAM_BOT_TOKEN"
}
},
"maxHistory": 20,
"systemPrompt": "You are a helpful assistant. Be concise and accurate."
}
EOF
Reemplaza sk-ant-YOUR_API_KEY_HERE con tu clave real de console.anthropic.com. Usa claude-sonnet-4-6 para tareas complejas o claude-haiku-4-5 para respuestas más rápidas y económicas.
Prueba interactiva del agente
# Start OpenClaw in interactive mode to test it
cd ~/openclaw
npx openclaw start --config ./config.json
# Expected output:
# [OpenClaw] Agent initialized with model: claude-sonnet-4-6
# [OpenClaw] Telegram channel connected
# [OpenClaw] Listening for messages...
# Press Ctrl+C to stop (you will set up the persistent service in Step 4)
5. Paso 3: Conectar canales de mensajería
OpenClaw es compatible con Telegram, Discord, WhatsApp, iMessage, Slack y Signal. El canal más sencillo de configurar es Telegram — crea un bot a través de @BotFather:
# 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",...}}
Conectar Discord
Para conectar un bot de Discord, crea una aplicación en el Portal de desarrolladores de Discord y concédele los permisos necesarios:
# In Discord Developer Portal (https://discord.com/developers/applications):
# 1. Create a New Application and give it a name
# 2. Go to Bot > Add Bot
# 3. Copy the Bot Token
# 4. Enable "Message Content Intent" under Privileged Gateway Intents
# 5. Under OAuth2 > URL Generator, select bot + Send Messages + Read Message History
# 6. Use the generated URL to invite the bot to your server
# Update your config.json to enable Discord:
# "discord": { "enabled": true, "token": "YOUR_DISCORD_BOT_TOKEN" }
6. Paso 4: Ejecutar como servicio launchd persistente
Para un funcionamiento 24/7, OpenClaw debe arrancar automáticamente al inicio y reiniciarse ante fallos. macOS utiliza launchd para este propósito — crea un plist de servicio en ~/Library/LaunchAgents/.
Creación del plist de launchd
Guarda el siguiente archivo como ~/openclaw/com.openclaw.agent.plist (reemplaza admin con tu nombre de usuario real y ajusta la ruta de Node.js del Paso 1):
<?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.agent</string>
<key>ProgramArguments</key>
<array>
<string>/Users/admin/.nvm/versions/node/v22.14.0/bin/node</string>
<string>/Users/admin/openclaw/node_modules/.bin/openclaw</string>
<string>start</string>
<string>--config</string>
<string>/Users/admin/openclaw/config.json</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/admin/openclaw</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/admin/openclaw/logs/openclaw.log</string>
<key>StandardErrorPath</key>
<string>/Users/admin/openclaw/logs/openclaw-error.log</string>
</dict>
</plist>
Activación e inicio del servicio
# Save the plist to the LaunchAgents directory
# (Use your actual username instead of "admin")
cp ~/openclaw/com.openclaw.agent.plist ~/Library/LaunchAgents/
# Load and start the service
launchctl load ~/Library/LaunchAgents/com.openclaw.agent.plist
launchctl start com.openclaw.agent
Verificación del servicio
# Check that the service is running
launchctl list | grep openclaw
# 12345 0 com.openclaw.agent
# (First column is the PID — a number means it's running)
# View live logs
tail -f ~/openclaw/logs/openclaw.log
# View error logs
tail -f ~/openclaw/logs/openclaw-error.log
Actualización de OpenClaw (sin interrupciones)
# Stop the service before updating
launchctl stop com.openclaw.agent
# Update OpenClaw to the latest version
cd ~/openclaw
npm update openclaw
# Restart the service
launchctl start com.openclaw.agent
# Confirm the new version is running
tail -5 ~/openclaw/logs/openclaw.log
7. Resolución de problemas comunes
El servicio no arranca: "Cannot find module"
La ruta absoluta a Node.js en el plist es incorrecta o faltan paquetes npm. Revisa el log de errores y reinstala:
# Check the error logs
cat ~/openclaw/logs/openclaw-error.log | tail -20
# Make sure to use the absolute Node.js binary path in the plist
which node
# /Users/admin/.nvm/versions/node/v22.14.0/bin/node
# Reinstall dependencies
cd ~/openclaw
npm install
La API de Claude devuelve 401 Unauthorized
Tu clave API es incorrecta o tu cuenta de Anthropic no tiene créditos. Verifica la clave:
# Test your API 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
El bot de Telegram deja de responder
El token del bot puede haber sido revocado o el servicio ha fallado. Verifica el token y reinicia:
# Verify the bot token is still valid
curl -s "https://api.telegram.org/botYOUR_TOKEN/getMe"
# Restart the service
launchctl stop com.openclaw.agent
launchctl start com.openclaw.agent
# If the token was revoked, generate a new one via @BotFather (/mybots > API Token)
Uso de memoria elevado tras varios días
OpenClaw acumula el historial de conversaciones en memoria. Reduce maxHistory en config.json y programa un reinicio semanal:
# Reduce conversation history in config.json
# "maxHistory": 10 (default is 20 — lower values use less memory)
# Set up a weekly restart via cron
crontab -e
# Add this line to restart OpenClaw every Sunday at 3am:
# 0 3 * * 0 launchctl stop com.openclaw.agent; sleep 2; launchctl start com.openclaw.agent
# Monitor memory usage
ps aux | grep openclaw
8. Análisis de costes vs. VPS cloud
A continuación, una comparativa realista de costes para ejecutar un agente IA 24/7 a diferentes niveles de uso:
| Caso de uso | Llamadas IA/mes | Coste VPS cloud | Coste MyRemoteMac | Ahorro mensual |
|---|---|---|---|---|
| Asistente personal | ~500 llamadas | 120 $/mes (VPS GPU básico) | 75 $/mes | 45 $/mes |
| Bot para equipo pequeño | ~5.000 llamadas | 200 $/mes | 75 $/mes | 125 $/mes |
| LLM local + agente | Ilimitado (local) | 350 +$/mes (VPS GPU) | 75 $/mes | 275 +$/mes |
| Sistema multi-agente | 10.000+ llamadas | 600 +$/mes | 179 $/mes (M4 Pro) | 421 +$/mes |
Conclusión: Ejecutar OpenClaw en un Mac Mini M4 es significativamente más barato que cualquier VPS cloud de IA. Además, dispones de Apple Silicon nativo para LLM locales vía Ollama — enruta tareas no sensibles a un modelo local gratuito y ahorra aún más en costes de API.
Guías relacionadas
Ejecutar LLMs en Mac Mini M4
Ejecuta Ollama, llama.cpp y modelos de lenguaje locales nativamente en Apple Silicon para inferencia IA sin coste.
Mac Mini como servidor IA y ML
Convierte tu Mac Mini en un servidor IA privado para cargas de trabajo de inferencia y aprendizaje automático.
Desarrollar iOS sin un Mac físico
Crea, prueba y firma apps iOS de forma remota usando un Mac Mini en la nube — sin comprar hardware.