Online Server Monitor

Security model

Security Model of Online Server Monitor

Online Server Monitor is designed for practical server actions without sending SSH passwords or opening inbound SSH sessions from the backend.

Overview

Security model overview

The service uses a local agent model. Telegram is the control interface, the backend queues signed actions, and the agent on your Linux server reports metrics and executes only allowlisted maintenance tasks.

Backend

What the backend does

The backend stores server records, pairing tokens, recent metrics, thresholds and queued commands. It sends Telegram messages and accepts HTTPS requests from paired agents.

Agent

What the local agent does

The agent reads local Linux health information, sends heartbeat and metrics over HTTPS, checks detected systemd services, and polls for signed command requests.

Collected data

What data is collected

Never collected

What is never collected

SSH

Why SSH passwords are not needed

The backend does not open SSH sessions to monitored servers. The installed agent connects outward over HTTPS, which keeps monitoring separate from password-based remote administration.

Pairing

Pairing token lifecycle

A pairing token is created in Telegram with /add_server, expires quickly, and is used only to register an agent. If the token expires, generate a new one.

Commands

Command signing and confirmation

Maintenance actions are queued by the backend, scoped to one server, short-lived, and handled by the local agent. Reboot requests require confirmation before they are queued.

Allowlist

Allowlisted maintenance actions

Logs

Log cleanup safety

Log cleanup is not a free-form shell box. It should use controlled journal and log rotation actions so Telegram users cannot submit arbitrary commands.

Threat model

What this design protects against

The main goal is to avoid turning a Telegram bot into an SSH password vault or a public command runner. The backend should not need reusable server login credentials, and the Telegram user should not be able to type arbitrary shell commands through chat.

Chat safety

Private chats, groups and operational access

A Telegram group can be useful for shared visibility, but every person in that group may see status cards and action buttons. Add the bot only to groups where participants are trusted to see server names, service states and maintenance prompts.

Secrets

How to treat agent secrets

The local agent secret is server-side authentication material. Treat it like an API credential: do not paste it into support chats, screenshots, public tickets or documentation. If you suspect it leaked, reinstall the agent with a fresh pairing token and remove the old server record.

Command scope

Why allowlisted commands matter

A restart button should restart a known service, not execute an arbitrary string. A log cleanup button should run a predictable cleanup action, not accept user-provided paths. This keeps Telegram actions narrow enough to review and explain.

Incident response

If a server or Telegram chat is compromised

If a monitored server is compromised, stop the local agent, remove or rotate its local secret, and inspect queued commands. If a Telegram chat is compromised, remove the bot from that chat, revoke the related server records, and pair the server again from a safe chat.

Audit checklist

Security checklist for production use

Removal

How to remove a server

Remove the server from service storage and stop the local agent on the monitored server. If a server is compromised, revoke or rotate the local agent secret by reinstalling with a fresh pairing token.

FAQ

Security FAQ

Start monitoring

Connect a Linux server from Telegram.

Open the bot, request a one-time pairing command, run it on the server and receive the first status report in Telegram.