image generated by ai

Most founders I talk to are drowning in manual AI workflows.

They're copy-pasting between ChatGPT, Claude, and 15 different tabs. They're toggling between Slack, email, and WhatsApp just to get a simple AI task done. They're paying $20-200/month for LLM subscriptions but still feel like they're working for the AI instead of the AI working for them.

OpenClaw fixes this. It's an open-source AI agent framework that lets you run AI assistants across Telegram, Slack, Discord, and more — all from a single command line. You can use OpenAI, Claude, or run completely free local models with Ollama.

But here's the problem: most installation guides assume you're a DevOps engineer. They skip the context, ignore the edge cases, and leave you stuck at error messages.

I just spent 6 hours installing, breaking, and rebuilding OpenClaw three times. This guide is everything I wish existed when I started.

But, the good news for you is that you can now install OpenClaw on your local system in less than 30 mins.

Just one tip, don’t worry about how all these things are back in the backend, because you may end up confusing and overwhelming yourself.

Just keep your focus on one thing: if you follow this guide, you will end up having your own personal AI Assistant that you can talk to that will ‘actually do tasks for you’ rather than you having to do it yourself

If that one thing excites you enough, you can push through this simple step-by-step process and install Openclaw in no time.

What Is OpenClaw (And Why It Matters Now)?

OpenClaw is an AI agent orchestration platform that acts as a central hub for your LLM interactions. Instead of logging into different AI chat interfaces, you message your AI assistant on Telegram, Slack, or Discord, and it responds using whatever LLM you've configured.

Think of it like this: OpenClaw is to AI what Zapier is to app automation. It's the middleware that connects your communication channels to your AI models.

Why this matters in 2026:

  • Multi-channel AI: Your team lives in Slack. You live in Telegram. OpenClaw meets you where you are.

  • LLM flexibility: Switch between GPT-4, Claude, Gemini, or free Ollama models without changing your workflow.

  • Automation ready: OpenClaw integrates with MCP (Model Context Protocol), meaning you can build AI workflows that actually do things — not just chat.

  • Cost control: Run free local models via Ollama instead of paying $200/month to OpenAI.

If you're building GTM systems, managing outbound campaigns, or running a B2B operation, this is how you scale AI usage across your team without breaking the bank.

What You'll Learn in This Guide

By the end of this tutorial, you'll have:

  • OpenClaw is installed and running on macOS/Linux

  • OpenAI GPT-4 configured as your default LLM

  • Telegram bot responding to your messages

  • (Advanced) Slack workspace integration

  • (Advanced) Ollama running free local LLMs (with safe testing + easy rollback to OpenAI)

  • Backup and restore instructions so you never lose your working setup

Time required: 30-45 minutes for basic setup, 1-2 hours if you're configuring Slack + Ollama.

Prerequisites:

  • macOS or Linux (Windows users need WSL)

  • Terminal/command line familiarity

  • OpenAI API key (or willingness to install Ollama)

  • Telegram account

  • (Optional) Slack workspace admin access

Let's start.

Step 1: Install OpenClaw (5 Minutes)

OpenClaw installation is straightforward if you have Node.js installed. If not, we'll fix that first.

1.1 Install Node.js (If Needed)

Check if you have Node.js:

node --version

If you see a version number (v18+), skip to Step 1.2.

If not, install Node.js:

macOS (using Homebrew):

brew install node

Linux (Ubuntu/Debian):

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

Verify:

node --version
npm --version

1.2 Install OpenClaw via NPM

npm install -g openclaw

This installs OpenClaw globally so you can run it from any directory.

Verify installation:

openclaw --version

You should see something like openclaw/1.x.x.

Common error: If you see command not found: openclaw, your npm global bin path isn't in your shell PATH. Fix:

echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

(Replace .zshrc with .bashrc if you're using bash.)

Step 2: Onboard OpenClaw with OpenAI (10 Minutes)

Now comes the magic. OpenClaw's onboarding wizard will walk you through configuration.

2.1 Start Onboarding

openclaw onboard

You'll see an interactive prompt. Here's what to select:

1. Select LLM Provider:

? What LLM provider do you want to use?
> OpenAI
  Anthropic
  Google
  Ollama

Choose OpenAI (use arrow keys, press Enter).

2. Enter OpenAI API Key:

You'll need an OpenAI API key. Get one at: https://platform.openai.com/api-keys

? Enter your OpenAI API key:
sk-proj-xxxxxx...

Paste your key and press Enter.

Note: OpenClaw stores this securely in ~/.openclaw/openclaw.json. Never commit this file to GitHub.

3. Select Model:

? Which model?
> gpt-4o
  gpt-4o-mini
  gpt-4-turbo
  gpt-3.5-turbo

I recommend gpt-4o for best results. If you're budget-conscious, use gpt-4o-mini.

4. Select Channels:

? Select channels to enable:
  [ ] Slack
  [x] Telegram
  [ ] Discord
  [ ] WhatsApp

For now, just select Telegram (press Space to toggle, Enter to continue).

5. Configure Telegram:

Follow the prompts to create your Telegram bot:

  1. Open Telegram and message @BotFather

  2. Send /newbot

  3. Choose a name (e.g., "My OpenClaw Assistant")

  4. Choose a username (must end in 'bot', e.g., "mycompany_ai_bot")

  5. Copy the bot token (looks like 7165229316:AAExxxxxx...)

  6. Paste into OpenClaw prompt

? Enter Telegram bot token:
7165229316:AAExxxxxx...

6. Onboarding Complete:

✓ Configuration saved
✓ OpenClaw is ready to use

2.2 Start OpenClaw Gateway

openclaw gateway start

You should see:

OpenClaw Gateway started
Telegram: Listening...

Keep this terminal window open. OpenClaw needs to run to receive messages.

Step 3: Test Your Telegram Bot (5 Minutes)

3.1 Pair Your Telegram Account

OpenClaw uses a pairing system for security. You need to approve your Telegram account before it responds.

1. Find your bot on Telegram: Open Telegram and search for the bot username you created (e.g., @mycompany_ai_bot).

2. Start a conversation: Send: /start

The bot will respond with a pairing code:

To use this bot, ask your admin to approve:
openclaw pairing approve telegram ABC123XY

3. Approve pairing:

In your terminal (open a new tab, keep gateway running), run:

openclaw pairing approve telegram ABC123XY

Replace ABC123XY with your actual pairing code.

You should see:

✓ Approved telegram sender 123456789

3.2 Send Your First Message

Go back to Telegram and message your bot:

"What's the current weather in Dubai?"

Your bot should respond using GPT-4o. 🎉

Common issues:

Bot doesn't respond:

  • Check that openclaw gateway start is still running

  • Run openclaw doctor to diagnose issues

  • Check ~/.openclaw/logs/ for error messages

Bot responds but says "unauthorized":

  • You forgot to approve pairing. Run openclaw pairing approve telegram [CODE]

📬 Get Weekly AI Automation Insights

Want tactical guides like this every week?

Join 1,000+ founders getting our GTM Automation Newsletter — real OpenClaw workflows, AI outbound strategies, and tool stack breakdowns you won't find anywhere else.

Advanced: Configure Slack Integration (20 Minutes)

Telegram is great for personal use, but if you're running a team, Slack integration is where OpenClaw becomes a GTM superpower.

Why Slack + OpenClaw matters:

  • Your team can @mention the AI in any channel

  • AI responses are visible to everyone (transparency)

  • You can build automated workflows triggered by Slack messages

  • Works with your existing Slack workspace (no new tool adoption)

Step 1: Create a Slack App

1. Go to: https://api.slack.com/apps

2. Click "Create New App"

  • Choose "From scratch"

  • App Name: OpenClaw AI

  • Pick your workspace

  • Click Create App

Step 2: Configure Bot Scopes

1. In your new app, navigate to: "OAuth & Permissions" (left sidebar)

2. Scroll to "Scopes" → "Bot Token Scopes"

3. Add these scopes (click "Add an OAuth Scope"):

chat:write
app_mentions:read
channels:history
channels:read
groups:history
groups:read
im:history
im:read
im:write
mpim:history
mpim:read
reactions:read
reactions:write
pins:read
pins:write
emoji:read
commands
users:read
files:write

Why these scopes?

  • chat:write: Bot can send messages

  • channels:history + im:history: Bot can read message context

  • app_mentions:read: Bot responds when @mentioned

  • reactions:*: Bot can react to messages (useful for workflows)

Step 3: Enable Socket Mode

1. Navigate to: "Socket Mode" (left sidebar)

2. Toggle "Enable Socket Mode" → ON

3. Create App-Level Token:

  • Token Name: openclaw-connection

  • Scope: Select connections:write

  • Click Generate

  • Copy the token (starts with xapp-...)

Store this somewhere safe — you'll need it in a moment.

Step 4: Enable Event Subscriptions

1. Navigate to: "Event Subscriptions" (left sidebar)

2. Toggle "Enable Events" → ON

3. Subscribe to Bot Events:

Click "Add Bot User Event" and add:

app_mention
message.channels
message.groups
message.im
message.mpim
reaction_added
reaction_removed
pin_added
pin_removed

4. Click "Save Changes"

Step 5: Install App to Workspace

1. Navigate to: "OAuth & Permissions"

2. Click "Install to Workspace"

3. Review permissions and click "Allow"

4. Copy the "Bot User OAuth Token" (starts with xoxb-...)

Step 6: Configure OpenClaw for Slack

You have two options:

Option A: Environment Variables (Temporary, good for testing)

export SLACK_APP_TOKEN='xapp-1-A06xxxxxx...'
export SLACK_BOT_TOKEN='xoxb-7114xxxxxx...'
openclaw gateway restart

Option B: Config File (Permanent, recommended)

Edit OpenClaw config:

nano ~/.openclaw/openclaw.json

Add Slack configuration:

{
  "llm": {
    "provider": "openai",
    "apiKey": "sk-proj-xxx...",
    "model": "gpt-4o"
  },
  "channels": {
    "telegram": {
      "enabled": true,
      "botToken": "7165229316:AAExxxxxx..."
    },
    "slack": {
      "enabled": true,
      "appToken": "xapp-1-A06xxxxxx...",
      "botToken": "xoxb-7114xxxxxx...",
      "groupPolicy": "allowlist",
      "channels": ["C01234ABCD"]
    }
  }
}

Important: Replace C01234ABCD with your actual Slack channel ID.

How to find Slack channel ID:

  1. Open Slack

  2. Right-click the channel name

  3. Click "View channel details"

  4. Scroll to bottom, copy the Channel ID

GroupPolicy explained:

  • "allowlist": Bot only responds in specified channels (recommended)

  • "open": Bot responds everywhere (use for testing only)

Save and restart:

openclaw gateway restart

Step 7: Test Slack Integration

1. Invite the bot to a channel: In Slack, type: /invite @OpenClaw AI

2. Mention the bot:

@OpenClaw AI what's the weather in Dubai?

The bot should respond in-thread.

Troubleshooting:

Bot doesn't respond in Slack:

openclaw doctor

Look for Slack status. Should show:

Slack: ok (@OpenClaw AI) (245ms)

If it shows an error:

  • Verify both tokens are correct

  • Check that Socket Mode is enabled

  • Ensure channel ID is in allowlist

  • Try groupPolicy: "open" temporarily for testing

Advanced: Run Free LLMs with Ollama (30 Minutes)

OpenAI is powerful but expensive ($0.01-0.06 per 1K tokens). If you're running high-volume AI workflows, costs add up fast.

Ollama lets you run open-source LLMs locally — completely free. No API costs. No rate limits. Full privacy.

Trade-offs:

  • Free (no API costs)

  • Private (data never leaves your machine)

  • No rate limits

  • Slower responses (10-30 seconds first run, 3-10 seconds after)

  • Requires decent hardware (16GB+ RAM recommended)

  • Lower quality than GPT-4 (but close)

⚠️ SAFETY FIRST: This guide includes backup and rollback steps so you can safely test Ollama without breaking your working OpenAI setup.

Step 1: Backup Your Working Config

Before touching anything, save your current working OpenAI configuration:

cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.backup-openai-working.json

This creates a safety copy. If anything breaks, you can instantly restore it.

Step 2: Install Ollama

macOS (easiest way):

brew install ollama

If you don't have Homebrew:

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

Linux:

curl -fsSL https://ollama.com/install.sh | sh

Verify installation:

ollama --version

Optional: GUI Install
You can also download the Ollama desktop app from https://ollama.com/download if you prefer a visual interface.

Step 3: Start Ollama Service

Option A: Run in foreground (manual testing):

ollama serve

Keep this terminal window open.

Option B: Auto-start as background service (recommended for daily use):

# macOS
brew services start ollama

# Linux (systemd)
systemctl --user enable ollama
systemctl --user start ollama

Verify Ollama is running:

ollama --version
ollama run llama3.2

Type a test message. If the model replies, Ollama is working. Press Ctrl+D to exit.

Step 4: Test Ollama with OpenClaw (Safe Method)

This method doesn't touch your existing config. It runs a temporary Ollama-managed OpenClaw instance for testing.

1. Stop your current OpenClaw service (prevents port conflicts):

openclaw gateway stop

2. Launch OpenClaw with Ollama (temporary test run):

ollama launch openclaw

Choose a specific model (optional):

ollama launch openclaw --model llama3.2

3. Complete setup prompts in terminal if asked, then test from your Telegram/Slack.

4. When done testing, stop the Ollama instance (Ctrl+C) and restore your original OpenAI setup:

openclaw gateway start
openclaw status --deep

Your original OpenAI config is untouched. This was just a test run.

Step 5: Rollback to OpenAI If Needed

If Ollama doesn't work or you prefer OpenAI:

# Restore your backed-up OpenAI config
cp ~/.openclaw/openclaw.backup-openai-working.json ~/.openclaw/openclaw.json

# Restart with OpenAI
openclaw gateway restart

# Verify OpenAI is working
openclaw status --deep

This instantly reverts to your exact working OpenAI setup (including all Telegram/Slack configurations).

You're not locked into Ollama. You can switch back to OpenAI anytime.

Step 6: Make Ollama Permanent (Optional)

If you tested Ollama and want to keep using it permanently, you can configure it directly in your OpenClaw config:

Edit config:

nano ~/.openclaw/openclaw.json

Replace the llm section:

{
  "llm": {
    "provider": "ollama",
    "baseUrl": "http://localhost:11434",
    "model": "llama3.2"
  },
  "channels": {
    "telegram": {
      "enabled": true,
      "botToken": "YOUR_BOT_TOKEN_HERE"
    }
  }
}

Common mistakes to avoid:

  • Don't use "models": [] (old format)

  • Don't include OpenAI API keys (Ollama is local)

  • Use "model" (singular), not "models"

  • Include baseUrl: "http://localhost:11434"

Save and restart:

openclaw gateway restart
openclaw status --deep

Expected Performance

First message: 10-30 seconds (model loads into RAM)
Subsequent messages: 3-10 seconds

If responses are slower than 30 seconds, your hardware may be underpowered. Try a smaller model:

ollama pull phi3:mini

Then update config to "model": "phi3:mini".

Troubleshooting Ollama

Problem: OpenClaw can't connect to Ollama

# Verify Ollama is running
curl http://localhost:11434/api/tags

# Should return JSON with model list

Problem: Model not found

# List downloaded models
ollama list

# Download missing model
ollama pull llama3.2

Problem: Responses too slow

# Check system resources
top

# If RAM usage > 90%, try smaller model
ollama pull phi3:mini

View OpenClaw logs:

tail -f ~/.openclaw/logs/gateway.log

Troubleshooting: Nuclear Reset & Restart

Sometimes config files get corrupted, tokens expire, or you just want to start fresh.

Complete Reset (Deletes Everything)

⚠️ WARNING: This deletes all OpenClaw data, sessions, and config. Only use if you're truly stuck.

# Stop OpenClaw
pkill -f openclaw

# Delete all OpenClaw data
rm -rf ~/.openclaw

# Start fresh onboarding
openclaw onboard

Follow the onboarding steps again from Step 2.

Partial Resets (Targeted Fixes)

Reset just the config (keep sessions):

rm ~/.openclaw/openclaw.json
openclaw onboard

Reset Telegram pairing only:

rm ~/.openclaw/agents/main/sessions/sessions.json
openclaw gateway restart

Then re-pair your Telegram account.

View current config:

cat ~/.openclaw/openclaw.json

Check gateway status:

openclaw doctor

This shows:

  • LLM connection status

  • Channel connection status

  • Active sessions

  • Plugin/skill status

How Six Figure Consulting Uses OpenClaw

At SFC, we run OpenClaw connected to Slack with GPT-4 for our GTM team and Ollama (Llama 3.1) for high-volume prospecting tasks.

Our setup:

  • Slack + GPT-4o: Client communication review, outreach script generation, CRM data enrichment

  • Telegram + Ollama: Lead research, LinkedIn profile analysis, bulk email validation

  • MCP integrations: Auto-update Apollo.io with enriched data, sync qualified leads to Instantly

Why this matters: We're processing 2,000+ lead enrichment requests per week. With OpenAI APIs, that's $400-600/month. With Ollama, it's $0.

The quality drop from GPT-4 → Llama 3.1 for structured data tasks is ~10%. The cost savings is 100%.

If you're running outbound at scale, this is the stack.

Key Takeaways

OpenClaw centralizes AI across channels — Telegram, Slack, Discord, WhatsApp

Start with OpenAI for quality, test Ollama safely with built-in rollback

Slack integration = team-wide AI without changing tools

Ollama = free LLMs if you have decent hardware (16GB+ RAM) — test without breaking your OpenAI setup

Nuclear reset exists if you get stuck: rm -rf ~/.openclaw && openclaw onboard

Next Steps

Just getting started?

  1. Install OpenClaw + OpenAI (15 min)

  2. Configure Telegram (10 min)

  3. Test with your team for a week

Ready to scale?

  1. Add Slack integration

  2. Test Ollama safely with ollama launch openclaw (keeps OpenAI as backup)

  3. Build MCP workflows (advanced, separate guide)

Want help building AI-powered GTM systems?

Six Figure Consulting helps B2B agencies book 20-30+ qualified appointments monthly using AI-powered multi-channel outreach.

Free Resources

📥 Download Our Best GTM Templates:

📧 Weekly GTM Newsletter
Get tactical outbound strategies, AI tools, and real campaign breakdowns every week.
Subscribe here

🛠️ Tools Mentioned in This Guide:

  • Apollo.io – Lead data & enrichment

  • Instantly – Cold email automation

  • Clay – AI-powered lead research

  • Make – Workflow automation

💬 Join Our Communities:

About the Author:
Ankit Modi is the Founder of Six Figure Consulting, helping B2B agencies scale outbound using AI-powered GTM systems. SFC has booked 2,000+ appointments for 100+ clients globally.

Keep Reading