Use telegram as ftp storage.
Based on aioftp server and pyrogram.
Enviroment variables you need to set:
API_ID
: Go to my.telegram.org to obtain this.
API_HASH
: Go to my.telegram.org to obtain this.
BOT_TOKEN
: Get the bot token from BotFather.
MONGODB
: MongoDB connect string.
CHAT_ID
: Chat id to send files to.
HOST
: FTP server host (default: 0.0.0.0).
PORT
: FTP server port (default: 9021).
Setup:
- Create bot in BotFather.
- Obtain API_ID and API_HASH on my.telegram.org.
- Create mongodb database on MongoDB Cloud (or use your server) and copy connect string.
- Insert all variables into .env
- Add bot to your channel with admin rights.
- Run
get_channel_id.py
, send/id
command in your channel. - Copy id to .env
- Create mongodb database named
ftp
. - Run
setup_database.py
. - Run
accounts_manager.py
to create accounts. - Disable your ftp client timeout.
- Run
main.py
.