Skip to content

0xc7m/TorrentMediaHub

Version License Issues

About

TorrentMediaHub: Easy Setup for a Dockerized Torrent Hub with qBittorrent, Jackett, and Telegram Notifications

If you have a problem, request, or question then please open a new issue here.

This repository provides a streamlined, easy-to-deploy torrent hub using Docker Compose, featuring:

  • qBittorrent: A powerful and user-friendly BitTorrent client to manage and download torrents.
  • Jackett: An open-source indexer that enables you to access a wide variety of public and private torrent trackers by translating queries for qBittorrent.
  • Telegram Notification Bot: Get real-time updates and notifications directly to your Telegram when torrents are added or completed.

Features:

  • One-command deployment with Docker Compose
  • Customizable for various torrent trackers via Jackett
  • Telegram integration for convenient monitoring
  • Isolated setup using Docker containers
  • Optimized for automation of media downloading

Perfect for those looking to set up a personal torrent server with minimal hassle!

  1. Quick Start
  2. Qbittorrent settings to enable telegram notification
  3. Telegram
    1. Get Chat ID for a Private Chat
    2. Get Chat ID for a Channel
    3. Get Chat ID for a Group Chat

Quick Start

  1. Clone the repository
  2. Set up your environment in docker-compose.yml with necessary configurations (API keys, Telegram bot tokens, ports, etc.)
  3. Run docker-compose up -d
  4. Access the web interfaces for qBittorrent and Jackett, configure and receive Telegram notifications right away.

Back to top ↑

Qbittorrent settings to enable telegram notification

/usr/bin/python3 /qbittorrent_python/main.py 0 "%K" "%N" "%Z"
/usr/bin/python3 /qbittorrent_python/main.py 1 "%K" "%N" "%Z"

Qbittorrent settings

Back to top ↑

Telegram

Get Chat ID for a Private Chat

  1. Search and open our new Telegram bot
  2. Click Start or send a message
  3. Open this URL in a browser https://api.telegram.org/bot{our_bot_token}/getUpdates
    • See we need to prefix our token with a word bot
    • Eg: https://api.telegram.org/bot63xxxxxx71:AAFoxxxxn0hwA-2TVSxxxNf4c/getUpdates
  4. We will see a json like so
    {
      "ok": true,
      "result": [
        {
          "update_id": 83xxxxx35,
          "message": {
            "message_id": 2643,
            "from": {...},
            "chat": {
              "id": 21xxxxx38,
              "first_name": "...",
              "last_name": "...",
              "username": "@username",
              "type": "private"
            },
            "date": 1703062972,
            "text": "/start"
          }
        }
      ]
    }
    
  5. Check the value of result.0.message.chat.id, and here is our Chat ID: 21xxxxx38
  6. Let's try to send a message: https://api.telegram.org/bot63xxxxxx71:AAFoxxxxn0hwA-2TVSxxxNf4c/sendMessage?chat_id=21xxxxx38&text=test123
  7. When we set the bot token and chat id correctly, the message test123 should be arrived on our Telegram bot chat.

Back to top ↑

Get Chat ID for a Channel

  1. Add our Telegram bot into a channel
  2. Send a message to the channel
  3. Open this URL https://api.telegram.org/bot{our_bot_token}/getUpdates
  4. We will see a json like so
    {
      "ok": true,
      "result": [
        {
          "update_id": 838xxxx36,
          "channel_post": {...},
            "chat": {
              "id": -1001xxxxxx062,
              "title": "....",
              "type": "channel"
            },
            "date": 1703065989,
            "text": "test"
          }
        }
      ]
    }
    
  5. Check the value of result.0.channel_post.chat.id, and here is our Chat ID: -1001xxxxxx062
  6. Let's try to send a message: https://api.telegram.org/bot63xxxxxx71:AAFoxxxxn0hwA-2TVSxxxNf4c/sendMessage?chat_id=-1001xxxxxx062&text=test123
  7. When we set the bot token and chat id correctly, the message test123 should be arrived on our Telegram channel.

Back to top ↑

Get Chat ID for a Group Chat

The easiest way to get a group chat ID is through a Telegram desktop application.

  1. Open Telegram in a desktop app
  2. Add our Telegram bot into a chat group
  3. Send a message to the chat group
  4. Right click on the message and click Copy Message Link
    • We will get a link like so: https://t.me/c/194xxxx987/11/13
    • The pattern: https://t.me/c/{group_chat_id}/{group_topic_id}/{message_id}
    • So here is our Chat ID: 194xxxx987
  5. To use the group chat ID in the API, we need to prefix it with the number -100, like so: -100194xxxx987
  6. Now let's try to send a message: https://api.telegram.org/bot63xxxxxx71:AAFoxxxxn0hwA-2TVSxxxNf4c/sendMessage?chat_id=-100194xxxx987&text=test123
  7. When we set the bot token and chat id correctly, the message test123 should be arrived on our group chat.

Back to top ↑

Contributing

Developers

References

License

Project is distributed under the GPL-3.0 license.

About

TorrentMediaHub: Easy Setup for a Dockerized Torrent Hub with qBittorrent, Jackett, and Telegram Notifications

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages