---
title: MardisBot
description: Telegram bot for Mardis group
host: tg_bots-vm
status: active
last_reviewed: 2026-09-10
owner: gmikcon
confidence: 100
review_interval: 90
source_of_truth: live_system
---

# MardisBot

Telegram bot for the Mardis group.

> **STATUS 2026-09-10: 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, hostname `tgbots`)** — NOT on the
> external VPS `tgbots` (192.168.1.178, hostname `vmk`), 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.

## Live deployment (verified 2026-09-10)
- **Host**: 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)
- **User**: `ubuntu` (password in gnexus-creds secret "tgbots")
- **Project Path**: `/home/ubuntu/bots/MardisBot`
- **Main Script**: `bot.py` (venv: `/home/ubuntu/bots/MardisBot/venv`,
  Python 3.10)
- **Config**: `.env` in project dir (bot token, not documented here)
- **Dependencies**: python-telegram-bot[job-queue], python-dotenv
  (requirements.txt)

## systemd service
- **Service Name**: `mardisbot.service` — active (running), enabled
- **Unit File**: `/etc/systemd/system/mardisbot.service`
- **Running since**: 2026-08-13 08:51:30 UTC
- **Memory**: ~40 MB

### Service management
```bash
sudo systemctl status mardisbot.service
sudo journalctl -u mardisbot.service -f
sudo systemctl restart mardisbot.service
```

## Health notes (2026-09-10)
- Occasional `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.
