Online Server Monitor

Linux setup guide

How to Install Online Server Monitor on Linux

Use this guide to connect a Linux server to the online monitoring bot with a one-time pairing code and a local HTTPS agent.

Overview

What this guide covers

This guide explains how to add one Linux server to Online Server Monitor, verify the local agent, check logs, configure alert thresholds, reinstall the agent, and remove it when it is no longer needed.

Systems

Supported Linux systems

The agent is intended for systemd-based servers used for websites, mail, databases, application backends and small VPS deployments.

Requirements

Before you start

You need curl, bash, systemd, outbound HTTPS access to this site, and root or sudo access on the server. The service does not need inbound SSH access and does not ask for SSH passwords.

Step 1

Open the Telegram bot

Open @live_server_monitor_bot in Telegram and send /start. Use a private chat for personal servers or add the bot to an operations group if multiple people should see alerts.

Step 2

Create a pairing token with /add_server

Send /add_server. The bot creates a short-lived pairing token and prints a complete install command. You do not create the token manually; you only copy the command that Telegram shows.

Step 3

Run the install command

Paste the command into the target server terminal as root or with sudo. Replace PAIRING_TOKEN only with the token generated by the bot. Never publish a live pairing command in a public chat.

curl -fsSL https://server.howprog.one/agent/install.sh -o install.sh
sudo bash install.sh --api https://server.howprog.one --pair PAIRING_TOKEN

Step 4

Verify the systemd service

After the installer finishes, confirm that the agent service exists, is enabled and is running.

systemctl status hp-server-agent
systemctl enable hp-server-agent

Step 5

Check recent agent logs

If the server does not appear online in Telegram, check recent logs. These commands are read-only diagnostics.

journalctl -u hp-server-agent -n 100 --no-pager
curl -I https://server.howprog.one/healthz

Step 6

Configure thresholds

Use the Telegram threshold controls to set CPU, RAM, disk, load and SSL certificate expiry limits. Start with conservative values, then adjust after you see normal server behavior. A threshold should warn you before users notice trouble, without sending noise every few minutes.

SSL checks

How SSL certificate checks are discovered

The agent looks for public domain names in common nginx and Apache virtual host configuration files, then checks the certificate served on port 443 for each discovered domain. The bot reports the minimum number of days left and can alert before a certificate expires.

Reinstall

Reinstalling the agent

Generate a new pairing token with /add_server and run the install command again. Reinstalling is useful after moving a server, rotating the local agent secret, or repairing a broken service file.

Uninstall

Uninstalling the agent

Stop and disable the service before removing local configuration. Only run removal steps on a server you control and after you have confirmed the server no longer needs monitoring.

systemctl disable --now hp-server-agent
systemctl status hp-server-agent

Errors

Common installation errors

Production checklist

Before adding a production server

Before you paste the install command into a production server, decide which Telegram chat should own alerts, who is allowed to press maintenance buttons, and whether reboot actions should be used during business hours. Monitoring is most useful when the operational rules are clear before the first incident.

Installer behavior

What the installer changes on the server

The installer downloads or writes the local agent files, creates local configuration, registers the server with the backend, and starts a systemd service. It should not ask for SSH passwords, hosting panel passwords, database credentials, or cloud provider tokens. The pairing token is used only for initial registration.

File locations

Important files and service names

Use these paths when you need to audit the installation or explain it to another administrator. Exact internals may change as the agent evolves, but the systemd service name is the main operational handle.

Multiple servers

Adding more than one server

Repeat the /add_server flow for every server. Each server should receive its own pairing token and its own local agent secret. Do not reuse one pairing command across several machines because that makes ownership and troubleshooting harder.

After install

What to check after the first report

The first report is not just a success message. Use it to verify that the bot sees the right hostname, realistic CPU and RAM values, disk usage, load average, uptime, and detected services. If values look wrong, troubleshoot before relying on alerts.

Next steps

Recommended setup order

A good rollout is simple: install one server, wait for metrics, tune thresholds, test read-only status commands, then decide whether to expose maintenance buttons. This keeps the first production setup understandable and reduces surprises for the team.

FAQ

Setup 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.