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
- Hostname and server identifier.
- Operating system, kernel and uptime.
- CPU, RAM, disk, inode and load average metrics.
- Discovered web domain names and SSL certificate expiry dates.
- Detected systemd service names and states.
- Telegram chat identifiers needed to deliver bot messages.
Never collected
What is never collected
- No SSH passwords.
- No root passwords.
- No private SSH keys.
- No hosting panel passwords.
- No database passwords.
- No email passwords.
- No FTP passwords.
- No cloud provider credentials.
- No arbitrary public shell access.
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
- Restart detected systemd services.
- Clean old journal logs with controlled commands.
- Run logrotate through the agent path.
- Request a confirmed reboot.
- Change alert thresholds from Telegram.
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
- Confirm no SSH passwords are stored in the bot.
- Confirm only trusted chats can manage servers.
- Confirm reboot requires explicit confirmation.
- Confirm unknown services are not exposed as restart buttons.
- Confirm support requests do not include private keys or passwords.
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
- Use maintenance actions only on servers you control.
- Keep pairing tokens out of public chats.
- For data handling details, read the privacy policy.
- For legal usage rules, read the terms of use.
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.