A YouTube downloader that works on any device (phone, tablet, desktop).
Frontend: GitHub Pages | Backend: Railway (free)
Your Phone/Browser
│
▼
GitHub Pages ← just HTML, no server needed
(frontend/index.html)
│ POST /download
▼
Railway Server ← Flask + yt-dlp + ffmpeg (free tier)
(backend/server.py)
│
▼
File streamed back → saved to your device
- Go to railway.app → sign up with GitHub (free)
- Click "New Project" → "Deploy from GitHub repo"
- Create a new GitHub repo, upload the
backend/folder contents to it - Railway auto-detects Python and deploys it
- Go to Settings → Networking → Generate Domain
You'll get a URL like:https://yt-downloader-production.up.railway.app
Free tier: 500 hours/month — plenty for personal use
Open frontend/index.html and find line ~10:
const API_URL = "";Change it to your Railway URL:
const API_URL = "https://yt-downloader-production.up.railway.app";- Create a GitHub repo (e.g.
yt-downloader) - Upload
frontend/index.htmlto the repo - Go to repo Settings → Pages → Source → main branch → / (root)
- Your site is live at:
https://yourusername.github.io/yt-downloader
That's it! Works on any device with a browser.
- Go to render.com → New → Web Service
- Connect your backend repo
- Set:
- Build command:
pip install -r requirements.txt - Start command:
gunicorn server:app --bind 0.0.0.0:$PORT --timeout 600
- Build command:
- Get your URL from the dashboard
Note: Render free tier spins down after 15 min of inactivity (first request takes ~30s to wake up)
yt-web/
├── frontend/
│ └── index.html ← deploy to GitHub Pages
└── backend/
├── server.py ← Flask + yt-dlp API
├── requirements.txt ← auto-installs everything incl. ffmpeg
├── Procfile ← for Railway/Render
└── railway.json ← Railway config
Q: Is it free?
Railway gives 500 free hours/month. GitHub Pages is always free.
Q: Does it work on iPhone/Android?
Yes — the file downloads directly to your device's Downloads folder.
Q: Does it store my videos?
No. Files are processed in a temp folder and deleted after being sent.
Q: Why does the first download take long?
Railway/Render may spin up the server (cold start ~10-30s). After that it's fast.