Cue OS
Setup

OpenClaw on Telegram

Connect OpenClaw to a Telegram bot by hand, run the gateway, and approve pairing.

This page connects OpenClaw, running on a computer, to a Telegram bot. It follows OpenClaw setup. To message Cue from Telegram without OpenClaw, use Telegram, which connects through Cue CLI.

These steps are manual and have not been checked end to end on Cue OS. On current Cue computers, OpenClaw blocks its bundled Telegram plugin because of its folder permissions, and openclaw plugins list shows no plugins loaded, so this setup will not work there yet. Cue also already runs the OpenClaw gateway on port 18789 on those computers, so the start commands below use --force to replace it.

OpenClaw's Telegram channel has no separate login command. You add the bot token to the config, then start the gateway.

1. Create the bot

In Telegram:

  1. Open @BotFather.
  2. Send /newbot.
  3. Pick a display name and a username.
  4. Copy the bot token.

Treat the bot token like a password.

2. Add the bot to OpenClaw

For a first test, use pairing for direct messages and turn groups off:

openclaw config set channels.telegram.enabled true --json
openclaw config set channels.telegram.botToken '"<TELEGRAM_BOT_TOKEN>"' --json
openclaw config set channels.telegram.dmPolicy '"pairing"' --json
openclaw config set channels.telegram.groupPolicy '"disabled"' --json
openclaw config set channels.telegram.streaming '"off"' --json
  • dmPolicy: "pairing" is the shortest path to a first test.
  • groupPolicy: "disabled" avoids a warning about an empty group allowlist.
  • streaming: "off" sends each reply in one piece while you set things up.

3. Start the gateway

Run the gateway in the foreground and leave that terminal open:

openclaw gateway --force

Or run it in the background so you keep your prompt. Logs go to ~/.openclaw/logs/gateway-sandbox.log:

mkdir -p ~/.openclaw/logs
nohup openclaw gateway --force > ~/.openclaw/logs/gateway-sandbox.log 2>&1 &
sleep 4

Check the gateway:

openclaw gateway status
tail -n 60 ~/.openclaw/logs/gateway-sandbox.log

What you want to see:

  • Connectivity probe: ok
  • a log line showing Telegram started

openclaw gateway status also reports the background service as disabled. That is expected on a computer without a background service manager.

4. Pair your first message

Telegram bots cannot message you first.

  1. Open https://t.me/<bot_username>.
  2. Tap Start.
  3. Send hello.

Then approve the pairing on the computer. If the gateway runs in the foreground, use a second terminal:

openclaw pairing list telegram
openclaw pairing approve telegram <PAIRING_CODE>

Send the bot another message.

Telegram access and model access are separate. If Telegram connects but the bot does not give real replies, finish Model auth.

5. Allow only yourself

After the first test works, you can replace pairing with a list of allowed users.

Find your Telegram user ID: message the bot, run openclaw logs --follow, and read from.id. Or ask the Telegram Bot API:

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

Then update the config:

openclaw config set channels.telegram.dmPolicy '"allowlist"' --json
openclaw config set channels.telegram.allowFrom '["<YOUR_TELEGRAM_USER_ID>"]' --strict-json

6. Add groups later

Only do this after direct messages work:

openclaw config set channels.telegram.groupPolicy '"allowlist"' --json
openclaw config set channels.telegram.groupAllowFrom '["<YOUR_TELEGRAM_USER_ID>"]' --strict-json
openclaw config set channels.telegram.groups '{"*":{"requireMention":true}}' --strict-json

In BotFather, also check /setjoingroups and /setprivacy. If the bot must see every group message, turn privacy mode off or make the bot a group admin.

Troubleshooting

  • openclaw gateway restart says the gateway service is disabled. That is expected on a computer without a background service manager. Start it with openclaw gateway --force instead.
  • The config is saved but no replies arrive. Check that the gateway is running and that you approved the pairing code.
  • Warnings mention empty group allowlists. For a direct-message-first setup, set channels.telegram.groupPolicy to "disabled".
  • You cannot message the bot. Open https://t.me/<bot_username> and tap Start.

Next: Model auth.

Brand and press

Cue, Cue OS and the ~ logo are trademarks of Plus One Labs, LLC.

© 2026 Plus One Labs, LLC

On this page