Quick Start
Get the bot running and send your first file — in about 10 minutes.
Step 1: Collect the 5 things you need
Open these in browser tabs and grab the info:
| What | Where to find it |
|---|---|
| Bot Token | @BotFather → send /newbot → choose a name → copy the token |
| API ID + Hash | my.telegram.org → log in → copy both numbers |
| Your User ID | @userinfobot → send /start → it shows a number |
| MongoDB URL | MongoDB Atlas → free account → create cluster → click Connect → copy the connection string |
| A server | Any VPS with Docker (DigitalOcean $6/mo, Hetzner, Vultr) |
Don't have a server? Get the cheapest VPS from any provider. A $6/month plan works fine.
Step 2: Connect to your server
ssh root@your-server-ipStep 3: Install Docker
curl -fsSL https://get.docker.com | shStep 4: Download and configure the bot
git clone -b wzv3 https://github.com/Imkrishana/HKML-X.git
cd HKML-X
cp config_sample.py config.py
nano config.pyDo not skip the
cpline. Ifconfig.pydoesn't exist when you start Docker, Docker makes a folder namedconfig.pyand the bot crashes with a confusing error.
Find these 5 lines and fill them in:
BOT_TOKEN = "1234567890:ABCdefGHIjklmNOPqrstUVwxyz-1234567" # from BotFather
OWNER_ID = 123456789 # from userinfobot
TELEGRAM_API = 12345 # from my.telegram.org
TELEGRAM_HASH = "1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p" # from my.telegram.org
DATABASE_URL = "mongodb+srv://user:pass@cluster0.xxxxx.mongodb.net" # from MongoDB AtlasSave: Ctrl+S (or Ctrl+O then Enter). Exit: Ctrl+X.
Step 5: Start the bot
docker compose up -d --buildThe first build takes 5-15 minutes. After that, starts take seconds. Check it's running:
docker compose psBoth app and tunnel should show Up. To see the startup logs:
docker compose logs app --tail 10Step 6: Open Telegram and talk to your bot
Search for the username you chose on @BotFather. Send:
/startYou should see a welcome message. If you get "not authorized", send /login followed by the LOGIN_PASS if you set one.
Step 7: Your first file
No setup needed. Copy-paste this exact command:
/leech https://speed.hetzner.de/100MB.binWait 10-30 seconds...
The bot will send you a file called 100MB.bin. Tap it to download.
You just sent your first file through the bot!
Step 8: /mirror needs a cloud drive first
/leech works out of the box because Telegram is already set up. /mirror has nowhere to put the file until you connect Google Drive or Rclone. See Upload Destinations.
What happened?
- The bot downloaded the file from the internet
- It split the file into pieces small enough for Telegram
- It sent you the pieces as downloadable files
The bot is working.
What next?
| You want to... | Go here |
|---|---|
| A one-page list of every command | Cheat Sheet |
| To know what "leech", "seed", "rclone" mean | Word List |
| Save files to Google Drive instead of Telegram | Set up a cloud drive |
| Learn everything the bot can do | How To section |
| Understand every config setting | Configuration |
| Deploy on Heroku instead of VPS | Heroku guide |