Telegram userbot deploy in NAT VPS


Natvps.id – It is undeniable that Telegram is one of the platforms Message the most widely used. The features offered and freedom in interacting are the main attractions for users.

One of them is the ability to interact with user accounts through a particular application / programming language. This feature is widely used to make the user account semi-bot, or known as Userbot. Userbot allows users to do interesting things directly from telegram to add experience chattingLike looking for song lyrics, internet searching, etc., depending on the userbot used.

This article discusses the steps of the telegram userbot deploy in NAT VPS using a docker. For example, the userbot to be used is Catuserbot Because it is light and has many features. This article uses Ubuntu 22.04 as a reference, but you can use other distributions such as Debian and Centos. Make sure the OS used supports the docker.

Get a userbot configuration

Before running the userbot, there are several configurations that need to be prepared.

1. Get api_id And api_hash Telegram

api_id And api_hash Used to connect to the telegram server. To get it:

  1. Open Login with a telephone number if not.
  2. Enter Fire development tool
  3. Fill in the form if you have never made an application
  4. If it is already, api_id And api_hash will be listed on the page. Record the two valuesbecause we will use it later

2. Make a Telegram bot

This bot will be a link to our userbot. To make it, we can use @botfather. The following steps:

  1. Open the telegram
  2. Search @BotFather in the search column
  3. Type /newbot To make a new boat
  4. The contents of the questions required:
    1. Select the name: Your userbot name, for example: Tutorurerbot
    2. Select username: Your bot username, for example: tutoruser_bot (Must end in bot)
  5. If so, you will get information about your bot, along with the HTTP API token. Note this token.

  6. Activate Inline mode by entering /setinline. Select your bot and enter the sentence Placeholder whatever.

3. Making Private Group

A private group Needed as a place Logging and notification of our userbot. We need to make personal group New and get the ID with the following steps:

  1. Open the telegram
  2. Open the menu (top left corner), then select New group
  3. On Group nameFill in the name of your group, for example: Tutoring logging

  4. Add @Missrosebot and the boat you previously made

  5. If so, click Make
  6. Create @missrose_bot and your admin access rights
  7. In the chat column, type /idto get a group ID. Post this ID.

Produce a string session

Session String is used to authenticate the userbot to the telegram server to be connected to the user account.

  1. Open
  2. Fill in the column above:
    1. Environment: Production
    2. API ID: api_id from my.telegram.org before
    3. Hash fire: api_hash from my.telegram.org before
    4. Account Type: User
    5. Account details: Telephone number, with format +62xxx
  3. You will get OTP from Telegram. Enter the OTP into the website
  4. If you activate 2FA, enter password your account
  5. If so, your string session will be listed on the website. Record the code.

All configurations have been obtained. It’s time for our userbot deploy!

Install Docker

We will use a docker and compile a docker for men-spread Catuserbot.

First, install curly Using Orders:

apt update && apt install curl -y

Then, run manuscript Automatic installation from the docker by entering:

curl -fsSL get.docker.com | sh

Wait until the installation process is complete.

Spreading the catuserbot

Clone Source code From the Catuserbot using GIT:

apt install git -y

cd ~/
git clone 
cd catuserbot

# Rename default configuration
mv exampleconfig.py config.py

Open the Catuserbot configuration file:

apt install nano -y

nano config.py

Next, change the following configuration in accordance with the values ​​we have received before:

  • App_id: api_id From Telegram
  • API_Hash: api_hash From Telegram
  • Alive_name: Your name that appears in the userbot, for example: Userbot tutorial
  • Db_uri: Postgresql: // postgres: postgres@db/catuserbot (make sure the same)
  • String_session: Previous string session
  • Tg_bot_token: Bot token from @botfather
  • Private_group_bot_api_id: Group ID from @missrose_bot before

Save the file with Ctrl-X, yAnd y.

Run the userbot using a compose docker:

docker compose up -d

Wait until the process spread finished.

Userbot test

To test the userbot, type .alive In any telegram chat. The output results will come out like this:

Type .help to get information about rule which are available.

Cover

Thus this article is about the steps of the userbot deploy in NAT VPS. If you are confused or doubtful, don’t hesitate to ask questions in the telegram group @ipv6indonesia. Thank You!



Game Center

Game News

Review Film
Rumus Matematika
Anime Batch
Berita Terkini
Berita Terkini
Berita Terkini
Berita Terkini
review anime

Gaming Center