Hey everyone! Today, I'll guide you through creating a boundless cloud storage solution on Telegram using TeleDrive. This open-source project is a game-changer, offering functionalities like Google Drive/OneDrive via the Telegram API.
![](https://habrastorage.org/getpro/habr/upload_files/196/9a7/879/1969a7879fdbead5b787024900a5dcef.png)
Creating the Cloud
For those seeking info in various forums or YouTube, it's slim pickings. I spent about 2 hours decoding the problem since the script was on a coffee break! Turns out, the fix was sitting pretty in the issues repository. ?
Instead of wasting our million-dollar software engineering time, let's dive into learning how to install TeleDrive.
Setting the Stage
Let's start by updating our packages:
apt-get update
![](https://habrastorage.org/getpro/habr/upload_files/6a2/706/8b9/6a27068b9db7223fc001a3d0894bbbfe.png)
Next, the crucial Build-essentials:
apt-get install build-essential
![](https://habrastorage.org/getpro/habr/upload_files/df6/957/29c/df695729c46533b6e472db6089b26f62.png)
Following that, let's grab the fork repository with git-clone:
git clone https://github.com/mgilangjanuar/teledrive
![](https://habrastorage.org/getpro/habr/upload_files/319/474/099/319474099759eae3cb1ddd9867338e4a.png)
If Git's on a break, hit it with:
apt install git
Node and Beyond
Now, let's install NVM (Node Version Manager):
wget https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh
After the download:
![](https://habrastorage.org/getpro/habr/upload_files/91b/c73/311/91bc73311f1eab93570edddab7a76161.png)
bash install.sh
source ~/.bashrc
![](https://habrastorage.org/getpro/habr/upload_files/40d/2d0/531/40d2d05319ecd21e46e8451fdbe28967.png)
![](https://habrastorage.org/getpro/habr/upload_files/365/9e8/4ad/3659e84ad85e3f14a3763eff1f252e69.png)
Ensure NVM's up and running:
nvm -v
![](https://habrastorage.org/getpro/habr/upload_files/fd1/1ba/01f/fd11ba01f78d1186f52885d6644546b1.png)
Let's get Node.JS 18.16.0 via NVM:
nvm install v18.16.0
![](https://habrastorage.org/getpro/habr/upload_files/8d8/ad9/09d/8d8ad909d6de79336074f0c2a6114129.png)
Checking Node.JS and NPM versions:
node -v
npm -v
Now, let's move into our downloaded GitHub project:
cd teledrive
![](https://habrastorage.org/getpro/habr/upload_files/f5c/068/0fd/f5c0680fdcd8d47bcaee3df6b1e49f34.png)
We'll need to install Yarn and PostgreSQL:
sudo apt install postgresql -y
![](https://habrastorage.org/getpro/habr/upload_files/74c/611/f98/74c611f987e7ce69465c81a54b6ca49b.png)
Let's trigger TeleDrive installation:
chmod +x ./install.manual.sh
./install.manual.sh
![](https://habrastorage.org/getpro/habr/upload_files/f12/179/26b/f1217926b2af96f3b8cd579f5758ceb6.png)
Configuring TeleDrive
Parameters will pop up that require filling:
![](https://habrastorage.org/getpro/habr/upload_files/8c7/9b0/800/8c79b080025d1d6a325c87e727e59da5.png)
TG_API_ID: Application ID
TG_API_HASH: The hash
ADMIN_USERNAME: Telegram username (should be admin)
DATABASE_URL: Your postgres database
PORT: Operational port
REACT_APP_API_URL: API operation address
After a successful setup, the installation of packages kicks in. Once that's done, a confirmation text should appear, indicating TeleDrive's successful launch.
![](https://habrastorage.org/getpro/habr/upload_files/4c7/ccd/6ac/4c7ccd6acf13d75f734b1e1719c59f98.png)
![](https://habrastorage.org/getpro/habr/upload_files/e29/797/dcc/e29797dccd1db8ed334790b161c98a5b.png)
![](https://habrastorage.org/getpro/habr/upload_files/657/ec3/506/657ec350687a97d79e21b288f5b39ce1.png)
Getting APP_ID and API_HASH
Let's head over to my.telegram.org and log in using your phone number.
Create an application and gather its data.
![](https://habrastorage.org/getpro/habr/upload_files/c64/89c/4a7/c6489c4a73675ee31c8b29ad5ba08663.png)
![](https://habrastorage.org/getpro/habr/upload_files/99c/a34/986/99ca34986b4df7722c6581018f8e511c.png)
![](https://habrastorage.org/getpro/habr/upload_files/56b/a95/939/56ba959392ee90a5072de9c06eb76bc0.png)
Linking to the Database
Create and import data into the database.
![](https://habrastorage.org/getpro/habr/upload_files/af1/c27/ffb/af1c27ffb36c816f2108815a9df61302.png)
Creating:
To get started, access PostgreSQL:
arduinoCopy codepsql -U postgres
# or
sudo su - postgres
psql
Then, execute the following command:
sqlCopy codeCREATE DATABASE teledrive;
Note: If you perform these actions, you'll also need to import server variables.
DATABASE_URL: postgresql://postgres@localhost:5432/teledrive
Then, watch in awe as TeleDrive works its magic and showcases its wonders through screenshots.
![](https://habrastorage.org/getpro/habr/upload_files/436/27c/0fc/43627c0fcf086f0713c16205c51cdd6c.png)
![](https://habrastorage.org/getpro/habr/upload_files/20c/ea1/08d/20cea108d0bd19a09529623cea71a718.png)
![](https://habrastorage.org/getpro/habr/upload_files/27a/189/37b/27a18937b03f2f7a634de906cc79db8a.png)
![](https://habrastorage.org/getpro/habr/upload_files/5d1/a14/e0e/5d1a14e0e928da9065ffc561f6d15ea3.png)
![](https://habrastorage.org/getpro/habr/upload_files/f98/683/999/f98683999d40c588f8148e78749bc3c9.png)
![](https://habrastorage.org/getpro/habr/upload_files/4c9/112/c5e/4c9112c5e60f587a6630103a57713158.png)
![](https://habrastorage.org/getpro/habr/upload_files/fc9/bb1/d73/fc9bb1d733d09e13f7b0d75aa00d8385.png)
![](https://habrastorage.org/getpro/habr/upload_files/dcb/1e3/ce1/dcb1e3ce1df30de1f9f6a073afa76e66.png)
And there you have it! A comprehensive guide to unleashing the power of TeleDrive. Enjoy seamless cloud storage on Telegram! If you found this article helpful, share it with friends and stay tuned for more.