title: MardisBot description: Telegram bot for Mardis group host: tg_bots-vm status: active last_reviewed: 2026-09-12 owner: gmikcon confidence: 100 review_interval: 90
Telegram bot for the Mardis group.
STATUS 2026-09-12: ACTIVE on VM
tg_bots(192.168.1.254, libvirt VM on hypervisor bserv 192.168.1.130). Verified live via SSH: process running since 2026-08-13, systemd service active.Naming warning: there are TWO similarly named hosts. The bot lives on the VM
tg_bots(192.168.1.254, hostnametgbots) — NOT on the external VPStgbots(192.168.1.178, hostnamevmk), which hosts only the marginator web stack. Earlier documentation wrongly placed the bot on the VPS; after the VPS was rebuilt ~2026-08-27 the bot was believed missing, but it had actually been (re)deployed to the VM.
tg_bots, 192.168.1.254 (libvirt on bserv, disk /mnt/main/vm_main/tg_bots, bridge br0, MAC 52:54:00:94:4b:e0)ubuntu (password in gnexus-creds secret "tgbots")/home/ubuntu/bots/MardisBotbot.py (venv: /home/ubuntu/bots/MardisBot/venv, Python 3.10).env in project dir (bot token, not documented here)app.job_queue.run_daily(..., days=(3, 5), name="weekly_poll_wednesday_friday") in bot.py (~line 174). PTB 22.7 day convention: 0 = Sunday … 6 = Saturday (verified against the installed library source and its _CRON_MAPPING)..env: POLL_HOUR=19, POLL_MINUTE=0 (defaults in code are 10:00 if unset).print lines in bot.py state the configured time and days.mardisbot.service — active (running), enabled/etc/systemd/system/mardisbot.serviceEnvironment=PYTHONUNBUFFERED=1 (stdout was block-buffered under systemd, hiding startup logs in journalctl until process exit). Unit backup: /home/ubuntu/backups/mardisbot.service.bak_20260912.sudo systemctl status mardisbot.service sudo journalctl -u mardisbot.service -f sudo systemctl restart mardisbot.service
/home/ubuntu/backups/MardisBot_backup_20260912_155039.tar.gz (bot.py, .env, requirements.txt; venv excluded). Rollback: extract bot.py/.env from the archive, sudo systemctl restart mardisbot.service.The bot owner can manage this service remotely via the companion ops bot MardisOpsBot (@MardisOps_bot) — see 10-systems/bots/mardisopsbot.md. Commands: /status, /restart, /logs [N], /backup (download current MardisBot code as ZIP), and ZIP-upload update (send a .zip with bot.py to update the code on the VM — auto-backup before apply, auto-rollback if the service fails after restart; .env and venv are never touched). Access: first 3 Telegram users who press /start (user_ids persisted in admins.json on the VM). No SSH or inbound network access is required or granted.
telegram.error.NetworkError: Bad Gateway in journal (transient Telegram API/network blips; network_retry_loop recovers automatically). No error handlers registered in bot.py — cosmetic only.