This bot reports local server status only. It has no command that restarts, removes, shuts down, or otherwise changes the server.
-
In BotFather, revoke the token that was previously placed in source code and create a new token.
-
Create a virtual environment and install dependencies:
python3 -m venv .venv .venv/bin/pip install -r requirements.txt
-
Copy
.env.exampleto.env, setTELEGRAM_BOT_TOKEN, then run:set -a; . ./.env; set +a .venv/bin/python main.py
PROXY_URL is optional. SOCKS proxy support is included in requirements.txt.
/start, /help, /cpu, /ram, /disk, /uptime, /docker.
/docker executes only docker ps, which lists running containers. The service user needs permission to access Docker if you want container status; add it to the docker group only after considering that group’s elevated privileges.
-
Replace
User=CHANGE_MEindevops-telegram-bot.servicewith the account that owns the project. -
Install and start it:
sudo cp devops-telegram-bot.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable --now devops-telegram-bot sudo systemctl status devops-telegram-bot -
Inspect logs with
sudo journalctl -u devops-telegram-bot -f.