1. OpenClaw को Mac Mini पर क्यों चलाएं?
क्लाउड VPS प्रदाता कंप्यूट समय के आधार पर शुल्क लेते हैं और AI इन्फरेंस के लिए GPU अधिभार जोड़ते हैं। Mac Mini M4 आपको एक समान $85/माह पर समर्पित Apple Silicon देता है — कोई पे-पर-कॉल आश्चर्य नहीं, पूर्ण SSH एक्सेस, और लगभग-शून्य इन्फरेंस लागत के लिए OpenClaw के साथ लोकल LLMs चलाने की क्षमता।
| विशेषता | क्लाउड VPS (AI टियर) | Mac Mini M4 (MyRemoteMac) |
|---|---|---|
| मासिक लागत | $150–$400/माह (GPU VPS) | $85/माह (समान दर) |
| लोकल LLM समर्थन | अतिरिक्त लागत / सीमित | नेटिव (Ollama, llama.cpp) |
| हमेशा-चालू अपटाइम | हां | हां (99.9% SLA) |
| Apple इंटीग्रेशन | कोई नहीं | iMessage, Shortcuts, Automator |
| सेटअप जटिलता | मध्यम | कम (SSH एक्सेस शामिल) |
| गोपनीयता | शेयर्ड डेटासेंटर | समर्पित हार्डवेयर |
मुख्य लाभ: क्लाउड VPS के विपरीत, आपका Mac Mini M4, Apple Silicon पर नेटिव रूप से Ollama या llama.cpp चलाता है। आप संवेदनशील कार्यों के लिए OpenClaw को एक लोकल LLM पर रूट कर सकते हैं, फिर जटिल क्वेरी के लिए Claude पर वापस जा सकते हैं — सब कुछ प्रति टोकन भुगतान किए बिना।
2. पूर्वापेक्षाएं
शुरू करने से पहले, सुनिश्चित करें कि आपके पास निम्नलिखित हैं:
- MyRemoteMac से एक Mac Mini M4 सर्वर ($85/माह से)
- आपके Mac Mini तक SSH एक्सेस (आपकी MyRemoteMac सदस्यता के साथ प्रदान किया गया)
- एक Anthropic API key (Claude के लिए) — इसे console.anthropic.com पर प्राप्त करें
- अपने एजेंट को कनेक्ट करने के लिए Telegram, Discord या WhatsApp पर एक मैसेजिंग अकाउंट
- टर्मिनल कमांड और JSON कॉन्फ़िगरेशन फ़ाइलों से बुनियादी परिचय
3. चरण 1: अपने Mac Mini से कनेक्ट करें और Node.js इंस्टॉल करें
सबसे पहले, अपने Mac Mini M4 में SSH करें। जब आपने अपना MyRemoteMac सर्वर सेट किया होगा तब आपको अपने क्रेडेंशियल प्राप्त हुए होंगे।
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
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
Node.js LTS इंस्टॉल करें
Node.js वर्शन प्रबंधित करने के लिए हम nvm की अनुशंसा करते हैं — यह परमिशन समस्याओं से बचाता है और अपग्रेड को सरल बनाता है:
# 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
इंस्टॉलेशन सत्यापित करें
# 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. चरण 2: OpenClaw इंस्टॉल करें और Claude API Key कॉन्फ़िगर करें
Node.js तैयार होने के बाद, OpenClaw को एक समर्पित प्रोजेक्ट डायरेक्टरी में इंस्टॉल करें। OpenClaw एक npm पैकेज के रूप में वितरित किया जाता है।
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
कॉन्फ़िगरेशन फ़ाइल बनाएं
OpenClaw अपनी सेटिंग्स एक config.json फ़ाइल से पढ़ता है। अपनी प्रोजेक्ट डायरेक्टरी में एक बनाएं:
# 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
sk-ant-YOUR_API_KEY_HERE को console.anthropic.com से अपनी वास्तविक key से बदलें। आप जटिल कार्यों के लिए claude-sonnet-4-6 या तेज़, सस्ते उत्तरों के लिए claude-haiku-4-5 का उपयोग कर सकते हैं।
एजेंट को इंटरैक्टिव रूप से टेस्ट करें
# 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. चरण 3: मैसेजिंग चैनल कनेक्ट करें
OpenClaw, Telegram, Discord, WhatsApp, iMessage, Slack और Signal का समर्थन करता है। सेट करने के लिए सबसे सरल चैनल Telegram है — @BotFather के माध्यम से एक bot बनाएं:
# 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",...}}
Discord कनेक्ट करें
एक Discord bot कनेक्ट करने के लिए, Discord Developer Portal में एक एप्लिकेशन बनाएं और इसे आवश्यक परमिशन दें:
# 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. चरण 4: एक स्थायी launchd सर्विस के रूप में चलाएं
24/7 संचालन के लिए, OpenClaw को बूट पर स्वचालित रूप से शुरू होना चाहिए और विफलता पर पुनः आरंभ होना चाहिए। macOS इस उद्देश्य के लिए launchd का उपयोग करता है — ~/Library/LaunchAgents/ में एक सर्विस plist बनाएं।
launchd Plist बनाएं
निम्नलिखित को ~/openclaw/com.openclaw.agent.plist के रूप में सहेजें (admin को अपने वास्तविक उपयोगकर्ता नाम से बदलें और चरण 1 से Node.js पाथ समायोजित करें):
<?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>
सर्विस सक्षम करें और शुरू करें
# 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
सत्यापित करें कि सर्विस चल रही है
# 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
OpenClaw अपडेट करें (शून्य डाउनटाइम)
# 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. सामान्य समस्याओं का निवारण
सर्विस शुरू होने में विफल: "Cannot find module"
plist में absolute Node.js पाथ गलत है, या npm पैकेज गायब हैं। एरर लॉग जांचें और पुनः इंस्टॉल करें:
# 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
Claude API 401 Unauthorized लौटाता है
आपकी API key गायब है, गलत है, या आपके Anthropic अकाउंट में कोई शेष क्रेडिट नहीं है। key सत्यापित करें:
# 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
Telegram bot जवाब देना बंद कर देता है
bot टोकन रद्द कर दिया गया हो सकता है या सर्विस क्रैश हो गई हो सकती है। टोकन जांचें और पुनः आरंभ करें:
# 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)
कई दिनों के बाद उच्च मेमोरी उपयोग
OpenClaw मेमोरी में वार्तालाप इतिहास जमा करता है। config.json में maxHistory कम करें और एक साप्ताहिक पुनः आरंभ शेड्यूल करें:
# 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. क्लाउड VPS बनाम लागत विश्लेषण
विभिन्न उपयोग स्तरों पर एक AI एजेंट को 24/7 चलाने के लिए यहां एक यथार्थवादी लागत तुलना है:
| उपयोग मामला | AI कॉल/माह | क्लाउड VPS लागत | MyRemoteMac लागत | मासिक बचत |
|---|---|---|---|---|
| व्यक्तिगत सहायक | ~500 कॉल | $120/माह (बेसिक GPU VPS) | $85/माह | $45/माह |
| छोटी टीम bot | ~5,000 कॉल | $200/माह | $85/माह | $125/माह |
| लोकल LLM + एजेंट | असीमित (लोकल) | $350+/माह (GPU VPS) | $85/माह | $275+/माह |
| मल्टी-एजेंट सिस्टम | 10,000+ कॉल | $600+/माह | $229/माह (M4 Pro) | $371+/माह |
निष्कर्ष: Mac Mini M4 पर OpenClaw चलाना किसी भी क्लाउड AI VPS की तुलना में काफी सस्ता है। आपको Ollama के माध्यम से लोकल LLMs के लिए नेटिव Apple Silicon भी मिलता है — गैर-संवेदनशील कार्यों को एक मुफ्त लोकल मॉडल पर रूट करें और API लागत पर और भी अधिक बचत करें।
संबंधित गाइड्स
Mac Mini M4 पर LLMs चलाएं
शून्य-लागत AI इन्फरेंस के लिए Apple Silicon पर नेटिव रूप से Ollama, llama.cpp और लोकल भाषा मॉडल चलाएं।
AI और ML सर्वर के रूप में Mac Mini
अपने Mac Mini को मशीन लर्निंग वर्कलोड के लिए एक निजी AI इन्फरेंस सर्वर में बदलें।
बिना भौतिक Mac के iOS विकसित करें
एक क्लाउड Mac Mini का उपयोग करके iOS ऐप्स को दूरस्थ रूप से बनाएं, टेस्ट करें और साइन करें — किसी हार्डवेयर खरीद की आवश्यकता नहीं।