# How To Deploy Telegram Fclone And Gclone Bot Hosted Locally On Your Phone

**URL:** <https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674>\
**Category:** Tutorials & Methods\
**Tags:** tools, social-media, hosting\
**Created:** [September 27, 2020, 8:58am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674 "2020-09-27T08:58:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prometheus](https://onehack.st/user_avatar/onehack.st/prometheus/32/34950_2.png) [@Prometheus](https://onehack.st/u/Prometheus)\
**Post date:** [September 27, 2020, 8:58am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/1 "2020-09-27T08:58:13Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/f/4/f4d9b787f36bccccff009367889119e3a70b0ef6.png)

## Introduction

Hi guys. I will walk you through How to Deploy Telegram Fclone and Gclone Bot Hosted Locally on Your Phone using termux apk. You can eqaully do this on a VPS but i know many people have limitations getting a personal VPS. So I will be hosting this bots locally on my Android phone. Let’s dive it.

## Prerequisites

- An Android phone with internet access and Termux apk installed
- Your Service Accounts (SA) obtained from either AutoRclone or Folderclone.
- Two Telegram Bot Tokens- one each for the Gclone and Fclone bots
- Telegram User ID
- Gclone and Fclone installed on your Android device

## How to Deploy Telegram Fclone and Gclone Bot

Step 1: Open your Termux app and run this code to install this packages.

```auto
pkg install git zip wget curl screen tmux rclone python proot # The proot pkg will allow Termux to simulate root environment with standard Linux directory structure and paths of /bin, /etc, /usr and /tmp

```

Step 2: Visit this Github repositories through this links.

[Fclone](https://github.com/mawaya/rclone/releases)– Expand the assets section and copy the link of the Fclone pkg (latest release is v0.4.1) that corresponds with your Android architecture. To know your Android architecture, run this code:

```auto
uname -m

```

[Gclone](https://github.com/donwa/gclone/releases/tag/v1.51.0-mod1.3.1)– Expand the assets section and copy the link of the Gclone pkg (latest release is v1.51.0-mod1.3.1) that corresponds to your Android architecture.

[Bot Repo](https://github.com/Waga43/telegram_gcloner_fcloner)– Visit this Github repo and copy the link to clone the repo.

Step 3: Install Fclone and Gclone on your android phone by running these commands in termux. I will be installing the x86 version because my OS is i686.

Gclone Installation on Android-

```auto
termux-chroot # Will allow Termux to simulate root environment with standard Linux directory structure and paths of /bin, /etc, /usr and /tmp

```

Then,

```auto
wget -N https://github.com/donwa/gclone/releases/download/v1.51.0-mod1.3.1/gclone_1.51.0-mod1.3.1_Linux_i386.gz

```

Then,

```auto
gunzip gclone_1.51.0-mod1.3.1_Linux_i386.gz

```

Then,

```auto
mv gclone_1.51.0-mod1.3.1_Linux_i386 gclone

```

Then,

```auto
mv gclone /usr/bin

```

Then,

```auto
chmod +x /usr/bin/gclone

```

Then check if your installation is successful,

```auto
gclone --version

```

Fclone Installation on Android

```auto
wget -N https://github.com/mawaya/rclone/releases/download/fclone-v0.4.1/fclone-v0.4.1-linux-386.zip

```

Then,

```auto
unzip fclone-v0.4.1-linux-386.zip

```

Then,

```auto
mv fclone-v0.4.1-linux-386.zip fclone

```

Then,

```auto
cd fclone

```

Then,

```auto
mv fclone /usr/bin

```

Then,

```auto
chmod +x /usr/bin/fclone

```

Then,

```auto
fclone --version

```

Step 4: Clone the Bot Github repository using the link given above. Run these codes.

## First clone the repo

```auto
git clone https://github.com/Waga43/telegram_gcloner_fcloner

```

## Make a new directory called fclone\_bot

```auto
mkdir fclone_bot

```

## Copy the cloned repo to the newly created directory

```auto
cp -r telegram_gcloner_fcloner fclone_bot

```

## For the Gclone Bot

```auto
cd telegram_gcloner_fcloner

```

## Install requirements

```auto
pip3 install requirements.txt

```

```auto
cd telegram_gcloner

```

## Make a copy of the config file

```auto
cp config.ini.example config.ini

```

## Edit the config file

```auto
nano config.ini # Leave the path_to_gclone and gclone_para_override empty (if you are editing the config file for the Gclone bot).

```

## For the fclone Bot

```auto
cd fclone_bot/telegram_gcloner_fcloner/telegram_gcloner/

```

```auto
cp config.ini.example config.ini

```

```auto
nano config.ini # Put the path_to_gclone = /usr/bin/fclone and leave gclone_para_override empty (if you are editing the config file for the Fclone bot).

```

Ensure you save the config file after editing it and inputing the necessary details as explained above including your Telegram user ID, Bot token and group ID.

Launching the Bots

To launch the bots and ensure they both continue running in the background, run either the screen or tmux commands (depending on which one you are comfortable with). I will use the screen cmd to show an example.

```auto
screen -S "Your screen Session name" # Use any name you like e.g. Gclone Bot. Don't include the quotes in the name.

```

Then run the following code to deploy your bot

```auto
python3 telegram_gcloner.py

```

When the bot starts, folow the on-screen prompts. You can as well add the following lines of codes to the #Setcommands of Botfather

```auto
olders - Add your TD folders
help - How to use bot
sa - Reply to accounts.zip file

```

## In Case of Errors

In case you run into errors after installing either gclone or fclone (for example, you may have wrongly installed the wrong version for your Android device) and need to try reinstalling the right one; but first you have to uninstall or remove the previous one from your Android device. Run the following code in another termux window:

```auto
rm /data/data/com.termux/files/usr/bin/gclone

```

```auto
rm /data/data/com.termux/files/usr/bin/fclone

```

Compress and upload your accounts folder containing your SA files to the bot. Reply to this file with /sa. In addition, using the /folders cmd copy the Team Drive ID or folder ID you want to copy files into and follow the on-screen prompts to set your favorite folders.

That’t it guys! Now you know How to Deploy Telegram Fclone and Gclone Bot Hosted Locally on Your Phone. I guess I don’t need to remind you that you have to ensure your SA emails are added appropriately to the TD. You can add it directly or use a Google Group, then add the Google Group email to the TD as a member.

To copy files, just forward the link of the shared file to the Bot and follow the screen prompts. That’s all.

_Source: EDUTECHTAINMENT_

**Happy learning!**

---

<div class="post-metadata">

**Author:** ![Aina](https://onehack.st/user_avatar/onehack.st/aina/32/167469_2.png) [@Aina](https://onehack.st/u/Aina)\
**Post date:** [September 27, 2020, 8:58am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/2 "2020-09-27T08:58:27Z")

</div>



---

<div class="post-metadata">

**Author:** ![Aina](https://onehack.st/user_avatar/onehack.st/aina/32/167469_2.png) [@Aina](https://onehack.st/u/Aina)\
**Post date:** [September 28, 2020, 11:48am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/3 "2020-09-28T11:48:07Z")

</div>



---

<div class="post-metadata">

**Author:** ![Mr.Professor](https://onehack.st/user_avatar/onehack.st/mr.professor/32/80825_2.png) [@Mr.Professor](https://onehack.st/u/Mr.Professor)\
**Post date:** [May 26, 2021, 10:32am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/4 "2021-05-26T10:32:26Z")

</div>

Hey @Waga bro i am unable to install fclone on arm64 i tried almost all versions of fclone no one is working for my device Gclone is working fine on aarch64 but fclone says nocommand fclone found

i am using this release of fclone :-[https://github.com/mawaya/rclone/releases/download/fclone-v0.4.1/fclone-v0.4.1-linux-arm64.zip](https://github.com/mawaya/rclone/releases/download/fclone-v0.4.1/fclone-v0.4.1-linux-arm64.zip)  
And this release of gclone which is working fine :-[https://github.com/donwa/gclone/releases/download/v1.51.0-mod1.3.1/gclone\_1.51.0-mod1.3.1\_Linux\_arm64.gz](https://github.com/donwa/gclone/releases/download/v1.51.0-mod1.3.1/gclone_1.51.0-mod1.3.1_Linux_arm64.gz)

Can u please help what am i doing wrong?

---

<div class="post-metadata">

**Author:** ![Waga](https://onehack.st/user_avatar/onehack.st/waga/32/27787_2.png) [@Waga](https://onehack.st/u/Waga)\
**Post date:** [May 26, 2021, 11:34am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/5 "2021-05-26T11:34:07Z")

</div>

Probably you did something wrong. It should work if you followed the steps right. Run **uname -a** command and check what architecture is your device.

Cheers.

> **“And Over Every Possessor of Knowledge, There is (Some) One (Else) More Knowledgeable”**

---

<div class="post-metadata">

**Author:** ![Mr.Professor](https://onehack.st/user_avatar/onehack.st/mr.professor/32/80825_2.png) [@Mr.Professor](https://onehack.st/u/Mr.Professor)\
**Post date:** [May 26, 2021, 11:36am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/6 "2021-05-26T11:36:29Z")

</div>

its aarch64 Brother if i chose wrong arch then gclone should also not work  
And i have tried almost all linux arch types of fclone none of them is working for my device 🤕  
And yes your repo Needs updates both gclone and fclone When are updates coming sir?

---

<div class="post-metadata">

**Author:** ![Waga](https://onehack.st/user_avatar/onehack.st/waga/32/27787_2.png) [@Waga](https://onehack.st/u/Waga)\
**Post date:** [May 26, 2021, 11:48am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/7 "2021-05-26T11:48:13Z")

</div>

It’s been a while i actually worked on these stuffs. I hv not been active especially when Google changed their drive policies.

That’s surprising. I want to check it out and revert. Will keep you posted.

Cheers!!!

> **“And Over Every Possessor of Knowledge, There is (Some) One (Else) More Knowledgeable”**

---

<div class="post-metadata">

**Author:** ![Waga](https://onehack.st/user_avatar/onehack.st/waga/32/27787_2.png) [@Waga](https://onehack.st/u/Waga)\
**Post date:** [May 26, 2021, 12:40pm UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/8 "2021-05-26T12:40:20Z")

</div>

Just successfully installed it on my aarch64 device.

Cheers!!!

> **“And Over Every Possessor of Knowledge, There is (Some) One (Else) More Knowledgeable”**

 ![Screenshot_2021-05-26-13-39-00-564_com.termux](https://onehack.st/uploads/default/original/3X/f/6/f6191feb2419d352b8f8b2db3b3f06b9d6d2a37a.jpeg)

---

<div class="post-metadata">

**Author:** ![Mr.Professor](https://onehack.st/user_avatar/onehack.st/mr.professor/32/80825_2.png) [@Mr.Professor](https://onehack.st/u/Mr.Professor)\
**Post date:** [May 26, 2021, 12:43pm UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/9 "2021-05-26T12:43:41Z")

</div>

let me give it another try 😁

---

<div class="post-metadata">

**Author:** ![Waga](https://onehack.st/user_avatar/onehack.st/waga/32/27787_2.png) [@Waga](https://onehack.st/u/Waga)\
**Post date:** [May 26, 2021, 12:45pm UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/10 "2021-05-26T12:45:49Z")

</div>

```
wget -N https://github.com/mawaya/rclone/releases/download/fclone-v0.4.1/fclone-v0.4.1-linux-arm64.zip

```

Use the above code.

Cheers!!!

> **“And Over Every Possessor of Knowledge, There is (Some) One (Else) More Knowledgeable”**

---

<div class="post-metadata">

**Author:** ![Mr.Professor](https://onehack.st/user_avatar/onehack.st/mr.professor/32/80825_2.png) [@Mr.Professor](https://onehack.st/u/Mr.Professor)\
**Post date:** [May 26, 2021, 1:07pm UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/11 "2021-05-26T13:07:29Z")

</div>

So @Waga I did as per your screenshot and now its working Problem was in this step

> [@Prometheus](#):
>
> `cd fclone`

it was moving empty folder

I forget to mention Thanks @Waga i didn’t expected any replies soon but i was surprised to see your reply

---

<div class="post-metadata">

**Author:** ![Mr.Professor](https://onehack.st/user_avatar/onehack.st/mr.professor/32/80825_2.png) [@Mr.Professor](https://onehack.st/u/Mr.Professor)\
**Post date:** [May 26, 2021, 2:32pm UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/12 "2021-05-26T14:32:20Z")

</div>

![Screenshot_2021-05-26-19-59-47-79_84d3000e3f4017145260f7618db1d683](https://onehack.st/uploads/default/original/3X/5/0/50ea2cec272534a57c37aab6320277a0f8ad55c9.jpeg)  
Got this error while deploying bot​😓

---

<div class="post-metadata">

**Author:** ![DIBS](https://onehack.st/user_avatar/onehack.st/dibs/32/82004_2.png) [@DIBS](https://onehack.st/u/DIBS)\
**Post date:** [May 26, 2021, 3:57pm UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/13 "2021-05-26T15:57:45Z")

</div>

install telegram module pip3 install requirements.txt this should do it

---

<div class="post-metadata">

**Author:** ![Mr.Professor](https://onehack.st/user_avatar/onehack.st/mr.professor/32/80825_2.png) [@Mr.Professor](https://onehack.st/u/Mr.Professor)\
**Post date:** [May 26, 2021, 4:39pm UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/14 "2021-05-26T16:39:50Z")

</div>

Could not find a version that satisfies the requirement requirements(from version:none)  
Error: No matching distribution found for requirements

---

<div class="post-metadata">

**Author:** ![Waga](https://onehack.st/user_avatar/onehack.st/waga/32/27787_2.png) [@Waga](https://onehack.st/u/Waga)\
**Post date:** [May 26, 2021, 7:49pm UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/15 "2021-05-26T19:49:40Z")

</div>

Yeah. I came online at that time and could reply. Let me checkout the error you got.

Cheers!!!

> **“And Over Every Possessor of Knowledge, There is (Some) One (Else) More Knowledgeable”**

---

<div class="post-metadata">

**Author:** ![Waga](https://onehack.st/user_avatar/onehack.st/waga/32/27787_2.png) [@Waga](https://onehack.st/u/Waga)\
**Post date:** [May 26, 2021, 9:14pm UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/16 "2021-05-26T21:14:03Z")

</div>

You didn’t install the requirements. I just launched the bot successfully on my new android phone. It works.

Did you just install termux?  
The termux on playstore is “defective” and will give problems.

I had to uninstall and reinstall.

Cheers!!!

> **“And Over Every Possessor of Knowledge, There is (Some) One (Else) More Knowledgeable”**

 ![Screenshot_2021-05-26-22-13-17-681_com.termux](https://onehack.st/uploads/default/original/3X/d/6/d644e3e6a177c54a7b36dadff4cb73f0ecda82be.jpeg)  
 ![Screenshot_2021-05-26-22-13-06-803_org.telegram.plus](https://onehack.st/uploads/default/original/3X/e/e/ee53901febc4abcfb24fcc58edad00f777c0662b.jpeg)

---

<div class="post-metadata">

**Author:** ![Mr.Professor](https://onehack.st/user_avatar/onehack.st/mr.professor/32/80825_2.png) [@Mr.Professor](https://onehack.st/u/Mr.Professor)\
**Post date:** [May 27, 2021, 3:18am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/17 "2021-05-27T03:18:34Z")

</div>

Yeah i have installed termux from playstore 😐 let me uninstall it and download from f-droid 😁

---

<div class="post-metadata">

**Author:** ![Mr.Professor](https://onehack.st/user_avatar/onehack.st/mr.professor/32/80825_2.png) [@Mr.Professor](https://onehack.st/u/Mr.Professor)\
**Post date:** [May 27, 2021, 6:43am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/18 "2021-05-27T06:43:08Z")

</div>

getting same error on fdroid termux  
can’t install requirements

 ![Screenshot_2021-05-27-12-11-22-26_84d3000e3f4017145260f7618db1d683](https://onehack.st/uploads/default/original/3X/7/3/738c9c25bdca1e509cedafc5f3e5842b7900678c.jpeg)

---

<div class="post-metadata">

**Author:** ![Waga](https://onehack.st/user_avatar/onehack.st/waga/32/27787_2.png) [@Waga](https://onehack.st/u/Waga)\
**Post date:** [May 27, 2021, 10:16am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/19 "2021-05-27T10:16:00Z")

</div>

Run this code to Install requirements

```
pip3 install -r requirements.txt

```

Cheers!!!

> **“And Over Every Possessor of Knowledge, There is (Some) One (Else) More Knowledgeable”**

---

<div class="post-metadata">

**Author:** ![Mr.Professor](https://onehack.st/user_avatar/onehack.st/mr.professor/32/80825_2.png) [@Mr.Professor](https://onehack.st/u/Mr.Professor)\
**Post date:** [May 27, 2021, 11:22am UTC](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674/20 "2021-05-27T11:22:57Z")

</div>

I messed up with sa’s Will do rest of process tommorow 😁thnx this code worked​:grin:

[Next page](https://onehack.st/t/how-to-deploy-telegram-fclone-and-gclone-bot-hosted-locally-on-your-phone/119674.md?page=2)
