tgn-stack
A self-hosted Telegram-first monitoring and notification stack for Linux servers. Built for simple checks, operational alerts, recovery messages, shell scripts, systemd units and infrastructure automation.
What is tgn-stack?
tgn-stack is a small production-ready stack for sending server alerts and recovery notifications to Telegram without deploying a heavy monitoring platform.
tgn-relay
Go notification relay and Telegram Bot API gateway. It receives internal requests and sends messages to configured Telegram groups.
tgnctl
CLI wrapper for sending notifications from shell scripts, cron jobs, systemd units, deployment hooks and operational automation.
tgn-watch
Lightweight monitoring agent for simple server checks with alert and recovery notifications through tgn-relay.
Supported checks
tgn-watch is focused on practical server checks that are useful for small infrastructure nodes, VPS, bare metal servers and self-hosted services.
Network checks
HTTP endpoints, TCP ports, DNS resolution and TLS certificate expiration.
System checks
systemd units, disk usage, memory usage, running processes and file age.
Custom checks
Run custom commands and send Telegram alerts when command status does not match the expected result.
Architecture
server checks / scripts / systemd / cron
|
| tgnctl or tgn-watch
v
tgn-relay
|
| Telegram Bot API
v
Telegram group / operator chatQuick example
Send a notification from shell:
tgnctl --tag deploy "Deployment completed successfully"Use tgn-watch for lightweight monitoring:
checks:
- name: openbld-site
type: http
url: https://openbld.net
interval: 30s
- name: dns-port
type: tcp
host: 127.0.0.1
port: 53
interval: 10s
- name: nginx
type: systemd
unit: nginx.service
interval: 30sGood fit for
Self-hosted infrastructure
Small services, VPS, DNS nodes, proxies, monitoring helpers and internal tools.
Operational alerts
systemd failures, backups, deployment hooks, TLS expiry and custom scripts.
OpenBLD production usage
The stack is already used in production inside OpenBLD infrastructure.