Heroku Guide

Note

This guide only shows how to generate a Redis session and deploy the bot to Heroku.

We would encourange you to use Termux, an app available on the Play Store. Open the same and follow along.

Prerequisites

  • API ID and Hash from Telegram
  • Redis Endpoint and Password from Redis Labs:

Cloning the repository

Clone the TG-UserBot repository to your desired location using the git clone command.

$ git clone https://www.github.com/kandnub/TG-UserBot

Once the cloning has finished, change your directory to the cloned folders directory using the cd command.

$ cd TG-UserBot

Installing Python 3

$ pkg install python

Installing Redis and Telethon

$ pip install redis telethon

Generating a Redis Session

To generate the session do:

$ python3 generate_session.py

Simply follow the on-screen instructions and once done you’ll get a confirmation message saying:

Succesfully generated a session for “name”

Depolying to Heroku

To deploy to heroku click on the Auto Deploy button given below:

../_images/heroku.png

Fill all the info i.e ENV Vars, double check and click on deploy, thats it you are done!
If you get stuck somewhere or get an error while building/deploying the UserBot, don’t hesitate to ask us in the support group.