Skip to content
Notifications

How to Set Up Telegram Alerts for Server Security

7 min read

Your server is under attack at 3 AM. If you find out at 9 AM when you SSH in to check logs, the attacker had 6 hours of uninterrupted access. Real-time notifications change the timeline. Telegram puts security alerts in your pocket: on your phone, your desktop, your watch.

InnerWarden's Telegram integration goes beyond simple alerting. It is a two-way conversation with your server's security agent. You receive structured alerts with context, you can approve or deny actions with inline buttons, and you can ask the AI questions about what is happening on your server.

Why Telegram is ideal for security alerts

  • Always with you - phone, desktop, tablet, web. Wherever you are, the alert reaches you.
  • Rich formatting - Markdown messages with structured data, not plain text emails that get buried in your inbox.
  • Inline buttons - approve or deny security actions without opening a terminal. Tap a button, the action executes.
  • Free and unlimited - no per-message charges, no rate limits that matter for security alerting, no vendor lock-in.
  • End-to-end encryption available - secret chats for sensitive conversations if needed.

What security alerts look like

When InnerWarden finds an intrusion in progress that nothing has contained, you receive a Telegram message with full context. The example below shows the layout, using a blocked brute force as the story. A blocked brute force does not page you by default: it is on the dashboard and in the daily briefing.

alertSSH brute-force blocked | 203.0.113.47
details12 failed logins in 34s | AbuseIPDB: 100% | GeoIP: Linode, SG
actionFirewall deny rule added | TTL 24h | reported to AbuseIPDB

Every alert includes the attack type, source IP, evidence summary, AI confidence score, action taken, and links to the full audit trail on the dashboard.

Bot commands

The Telegram bot supports commands that let you interact with your server's security status:

/statusCurrent server status + active incidents
/incidentsRecent incidents with severity and status
/askAsk the AI about your server's security
/modeShow or change the response mode (changes the host)
/unblockReverse a containment (changes the host)
/undoRoll back a recent action (changes the host)

The /ask command is particularly powerful. You can ask natural language questions like "What happened last night?" or "How many IPs were blocked today?" and the AI answers based on your server's actual data.

The bot can change the host: lock it down

The bot is not read-only. Besides reporting, it accepts commands that change the host: /mode switches the response mode, /unblock reverses a containment, /undo rolls back a recent action, and the inline buttons approve or deny what the agent proposes. It only answers the chat ID you configure, and a misconfigured chat ID drops every update rather than authorising a stranger.

Treat that chat like an admin console. Anyone who controls your Telegram account controls those commands, so turn on the second factor: with innerwarden config 2fa, the permanent changes (a mode switch, an unblock, a standing rule) ask for a TOTP code from your authenticator app before they run. It is opt-in and off by default, so a fresh install does not ask for it.

What the bot sends follows InnerWarden's principle of AI isolation: the AI reads and recommends, and the Rust runtime validates and executes, including the commands you send from the chat. See Dashboard and notifications for which actions can require the second factor.

Set it up in 2 minutes

You need a Telegram bot token from @BotFather and your Telegram chat ID. The setup wizard handles both:

Install (Pro or Enterprise, Linux)
curl -fsSL https://www.innerwarden.com/install | sudo bash -s -- --license=/path/to/license.txt

The licence selects the paid tier: without it the same command installs the free one. The full steps, including how to check the installer before you run it, are in Install and first run.

Configure Telegram
innerwarden config telegram

The wizard asks for your bot token and chat ID, sends a test message, and saves the configuration. From that point, Telegram pages you for an intrusion in progress that nothing has contained. Everything else, brute force and port scans included, stays on the dashboard and in the daily briefing.

Verify
innerwarden get status

Prefer Slack? That works too

InnerWarden also supports Slack webhooks for teams that use Slack instead of Telegram. Same structured alerts, same context. Configure with innerwarden config slack. Both can run simultaneously if you want alerts in both channels.

What to do next

  • SSH brute-force detection - the most common thing InnerWarden detects. It lands on the dashboard and in the daily briefing, not in Telegram, unless it turns into an intrusion nothing has contained.
  • A real 24-hour attack log - see what a day of Telegram alerts looks like on a production server.
  • AI security without root - understand the isolation model that keeps the Telegram bot safe.