Telegram bot to send ed2k/magnet/torrent links to a remote mlDonkey and check downloads
855
A small Telegram bot that lets you push download links (ed2k, magnet, .torrent) to a remote mldonkey instance and check on your downloads — without exposing the web UI.
It runs as its own Docker container, completely independent from the mldonkey
container. It talks to mldonkey over its telnet console (port 4002 on the
host in this setup) and to Telegram over normal long-polling (no inbound ports,
no webhook needed).
ed2k://, magnet: or https://…/file.torrent link → added to downloads./downloads (/dl) — list active downloads with progress bars./cancel <num> / /pause <num> / /resume <num> — control a download by its number./bw — bandwidth stats./raw <cmd> — run any raw mldonkey console command (e.g. /raw vd)./help — show help./newbot,
follow the prompts, and copy the token.cp .env.example .env
# edit .env: TELEGRAM_BOT_TOKEN, ALLOWED_USER_IDS, MLDONKEY_HOST, ...
mldonkey only accepts console connections from IPs in its allowed_ips list.
The bot connects to the host (192.168.1.15), so the connection arrives at
mldonkey from the Docker gateway / host. Make sure that source is allowed.
Easiest: in the mldonkey web UI (http://192.168.1.15:4080) → Options →
search allowed_ips, or edit appdata/mldonkey/downloads.ini:
allowed_ips = ["127.0.0.1"; "10.0.0.0/8"; "172.16.0.0/12"; "192.168.0.0/16"]
Then restart the mldonkey container. (If a console password is set, put it in
MLDONKEY_PASSWORD in .env.)
docker compose up -d --build
docker compose logs -f
In Telegram, send /help to your bot, then paste a link.
/downloads view parses mldonkey's vd output heuristically. If the
layout from your mldonkey version doesn't render nicely, use /raw vd and
the formatting can be tuned in formatting.py.ALLOWED_USER_IDS set — otherwise anyone who finds the bot can drive
your downloader.Content type
Image
Digest
sha256:d81371133…
Size
46.6 MB
Last updated
3 months ago
docker pull christt105/teledonkey