install OpenClaw Telegram: If you want a personal AI assistant that actually does tasks from chat, this guide shows how to install OpenClaw and connect it to Telegram without exposing tokens or publishing drafts automatically.

Where this fits in the abcnote stack

OpenClaw setup belongs between the automation and home-lab clusters: it connects Telegram control, local machines, workflow permissions, and the same safety habits used for webhooks and browser automation. Continue with these public abcnote guides: AI Automation Workflows, Webhooks Guide, Zapier, Make, and n8n.

Quick answer

Use this guide to make a cleaner decision, avoid beginner mistakes, and prepare a site that looks useful before monetization.

What You Will Learn

  • How to install OpenClaw on macOS and Windows
  • How to create and connect a Telegram bot
  • How to test the Gateway and keep credentials safe

Reference Screenshots

These screenshots were captured from the relevant official sites while preparing this article. They are used as visual references so the guide feels concrete, not generic.

OpenClaw homepage and quick-start command area opened in a browser.
This guide now uses a real OpenClaw site screenshot, not a reader-provided reference image.
Telegram BotFather documentation opened in a browser.
Telegram bot setup should be checked against Telegram’s own BotFather documentation before adding a real token.

Command-Line Setup Summary

If you only want the short version first, start with these commands, then read the details below before connecting a real Telegram bot token.

macOS install

curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
openclaw doctor
openclaw gateway status

Windows PowerShell install

iwr -useb https://openclaw.ai/install.ps1 | iex
openclaw onboard --install-daemon
openclaw doctor
openclaw gateway status

OpenClaw is a personal AI assistant system that runs through a local Gateway and connects to chat channels such as Telegram, WhatsApp, Slack, Discord, and others. For a beginner, Telegram is often the easiest first channel because it only needs a Telegram bot token and a controlled setup flow.

This guide shows a practical starting path for Windows and macOS. It covers installation, first Gateway checks, Telegram bot setup, safe access control, and a simple way to test messages from the command line.

The goal is not to make a public chatbot. The safer beginner setup is a private assistant that only responds to you, uses draft-first automation, and keeps credentials out of public files.

What you need before starting

Prepare these items first:

  • a Windows PC or Mac
  • a Telegram account
  • access to Telegram’s official @BotFather
  • a model provider API key or login method supported by your OpenClaw setup
  • a terminal: PowerShell on Windows, Terminal on macOS
  • a place to store secrets safely, such as environment variables or a private password manager

OpenClaw’s current documentation recommends Node 24, with Node 22.19+ also supported. The official installer can handle Node setup automatically, so most beginners should use the installer instead of manually managing Node.

Install OpenClaw on macOS

Open Terminal and run the recommended installer:

curl -fsSL https://openclaw.ai/install.sh | bash

Then run onboarding:

openclaw onboard --install-daemon

The onboarding flow walks through model provider setup, Gateway setup, workspace setup, channels, and skills. The --install-daemon option installs the Gateway as a managed background service so it can stay running.

Verify the installation:

openclaw --version
openclaw doctor
openclaw gateway status

Open the local dashboard:

openclaw dashboard

If the dashboard opens and the Gateway status is healthy, the base install is working.

Alternative macOS install with npm

If you already manage Node yourself, OpenClaw can also be installed through npm:

npm install -g openclaw@latest
openclaw onboard --install-daemon

This is useful for developers who already keep Node versions under control. Beginners should usually start with the installer script.

Install OpenClaw on Windows

Windows users have two practical paths:

  • Windows Hub / companion app for the easiest desktop experience
  • PowerShell CLI install for terminal-first use

For the command-line install, open PowerShell and run:

iwr -useb https://openclaw.ai/install.ps1 | iex

Then run onboarding:

openclaw onboard --install-daemon

Verify the setup:

openclaw --version
openclaw doctor
openclaw gateway status

If you want to run the Gateway in the foreground for debugging, use:

openclaw gateway run

For a managed Windows Gateway service, the current OpenClaw documentation uses:

openclaw gateway install
openclaw gateway status --json

Windows WSL2 option

WSL2 can be a better fit when you want the most Linux-like Gateway runtime on Windows.

Install WSL:

wsl --install

Or choose Ubuntu explicitly:

wsl --list --online
wsl --install -d Ubuntu-24.04

Inside WSL, install OpenClaw using the Linux installer:

curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
openclaw gateway status

For most beginners, use the Windows Hub or PowerShell installer first. Use WSL2 when you know you want a Linux-style environment.

Create a Telegram bot with BotFather

Open Telegram and search for the official bot:

@BotFather

Start a chat and run:

/newbot

BotFather will ask for:

  • a display name
  • a bot username that usually ends in bot

After the bot is created, BotFather gives you a bot token. Treat that token like a password. Do not paste it into blog posts, GitHub issues, screenshots, or public config examples.

Connect Telegram to OpenClaw

OpenClaw supports a guided channel setup:

openclaw channels add

You can also add Telegram non-interactively:

openclaw channels add --channel telegram --token "<your_bot_token>"

On Windows PowerShell:

openclaw channels add --channel telegram --token "<your_bot_token>"

After configuring the channel, validate and restart the Gateway:

openclaw config validate
openclaw gateway restart
openclaw channels status --probe

If something looks wrong, run:

openclaw doctor --fix

Use pairing or allowlist access

Telegram bots can receive messages from real people and groups, so access control matters.

For a personal assistant, avoid making the bot public. The safer setup is:

  • direct messages use pairing or allowlist
  • group messages require a mention
  • only your Telegram user ID is allowed to control the assistant
  • sensitive tools require approval

OpenClaw’s Telegram documentation shows dmPolicy: "pairing" as a default direct-message approach. With pairing, a new sender receives a pairing code and must be approved before the assistant responds normally.

Start the Gateway:

openclaw gateway

Then check pairing requests:

openclaw pairing list telegram

Approve the pairing code:

openclaw pairing approve telegram <CODE>

Pairing codes expire, so approve them soon after the first message.

Find your Telegram user ID

For a private assistant, your numeric Telegram user ID is more reliable than a username. One safe method is:

1. Send a direct message to your new bot. 2. Watch OpenClaw logs. 3. Read the from.id value.

Command:

openclaw logs --follow

Another method is Telegram’s Bot API getUpdates.

On macOS or Linux:

curl "https://api.telegram.org/bot<your_bot_token>/getUpdates"

On Windows PowerShell:

Invoke-RestMethod "https://api.telegram.org/bot<your_bot_token>/getUpdates"

Look for:

"from": {
  "id": 123456789
}

That numeric ID is the user ID you can use in allowlists. Do not publish it if you do not need to.

Test sending a Telegram message

Once Telegram is connected, you can send a test message through OpenClaw.

openclaw message send --channel telegram --target "<your_chat_id_or_username>" --message "Hello from OpenClaw"

The OpenClaw CLI help shows the same pattern:

openclaw message send --channel telegram --target @mychat --message "Hi"

For a private direct chat, the target may be your Telegram chat ID. For a group, it may be a negative group ID such as -1001234567890. Do not confuse group IDs with user IDs.

Add OpenClaw to a Telegram group safely

For groups, two things matter:

  • the group chat ID
  • which users inside that group are allowed to trigger the bot

Telegram supergroup IDs often start with -100. These IDs belong under the group configuration, not under user allowlists.

For a private group setup, require a mention:

{
  channels: {
    telegram: {
      groups: {
        "-1001234567890": {
          requireMention: true
        }
      }
    }
  }
}

To allow only specific users inside that group:

{
  channels: {
    telegram: {
      groups: {
        "-1001234567890": {
          requireMention: true,
          allowFrom: ["123456789"]
        }
      }
    }
  }
}

This keeps the assistant from responding to every random group message.

A safe automation pattern for WordPress drafts

If you use OpenClaw to help write a WordPress blog, do not give the assistant your main WordPress administrator password. Use a separate WordPress user such as:

jarvis-editor

Then create a WordPress Application Password for that user and use it only for draft uploads.

The safer workflow is:

1. OpenClaw researches and drafts the article. 2. The article is uploaded to WordPress as draft. 3. A human reviews the title, facts, links, formatting, and category. 4. Only then is the post published.

For AdSense preparation, also keep the site free of ad code, ad widgets, empty monetization blocks, and affiliate banners until the site is ready for monetization review.

How to work around AI usage limits

If your AI provider or Codex environment hits a usage limit, do not assume background writing continues normally. Long tasks should be split into batches with saved files and status checkpoints.

A practical schedule looks like this:

  • Batch 1: research topics and build outlines
  • Batch 2: draft 3 to 5 posts
  • Batch 3: run fact-check and policy QA
  • Batch 4: upload approved drafts to WordPress
  • Batch 5: update the status tracker

This is slower than pretending everything is automatic, but it is safer. If a limit or tool outage happens, the next run can resume from the last saved draft instead of starting over.

Useful status commands include:

openclaw status
openclaw gateway status
openclaw channels status --probe
openclaw doctor

For writing operations, keep a simple content tracker with:

  • post number
  • title
  • slug
  • category
  • draft file
  • WordPress draft ID
  • QA status
  • upload status
  • publish decision

Security checklist

Before using OpenClaw with Telegram and WordPress, check these basics:

  • Do not publish Telegram bot tokens.
  • Do not commit .env files.
  • Do not share your main WordPress admin password.
  • Use a separate WordPress editor or author account.
  • Upload posts as drafts, not automatic publishes.
  • Use Telegram pairing or allowlists.
  • Require mentions in Telegram groups.
  • Run openclaw doctor after upgrades or config changes.
  • Rotate tokens if they were pasted into the wrong place.

Final setup checklist

Use this list when you want to confirm the first setup:

  • OpenClaw installed
  • openclaw --version works
  • openclaw doctor has no serious errors
  • Gateway is running
  • Dashboard opens
  • Telegram bot created through BotFather
  • Telegram token configured in OpenClaw
  • Pairing or allowlist is enabled
  • Test message works
  • WordPress draft-only account exists
  • No public post contains private tokens or chat IDs

Once those basics are stable, OpenClaw can become a practical publishing assistant: research ideas, write drafts, check quality, upload to WordPress as drafts, and keep you in control of the final publish button.

Useful reference: OpenClaw official site and Telegram’s official BotFather documentation.

Related reading

Before You Publish

  • Confirm the title includes the focus keyword naturally.
  • Check that the meta description is clear and not too short.
  • Add one or two relevant internal links after related posts exist.
  • Use only images that you own, created yourself, or have permission to publish.
  • Keep the article ad-free until AdSense is approved and connected properly.

The practical goal is not to make the article look optimized only to a plugin. The goal is to make it readable, trustworthy, and useful enough that the optimization score reflects real quality.

A safer OpenClaw setup review before real automation

Before connecting Telegram, decide what the assistant may read, what it may change, and which actions require human approval. A useful assistant should help with drafts, checks, and reminders before it gets permission to modify live systems.

Treat the Telegram bot token like a production credential. Store it outside screenshots, avoid sharing it in notes, and rotate it if it appears in a public place. Pair that habit with the same permission boundaries used in the AI automation workflow guide and the webhooks guide.

If OpenClaw later runs on a home server, connect it to the home lab setup and network-access guides. A local assistant is easier to trust when backups, network boundaries, and remote access rules are already documented.

Setup checkPractical ruleWhy it matters
Telegram tokenKeep the token private, rotate if exposed, and avoid screenshots with secrets.A leaked token can let someone interact with the bot.
Permission scopeStart with draft, read, and reminder actions before live changes.Small permissions reduce damage while workflows are still being tested.
Local machineUse a dedicated profile, separate folders, and clear logs where possible.Separation makes later audits easier.
Home-lab pathAdd backups and network boundaries before remote access.Automation is more reliable when the host is recoverable.