| 🌐 Heroku Easy & Fast |
🖥️ VPS Full Control |
📓 Google Colab Free & Quick |
- 🚀 Quick Deploy (Heroku Button)
- 💻 VPS Deployment (Docker)
- ⚙️ Heroku CLI Deployment
- 📋 Configuration Variables
- 🔧 Branch Specifications
The fastest way to get started! Simply click the button below and fill in the required variables.
Note: After deployment, set your
BASE_URLin config via bot settings/bs
Deploy KPSML-X on your own VPS with full control using Docker. Perfect for those who want maximum customization and reliability.
- A VPS running Ubuntu/Debian (recommended)
- SSH access to your VPS
- Basic command line knowledge
SSH into your VPS and run the following commands:
# Update system packages
sudo apt update && sudo apt upgrade -y
# Install Git and essential tools
sudo apt install git curl wget -y
# Install Docker using the official convenience script
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add your user to the docker group (avoid using sudo with docker)
sudo usermod -aG docker $USER
# Apply group changes (or logout and login again)
newgrp docker
# Verify Docker installation
docker --version
⚠️ Important: You may need to logout and login again for the docker group changes to take effect.
Clone the KPSML-X repository:
# Clone the main repository
git clone https://github.com/Tamilupdates/KPSML-X
cd KPSML-X
# Or clone your forked repository
# git clone https://github.com/YOUR_USERNAME/KPSML-X
# cd KPSML-XCreate and configure your config.env file:
# Copy the sample configuration
cp config_sample.env config.env
# Edit with nano (or vim/vi)
nano config.envMinimum Required Configuration:
# ====== MANDATORY VARIABLES ======
BOT_TOKEN = "1234567890:ABCdefGHIjklMNOpqrsTUVwxyz"
OWNER_ID = "123456789"
TELEGRAM_API = "1234567"
TELEGRAM_HASH = "abcdef1234567890abcdef1234567890"
TORRENT_TIMEOUT = "0"
DATABASE_URL = "mongodb+srv://username:password@cluster.mongodb.net/dbname"
# ====== OPTIONAL BUT RECOMMENDED ======
UPSTREAM_REPO = "https://github.com/shohan-001/HexUpload"
UPSTREAM_BRANCH = "hk_kpsmlx"
SET_COMMANDS = "True"🔥 Critical: Delete or comment out the line
_____REMOVE_THIS_LINE_____=Trueto prevent the update script from exiting!
Save and exit:
- Press
CTRL + X - Press
Yto confirm - Press
Enterto save
Build your bot's Docker image:
# Build the image (this may take a few minutes)
docker build -t kpsmlx-bot .
# Verify the image was created
docker images | grep kpsmlx-botStart your bot in a Docker container:
# Run the bot in detached mode with auto-restart
docker run -d \
--name kpsmlx_bot \
--restart=always \
--env-file config.env \
kpsmlx-botVerify deployment and check logs:
# View real-time logs
docker logs -f kpsmlx_bot
# Check if container is running
docker ps | grep kpsmlx_bot
# Exit logs view with CTRL + CLook for success messages like:
✅ Successfully updated with latest commits !!
🤖 Bot started successfully!
# Stop the bot
docker stop kpsmlx_bot
# Start the bot
docker start kpsmlx_bot
# Restart the bot
docker restart kpsmlx_bot
# Remove the container
docker rm -f kpsmlx_bot
# View logs (last 100 lines)
docker logs --tail 100 kpsmlx_bot
# Execute commands inside the container
docker exec -it kpsmlx_bot bash
# Update and redeploy
git pull
docker build -t kpsmlx-bot .
docker rm -f kpsmlx_bot
docker run -d --name kpsmlx_bot --restart=always --env-file config.env kpsmlx-bot-
Firewall Configuration:
sudo ufw allow ssh sudo ufw allow 80/tcp sudo ufw allow 443/tcp sudo ufw enable -
Keep your system updated:
sudo apt update && sudo apt upgrade -y -
Never share your
config.envfile - it contains sensitive credentials! -
Use SSH keys instead of passwords for VPS access
# Install prerequisites
apt-get install git pip curl -y
# Clone the repository
git clone https://github.com/Tamilupdates/KPSML-X
cd KPSML-X For Linux/Ubuntu/Debian:
curl https://cli-assets.heroku.com/install-ubuntu.sh | shFor other systems (requires sudo):
curl https://cli-assets.heroku.com/install.sh | shVia npm (not recommended):
npm install -g heroku📚 Official Installation Guide: Heroku CLI Docs
With browser:
heroku loginWithout browser (headless):
heroku login -i- Email: Your Heroku account email
- Password: Your Heroku API Key from Account Settings
# Create app with container stack
heroku create --region us --stack container APP_NAMEOptions:
--region us→ US servers--region eu→ European serversAPP_NAME→ Your unique app name (optional)--stack container→ Required for Docker deployment
📝 Important: Copy the
BASE_URLshown after app creation (e.g.,https://app-name-12345.herokuapp.com/) and add it to yourconfig.env
Edit config.env:
nano config.envMinimum configuration:
BOT_TOKEN = ""
TELEGRAM_API = ""
TELEGRAM_HASH = ""
OWNER_ID = ""
DATABASE_URL = ""
BASE_URL = ""
SET_COMMANDS = "True"
UPSTREAM_REPO = "https://github.com/shohan-001/HexUpload"
UPSTREAM_BRANCH = "hk_kpsmlx"Save: CTRL + X → Y → Enter
git add . -f
git commit -m "Initial Heroku Setup"
heroku git:remote -a APP_NAME# Force push to deploy
git push heroku main -f# View logs
heroku logs -a APP_NAME
# Live stream logs (CTRL + C to exit)
heroku logs -a APP_NAME -t- All Heroku CLI Commands: Official Documentation
- Heroku Config Management: Use
heroku config:set VAR=value -a APP_NAME
| Variable | Description | Type |
|---|---|---|
BOT_TOKEN |
Telegram Bot Token from @BotFather | String |
OWNER_ID |
Your Telegram User ID (not username) | Integer |
TELEGRAM_API |
API ID from my.telegram.org | Integer |
TELEGRAM_HASH |
API Hash from my.telegram.org | String |
TORRENT_TIMEOUT |
Timeout for dead torrents (set to 0 if not using) |
Integer |
DATABASE_URL |
MongoDB connection URL for storing data | String |
| Variable | Description | Type | Default |
|---|---|---|---|
UPSTREAM_REPO |
GitHub repository URL for updates | String | - |
UPSTREAM_BRANCH |
Branch for updates | String | hk_kpsmlx |
BASE_URL |
Your deployment URL (for Heroku) | String | - |
SET_COMMANDS |
Auto-set bot commands | Boolean | True |
- For private repositories, use format:
https://username:token@github.com/username/repo - BASE_URL format:
https://app-name-12345.herokuapp.com/(must end with/) - Any Docker changes require rebuild to take effect
- All configuration can be updated via bot settings command
/bs
- Upload Branch:
main- All files must be uploaded here - Upstream Branch:
hk_kpsmlx- Set this as your upstream for updates - Configuration: Ensure
UPSTREAM_BRANCH = "hk_kpsmlx"in your config
Solution: Check logs for errors
# VPS
docker logs kpsmlx_bot
# Heroku
heroku logs -a APP_NAME -tSolution: Remove the line _____REMOVE_THIS_LINE_____=True from config.env
Solution:
- Verify your
DATABASE_URLis correct - Ensure your MongoDB cluster allows connections from your IP
- Check MongoDB Atlas whitelist settings
Solution:
# Clear Docker cache and rebuild
docker system prune -a
docker build --no-cache -t kpsmlx-bot .Solution:
- Ensure
TORRENT_TIMEOUTis set (even if just0) - Verify all mandatory variables are filled
- Check if all required private files are present
Need help? Join our community!
📢 Updates Channel • 💬 Support Group
Found a bug? Report it here
Made with ❤️ by the HexUploads Team