Self-hosted uptime monitoring bot (HTTP, TCP, Ping) integrated with Delta Chat. Features per-chat isolation, smart failure retry alerts, multi-transport SMTP failover, and responsive status pages.
  • Python 97.5%
  • Shell 2.1%
  • Dockerfile 0.4%
Find a file
2026-06-29 21:15:26 +01:00
.github/workflows Rename ntfy-changelog workflow to uptime-changelog to match bot name 2026-06-29 19:10:21 +01:00
tests Initial commit: Delta Chat Uptime Bot 2026-06-29 18:51:28 +01:00
.dockerignore Initial commit: Delta Chat Uptime Bot 2026-06-29 18:51:28 +01:00
.gitignore Initial commit: Delta Chat Uptime Bot 2026-06-29 18:51:28 +01:00
bot.py Apply custom transparent icon.png for web and favicon, keeping icon.jpg for Delta Chat avatar 2026-06-29 21:15:26 +01:00
CHANGELOG.md Initial commit: Delta Chat Uptime Bot 2026-06-29 18:51:28 +01:00
database.py Initial commit: Delta Chat Uptime Bot 2026-06-29 18:51:28 +01:00
docker-compose.yml Update container restart policy to unless-stopped in docker-compose.yml 2026-06-29 19:12:25 +01:00
Dockerfile Initial commit: Delta Chat Uptime Bot 2026-06-29 18:51:28 +01:00
icon.jpg Add compressed 512x512 JPG icon 2026-06-29 19:06:01 +01:00
icon.png Apply custom transparent icon.png for web and favicon, keeping icon.jpg for Delta Chat avatar 2026-06-29 21:15:26 +01:00
README.md Update README.md with valid hexadecimal mockup for fingerprint example 2026-06-29 19:26:52 +01:00
requirements.txt Initial commit: Delta Chat Uptime Bot 2026-06-29 18:51:28 +01:00
set_admin.py Initial commit: Delta Chat Uptime Bot 2026-06-29 18:51:28 +01:00
update.sh Add GitHub Actions CI/CD workflows and update.sh deployment script 2026-06-29 19:09:57 +01:00

Delta Chat Uptime Bot

Delta Chat Uptime Bot is a self-hosted uptime monitoring bot (similar to Uptime Kuma) integrated directly with Delta Chat. It monitors resources (websites, APIs, TCP ports, or ping targets) and alerts you inside Delta Chat if they go offline.

Additionally, it automatically generates a secure, beautiful web status dashboard for each chat.

Features

  • 🛡️ Secure Administration: Claim ownership with /initadmin via private chat. Cryptographic fingerprint-based authentication protects administrative actions.
  • 💬 Per-Chat Isolation: Each chat (private or group) maintains its own separate list of monitored resources.
  • ⚙️ Three Check Modes:
    • HTTP/HTTPS: Checks status code and latency (e.g. https://example.com).
    • TCP Port: Checks port availability (e.g. example.com:22).
    • Ping (ICMP): Sends standard ICMP echo requests (e.g. example.com).
  • 🔄 Failure Resiliency & Retry Logic:
    • Checks resources once a minute.
    • If a resource check fails, the bot does not alert immediately. It retries 2 more times at 30-second intervals.
    • Alerts are only triggered if all 3 checks fail, avoiding false positives.
    • Once a DOWN resource recovers, it is marked UP on the first successful check.
  • 📊 Uptime Dashboards: Generates a secure, 12-character unguessable base62 URL (e.g. https://up.example.com/k8D2x9mPqL1a) hosting a modern dark-themed web status dashboard for each chat.
  • ✉️ Multi-Transport Failover: Supports multiple SMTP servers and automatically falls back to backups if message delivery fails.

Commands

User Commands (Public per-chat)

These commands are available to any member of a chat. They support suffixes (e.g. /add@up, /status@uptime) to route commands correctly if multiple bots exist in the same chat.

  • /add <target> [name] — Add a monitor. Target formats:
    • https://google.com (HTTP/HTTPS check)
    • google.com:443 (TCP port check)
    • google.com (ICMP Ping check)
  • /remove <id> — Stop monitoring a resource by ID.
  • /list — List monitored resources and their status in this chat.
  • /status — View monthly uptime statistics and get the link to the chat's secure Web Status Page.
  • /help — View available commands and system information.

Admin-Only Commands

These commands are only executable by the configured administrator.

  • /url — View current base external status URL.
  • /url <url> — Update the base external status URL (e.g., /url https://up.gluek.info) to generate correct status links.
  • /accounts — List active bot accounts.
  • /rmaccount <id> — Delete a bot account.
  • /transports — Show configured mail relays, status, and stats.
  • /addtransport — Add backup mail relays (either chatmail URIs or address/password).
  • /rmtransport <addr> — Remove backup mail relay.
  • /setprimary <addr> — Switch primary SMTP transport.
  • /resilient — Toggle resilient sending (attempts sending on backups if primary fails).

Deployment

Prerequisites

  • Docker and Docker Compose installed.
  • A dedicated email address for the bot (e.g. uptimebot@yourdomain.com).
  • A domain name pointing to your host for the status pages (e.g. up.gluek.info).

1. Build and Prepare

Clone the repository, enter the directory, and build the Docker container:

cd deltachat_uptime
docker compose build

2. Configure Email and Admin

Initialize the bot account with your email and password:

docker compose run --rm uptime_bot python bot.py init uptimebot@yourdomain.com "your_email_password"

Configure your admin email address and optionally your cryptographic fingerprint on the server:

docker compose run --rm uptime_bot python set_admin.py --email admin@yourdomain.com
docker compose run --rm uptime_bot python set_admin.py --fingerprint 1234ABCD1234ABCD1234ABCD1234ABCD1234ABCD

3. Run the Bot

Start the bot daemon in background:

docker compose up -d

4. Claim Ownership inside Delta Chat

  1. Scan the bot's secure join QR code printed in the logs (docker compose logs uptime_bot) or add the bot's email address in Delta Chat.
  2. Send /initadmin to the bot in a private message.
  3. The bot will automatically verify your identity and associate your cryptographic fingerprint. You are now the administrator!

5. Set up Base URL

Tell the bot your public status domain so that it generates correct dashboard links:

/url https://up.gluek.info

Reverse Proxy with Caddy

If you use Caddy on your host (like for your ntfy bot), you can expose the status pages by adding the following config to your /etc/caddy/Caddyfile:

up.gluek.info {
    reverse_proxy 127.0.0.1:8080
}

Reload Caddy to apply changes:

sudo systemctl reload caddy