A Telegram bot for downloading media from YouTube, Facebook, and Instagram.
Built with aiogram 3.x - a modern, fast, and fully asynchronous Python framework for Telegram Bot API.
- 📹 Download YouTube videos or audio
- 🎵 Convert videos to MP3
- 📱 Support for Instagram and Facebook media
- 🤖 Simple Telegram interface
- ⚡ Asynchronous processing for better performance
- GitHub account
- Railway account (sign up at railway.app)
git add .
git commit -m "Prepare for Railway deployment"
git push origin main- Go to railway.app and sign in with GitHub
- Click "New Project" → "Deploy from GitHub repo"
- Select your
Media-Assistrepository - Railway will automatically detect it's a Python project
- In your Railway project dashboard, go to "Variables" tab
- Add the following variable:
- Key:
BOT_TOKEN - Value:
your-bot-token
- Key:
- Click "Add"
Railway will automatically:
- Install dependencies from
requirements.txt - Install FFmpeg (for video processing)
- Deploy your bot
- Keep it running 24/7
- View Logs: Click on your project → "Deployments" → Select latest deployment
- Check Status: Green indicator means bot is running
- Redeploy: Push to GitHub and Railway auto-deploys
✅ $5 free credit/month - Enough for small to medium bots
✅ Auto-deploy from GitHub - Push code, it deploys automatically
✅ FFmpeg included - Video processing works out of the box
✅ Simple setup - No CLI installation needed
✅ Great logs - Easy debugging
✅ Automatic SSL and custom domains
- Free tier available
- CLI-based deployment
- See Fly.io docs
- 750 hours/month free
- Similar to Railway
- May need FFmpeg setup
# Install dependencies
pip install -r requirements.txt
# Run the bot
python main.py- The token is set as a secret environment variable on Fly.io
- Consider removing the hardcoded fallback value from
bot.py
- Bot not responding? Check logs:
flyctl logs - Deployment failed? Ensure Fly CLI is installed and you're logged in
- Out of memory? Fly free tier has 256MB RAM per VM