A self-healing Telegram bot that monitors your Nexus Network nodes, alerts you when they go down, and automatically restarts them via screen.
- Per-node monitoring — checks each node independently via
ps aux - Auto-restart — relaunches dead nodes using
screensessions - Smart cooldown — prevents restart spam with a per-node cooldown timer
- Telegram dashboard — inline keyboard with system stats, node list, logs, and settings
- Notifications toggle — enable/disable alerts without stopping the bot
- Manual restart — trigger a restart for any node directly from Telegram
- Python 3.10+
screen(apt install screen/pacman -S screen/dnf install screen)- A Telegram bot token from @BotFather
- Your Telegram chat ID (get it from @userinfobot)
git clone https://github.com/CryptoB1t/nexus-sentinel-dashboard
cd nexus-sentinel-dashboard
chmod +x deploy.sh
./deploy.shdeploy.sh will:
- Help setup .env file
- Create a Python virtual environment and install Python dependencies
- Patch the systemd service file with your actual install path
- Register and start the service
After deploying, check that everything is running:
sudo systemctl status nexus-sentinel
sudo journalctl -u nexus-sentinel -fsudo systemctl stop nexus-sentinel
sudo systemctl disable nexus-sentinel
sudo rm /etc/systemd/system/nexus-sentinel.service
sudo systemctl daemon-reload
rm -f .env
rm -rf .venv data/Then run ./deploy.sh again.
All configuration is done via .env. deploy.sh creates it from .env.example automatically.
| Variable | Required | Default | Description |
|---|---|---|---|
TELEGRAM_BOT_TOKEN |
✅ | — | Bot token from @BotFather |
ADMIN_CHAT_ID |
✅ | — | Your Telegram chat ID |
NEXUS_PATH |
/root/.nexus/bin/nexus-network |
Path to the nexus-network binary | |
CHECK_INTERVAL_SECONDS |
30 |
How often to poll node status (seconds) | |
COOLDOWN_SECONDS |
600 |
Cooldown between restarts per node (seconds) | |
DATA_DIR |
data/ |
Directory for nodes list, settings, and logs |
| Command | Description |
|---|---|
/start |
Open the main dashboard |
/status |
Show system stats and node status |
/add <ID> |
Add a node ID to the watchlist |
/remove <ID> |
Remove a node ID from the watchlist |
The inline keyboard also provides quick access to node logs, manual restarts, and notification toggles.
nexus-sentinel/
├── monitor.py # Main bot + monitoring logic
├── deploy.sh # One-shot install script
├── requirements.txt # Python dependencies
├── nexus-sentinel.service # systemd service file
├── .env.example # Environment variable template
├── .gitignore
└── data/ # Created at runtime (gitignored)
├── nodes_list.txt # Watched node IDs
├── settings.json # Bot settings (notifications toggle)
└── nexus_watch.log # Bot log file


