In this guide, we’ll walk through how to install OpenClaw on macOS and connect it to Telegram step by step.
OpenClaw is a self-hosted AI assistant that runs locally on your machine while connecting to messaging platforms like Telegram, WhatsApp, Discord, and more. Unlike typical cloud chatbots, OpenClaw gives you full control over your model, workspace, sessions, and integrations.
By the end of this tutorial, you will have:
- OpenClaw installed on macOS
- An AI model configured (using OpenAI in this example)
- Telegram bot connected and approved
- Gateway service running in the background
- Web dashboard and TUI are working
- A fully functioning Telegram AI assistant Let’s get started.
Step 1: Install OpenClaw on macOS
Before connecting OpenClaw to Telegram, we first need to install it locally.
OpenClaw provides a modern installer that automatically detects your operating system and installs the required dependencies (including Node.js if needed).
Run the Installer
Open your terminal and run:
curl -fsSL https://openclaw.ai/install.sh | bash
This command will:
- Detect your operating system
- Verify Homebrew (if on macOS)
- Check Node.js installation
- Install OpenClaw globally via npm
- Prepare your environment
- Installation Output
If everything is configured correctly, you should see output similar to this:
OpenClaw Installer
Detected: macOS
Install method: npm
Requested version: latest
[1/3] Preparing environment
✓ Homebrew already installed
✓ Node.js v24.6.0 found
[2/3] Installing OpenClaw
✓ Git already installed
INFO Installing OpenClaw v2026.2.15
✓ OpenClaw npm package installed
✓ OpenClaw installed
[3/3] Finalizing setup
OpenClaw installed successfully (2026.2.15)!
Installation complete. Your productivity is about to get weird.
INFO Starting setup
OpenClaw 2026.2.15
This confirms:
- Your dependencies are ready
- The latest OpenClaw version is installed
- Setup has successfully initialized
That means OpenClaw has successfully identified your environment and is preparing the installation.
Step 2: Complete Onboarding & Review Security Warning
After installation, OpenClaw automatically launches its onboarding process.
You’ll be greeted with the OpenClaw interface along with an important Security Warning screen.
Why This Warning Matters
OpenClaw is not a simple chatbot. It is an autonomous AI assistant capable of:
- Reading local files
- Executing system actions
- Running tools and automations
- Connecting to external services
Because of this, OpenClaw clearly warns users that:
A bad prompt can trick it into doing unsafe things.
This is expected behavior for agent-style systems.
Step 3: Configure the Model & Authentication Provider
After completing onboarding, OpenClaw will prompt you to select a Model/Auth Provider.
This is where you decide which LLM backend will power your assistant.
During setup, you’ll see a list of available providers. OpenClaw supports multiple options, allowing you to choose based on performance, pricing, availability, or infrastructure preference.
Supported Model Providers
OpenClaw provides flexibility by supporting a wide range of AI providers, including:
- Anthropic
- OpenAI
- OpenRouter
- LiteLLM
- Amazon Bedrock
- Vercel AI Gateway
- Moonshot AI
- MiniMax
- OpenCode Zen
- GLM Models
- Z.AI
- Synthetic
- Qianfan
This allows you to run OpenClaw using:
- Direct API providers
- Gateway aggregators
- Enterprise cloud backends
- Local or proxy-based model routing
You can choose whichever provider best fits your workflow and infrastructure.
Example Setup: OpenAI
In this tutorial, we’ll use OpenAI as the model provider.
During configuration:
Select OpenAI from the list
Choose the authentication method:OpenAI API Key
Enter your API key when promptedYou’ll see a prompt similar to:
Enter OpenAI API key
After entering a valid key, OpenClaw verifies the connection and continues setup.
Step 4: Select and Confirm the Default Model
After entering your API key, OpenClaw verifies it and automatically configures a default model.
You’ll see confirmation like:
Saved OPENAI_API_KEY to ~/.openclaw/.env
Model configured
Default model set to openai/gpt-5.1-codex
This means:
- Your API key is securely stored in the local .env file
- The model provider connection is successful
- A default model has been selected
Choosing Your Default Model
OpenClaw gives you the flexibility to:
- Keep the current default model
- Enter a custom model manually
- Select from the available models provided by your chosen backend
For example, with OpenAI, you may see options like:
- openai/gpt-5.1-codex
- openai/codex-mini-latest
- openai/gpt-4
- openai/gpt-4-turbo
- openai/gpt-4.1
- openai/gpt-4.1-mini
- openai/gpt-4o and more…
For this tutorial, we’ll use gpt-4o:
openai/gpt-4o
Step 5: Connect OpenClaw to Telegram
After configuring your model, OpenClaw will ask you to select a chat channel.
You’ll see something like:
Select channel (QuickStart)
● Telegram (Bot API)
○ WhatsApp (QR link)
○ Discord (Bot API)
○ Slack (Socket Mode)
...
Step 6: Enter Your Telegram Bot Token
After selecting Telegram (Bot API) as your channel, OpenClaw will prompt you to enter your Telegram bot token.
You’ll see instructions like:
Telegram bot token
1) Open Telegram and chat with @BotFather
2) Run /newbot (or /mybots)
3) Copy the token (looks like 123456:ABC...)
Generate the Token (If You Haven’t Already)
- Open Telegram
- Search for @botfather
- Run:
/newbot
- Choose a bot name
- Choose a username (must end in bot)
BotFather will return a token similar to:
123456789:AAExampleGeneratedToken
Enter the Token in OpenClaw
Back in your terminal, paste the token when prompted:
Enter Telegram bot token
OpenClaw will validate the token and complete the channel configuration.
If successful, Telegram is now linked to your OpenClaw instance.
Optional: Set via Environment Variable
Instead of pasting it interactively, you can also set it manually:
export TELEGRAM_BOT_TOKEN=your_token_here
Or add it to:
~/.openclaw/.env
This is useful for production or automated deployments.
Step 7: Channel Confirmed & Workspace Initialized
After entering your Telegram bot token, OpenClaw finalizes the channel configuration.
You’ll see confirmation like:
Selected channels
Telegram — simplest way to get started — register a bot with @BotFather and get going.
Updated ~/.openclaw/openclaw.json
Workspace OK: ~/.openclaw/workspace
Sessions OK: ~/.openclaw/agents/main/sessions
This confirms:
- Telegram channel is successfully configured
- The configuration file has been updated
- Workspace directory is initialized
- Agent session storage is ready At this point, your assistant is fully wired to Telegram.
What Just Happened?
OpenClaw created and validated:
- ~/.openclaw/openclaw.json → Main configuration
- ~/.openclaw/workspace → Working directory
- ~/.openclaw/agents/main/sessions → Conversation memory & state
This is where your agent:
- Stores sessions
- Maintains chat history
- Tracks tool execution
- Manages runtime state
- Everything is now persistent and structured.
Skills Status Overview
You’ll also see a skills report:
Skills status
Eligible: 7
Missing requirements: 42
Unsupported on this OS: 0
Blocked by allowlist: 0
What This Means
- Eligible → Skills ready to run
- Missing requirements → Optional skills requiring extra dependencies
- Unsupported on this OS → OS-incompatible tools
- Blocked by allowlist → Restricted skills This doesn’t mean something is broken — it simply reflects optional capabilities not yet installed.
You can install additional skills later as needed.
Step 8: Gateway Service Installed & Telegram Connected
After completing the configuration, OpenClaw installs and starts the Gateway service.
You’ll see output similar to:
Installing Gateway service....
Gateway service installed.
Telegram: ok (@yourbotname)
Agents: main (default)
Heartbeat interval: 30m
Session store: ~/.openclaw/agents/main/sessions/sessions.json
What Just Happened?
OpenClaw has now:
- Installed the Gateway service (runs in the background)
- Created a macOS LaunchAgent
- Linked your Telegram bot successfully
- Initialized the default agent
- Set up persistent session storage The important line is:
Telegram: ok
That means your bot is live.
What is the Gateway?
The Gateway is the control plane of OpenClaw.
It:
- Manages chat channels
- Handles agent sessions
- Maintains WebSocket connections
- Routes messages between Telegram and your model
- Stores session history
- Runs continuously in the background
On macOS, it installs as a LaunchAgent:
~/Library/LaunchAgents/ai.openclaw.gateway.plist
Logs are stored at:
~/.openclaw/logs/gateway.log
Step 9: Hatch the Bot in TUI
When you see:
How do you want to hatch your bot?
Hatch in TUI (recommended)
Do this:
Just press Enter.
That runs:
openclaw tui --ws://127.0.0.1:18789 --agent main --session main
You’ll then see:
connected | idle
agent main | session main
openai/gpt-4o
That means:
- Gateway running ✅
- Model connected ✅
- Session active ✅
- Bot alive ✅
You can now type:
Hello
and it responds.
Step 10: Open Dashboard & Start Chatting
Now your Gateway is running.
You can open the OpenClaw WebUI (Dashboard) in your browser:
http://127.0.0.1:18789
If a token was generated during setup, open it like this:
http://127.0.0.1:18789/#token=YOUR_TOKEN
(Use the exact token shown in your terminal.)
What you should see:
- Status: Connected
- Health: OK
- Chat interface ready
To Chat
- Go to Chat (left sidebar)
- Type your message in the input box
- Press Enter or click Send Example test message:
What is 12 × 14?
If it replies → your model, gateway, and agent are fully working.
Step 11: OpenClaw Access Configuration
Run this command to approve Telegram access:
openclaw pairing approve telegram your_code
Step 12: Chat with Telegram Bot
Open Telegram and send a message (e.g., "hello") to your bot.
If it replies, your Telegram bot is successfully connected and working.
Conclusion
You now have a fully working OpenClaw setup connected to Telegram.
In this walkthrough, we:
- Installed OpenClaw on macOS
- Configured the model provider and API key
- Selected a default model
- Connected Telegram using BotFather
- Installed and started the Gateway service
- Launched the TUI and Web Dashboard
- Approved Telegram pairing
- Successfully tested the bot
At this point, your assistant is live and running locally on your machine. Messages sent to your Telegram bot are routed through the OpenClaw Gateway, processed by your selected model, and returned in real time.
From here, you can explore:
- Adding more skills
- Connecting additional channels (WhatsApp, Discord, Slack)
- Enabling automation workflows
- Integrating tools like Notion, GitHub, or file access
- Running deeper security audits
OpenClaw turns your local machine into a personal AI control center. Now it’s your move — start building, automating, and experimenting.
Note
We’re excited to offer an exclusive opportunity for our community. You are eligible to receive free Azure credits worth $1,000 to explore, test, and deploy any TechLatest product or solution. Whether you’re building AI agents, experimenting with automation tools, or scaling your infrastructure, these credits give you the flexibility to innovate without upfront costs. This is a limited-time offer available on a first-come, first-served basis, so don’t miss out. To claim your credits, simply fill out the form here: https://www.techlatest.net/free_azure_credits/ and explore our available products and solutions here: https://techlatest.net/support/.
Thank you so much for reading
Like | Follow | Subscribe to the newsletter.
Catch us on
Website: https://www.techlatest.net/
Newsletter: https://substack.com/@techlatest
Twitter: https://twitter.com/TechlatestNet
LinkedIn: https://www.linkedin.com/in/techlatest-net/
YouTube:https://www.youtube.com/@techlatest_net/
Blogs: https://medium.com/@techlatest.net
Reddit Community: https://www.reddit.com/user/techlatest_net/

















Top comments (0)