Real-time Telegram notification bot for Mostro administrators. Monitors Nostr dispute events (kind 38386) and sends instant alerts to a Telegram group or channel.
When a user opens a dispute on Mostro, administrators need to respond quickly. Users in disputes are worried β fast response times build trust and improve the experience.
mostro-watchdog bridges Nostr and Telegram so admins get notified the instant a dispute is created, without needing to monitor Mostrix or Nostr clients constantly.
Mostro daemon β Nostr (kind 38386) β mostro-watchdog β Telegram alert
- Mostro daemon publishes a dispute event (kind 38386) to Nostr relays
- mostro-watchdog subscribes to these events filtered by your Mostro's pubkey
- When a new dispute is detected (status:
initiated), it sends a formatted alert to your Telegram group/channel - Admins see the alert and can take the dispute via Mostrix or their preferred admin client
- Rust (1.75+)
- A Telegram bot token (from @BotFather)
- Your Mostro daemon's Nostr public key
Some Rust crates require native libraries and build tools. Install them before building:
Ubuntu / Debian:
sudo apt update
sudo apt install -y cmake pkg-config libssl-devmacOS (Homebrew):
brew install cmake openssl pkg-config
export OPENSSL_DIR=$(brew --prefix openssl)Tip: Add the
export OPENSSL_DIR=...line to your~/.zshrc(or~/.bashrc) so you don't have to set it every time.
The easiest way to install mostro-watchdog is using our installation script:
# Download and run the installation script
curl -fsSL https://raw.githubusercontent.com/MostroP2P/mostro-watchdog/main/install.sh | bash
# Or for custom installation directory:
curl -fsSL https://raw.githubusercontent.com/MostroP2P/mostro-watchdog/main/install.sh | bash -s -- --install-dir ~/.local/binPrefer to inspect before running?
curl -fsSL -o install.sh https://raw.githubusercontent.com/MostroP2P/mostro-watchdog/main/install.sh less install.sh # review the script bash install.sh # run after inspection
The script will:
- β Auto-detect your platform (Linux x64/ARM64, macOS Intel/Apple Silicon, Windows via WSL/Git Bash/MSYS2)
- β Download the latest pre-built binary
- β Verify checksums for security
- β
Install to
/usr/local/bin(or custom directory) - β Set executable permissions
- β Provide next steps guidance
Download the latest binary for your platform from the releases page:
Linux:
# x86_64 (Intel/AMD)
curl -LO https://github.com/MostroP2P/mostro-watchdog/releases/latest/download/mostro-watchdog-linux-x86_64
chmod +x mostro-watchdog-linux-x86_64
sudo mv mostro-watchdog-linux-x86_64 /usr/local/bin/mostro-watchdog
# ARM64 (Raspberry Pi, ARM servers)
curl -LO https://github.com/MostroP2P/mostro-watchdog/releases/latest/download/mostro-watchdog-linux-aarch64
chmod +x mostro-watchdog-linux-aarch64
sudo mv mostro-watchdog-linux-aarch64 /usr/local/bin/mostro-watchdogmacOS:
# Intel Macs
curl -LO https://github.com/MostroP2P/mostro-watchdog/releases/latest/download/mostro-watchdog-macos-x86_64
chmod +x mostro-watchdog-macos-x86_64
sudo mv mostro-watchdog-macos-x86_64 /usr/local/bin/mostro-watchdog
# Apple Silicon (M1/M2/M3)
curl -LO https://github.com/MostroP2P/mostro-watchdog/releases/latest/download/mostro-watchdog-macos-aarch64
chmod +x mostro-watchdog-macos-aarch64
sudo mv mostro-watchdog-macos-aarch64 /usr/local/bin/mostro-watchdogWindows:
# Download and install to user directory
$UserBin = "$env:USERPROFILE\bin"
New-Item -ItemType Directory -Force -Path $UserBin
Invoke-WebRequest -Uri "https://github.com/MostroP2P/mostro-watchdog/releases/latest/download/mostro-watchdog-windows-x86_64.exe" -OutFile "$UserBin\mostro-watchdog.exe"
# Add $UserBin to your PATH environment variable if not already presentVerify the download (recommended):
# Download checksums
curl -LO https://github.com/MostroP2P/mostro-watchdog/releases/latest/download/manifest.txt
# Verify your binary
# Linux/WSL
sha256sum -c manifest.txt --ignore-missing
# macOS
shasum -a 256 -c manifest.txt
# Windows (PowerShell)
# Manual verification - compare hash from manifest.txt with:
# Get-FileHash .\mostro-watchdog-windows-x86_64.exe -Algorithm SHA256git clone https://github.com/MostroP2P/mostro-watchdog.git
cd mostro-watchdog
cp config.example.toml config.toml
# Edit config.toml with your settings
docker compose up -dPre-built images are available from GitHub Container Registry:
docker pull ghcr.io/mostrop2p/mostro-watchdog:latest
docker run -d --name mostro-watchdog --restart unless-stopped \
-v $(pwd)/config.toml:/config/config.toml:ro \
ghcr.io/mostrop2p/mostro-watchdog:latestSee DOCKER.md for full documentation.
git clone https://github.com/MostroP2P/mostro-watchdog.git
cd mostro-watchdog
cargo build --release
# Binary will be at ./target/release/mostro-watchdog# Copy the example config
cp config.example.toml config.toml
# Edit with your values
nano config.tomlYou'll need to set:
mostro.pubkeyβ Your Mostro daemon's Nostr public keynostr.relaysβ The relays your Mostro daemon usestelegram.bot_tokenβ Token from @BotFathertelegram.chat_idβ The Telegram group/channel ID for alerts
# Default (looks for ./config.toml, then ~/.config/mostro-watchdog/config.toml)
./target/release/mostro-watchdog
# Custom config path
./target/release/mostro-watchdog --config /path/to/config.toml
# Positional argument also works
./target/release/mostro-watchdog /path/to/config.toml
# With debug logging
RUST_LOG=mostro_watchdog=debug ./target/release/mostro-watchdog
# Help & version
./target/release/mostro-watchdog --help
./target/release/mostro-watchdog --versionThe config file is searched in this order:
./config.toml(current directory)~/.config/mostro-watchdog/config.toml
Or specify it explicitly with --config / -c.
- Open Telegram and message @BotFather
- Send
/newbotand follow the instructions to create a new bot - Copy the bot token to your
config.toml - Create a private group/channel for your admin team
- Add the bot to the group/channel
- Get the chat ID (see config.example.toml for instructions)
When a dispute is detected, you'll receive a message like:
π¨ NEW DISPUTE
π Dispute ID: abc123def456
π€ Initiated by: buyer
β° Time: 2026-02-11 18:30:00 UTC
β‘ Please take this dispute in Mostrix or your admin client.
| Field | Description |
|---|---|
mostro.pubkey |
Mostro daemon's Nostr public key (hex or npub) |
nostr.relays |
Array of Nostr relay WebSocket URLs |
telegram.bot_token |
Telegram bot API token |
telegram.chat_id |
Telegram chat/group/channel ID for alerts |
- Pre-built binaries for Linux, macOS, Windows β Available now with automatic installation script
- Health check / heartbeat notifications β Configurable monitoring and alerting
- Alert on dispute status changes β Monitor all dispute lifecycle events
- Multiple Telegram channels for different event types
- Docker image
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
