A production-ready, commercial-grade, and lightweight YouTube Downloader platform designed with a modern dark SaaS aesthetic. Built using a unified Node.js/Express server that runs yt-dlp and ffmpeg in the background, serving a premium, responsive, glassmorphic Vanilla HTML/CSS/JS frontend with live progress bars powered by Socket.io.
- Media Formats: Download videos up to 1080p (MP4) and extract audio as high-bitrate MP3s.
- Dynamic Merging: Automatically runs
ffmpegto merge separate high-definition video and audio tracks. - Real-Time Progress: Instant dial and bar progress updates, download speed, and ETA synced via WebSockets.
- UX Delights: Features single-click URL pasting, animated loading skeletons, and original video filename preservation on download.
- Auto-Cleanup: Background cleanup job that automatically deletes files older than 30 minutes to manage disk usage.
- Production DevOps Ready: Pre-configured Docker, Docker Compose, Nginx, and PM2 settings.
d:\تحميل/
├── public/ # Premium Vanilla Frontend
│ ├── index.html # HTML5 layout structure
│ ├── styles.css # Glassmorphism dark mode styles
│ └── app.js # State manager & WebSockets receiver
├── src/ # Backend Source Code
│ ├── controllers/ # Express endpoint controllers
│ ├── routes/ # Routing configurations
│ ├── services/ # yt-dlp/ffmpeg execution & cleanup job
│ ├── types/ # Type declarations
│ └── server.ts # Entrypoint (Express static server + Socket.io)
├── package.json # NPM dependencies
├── tsconfig.json # TypeScript compile configurations
├── Dockerfile # Production container instruction
├── docker-compose.yml # Docker orchestrator
├── nginx.conf # Nginx reverse proxy configuration
├── pm2.config.js # PM2 process settings
├── yt-dlp.exe # Local Windows yt-dlp executable
└── ffmpeg.exe # Local Windows FFmpeg executable
- Node.js (v18 or higher recommended)
- Local Binaries:
yt-dlp.exeandffmpeg.exeare already included at the root of this workspace (d:\تحميل). The server will automatically detect and execute them when running on Windows.
- Open PowerShell or command terminal in the workspace root.
- Install npm dependencies:
npm install
- Development (Hot-reloading):
npm run dev
- Production (Compile & Run):
npm run build npm start
Access the web portal in your browser at: http://localhost:5000
We recommend deploying using Docker Compose as it wraps node compiling, ffmpeg, and the latest yt-dlp automatically with zero local dependencies.
- Install Docker & Docker Compose on your Ubuntu VPS:
sudo apt update sudo apt install -y docker.io docker-compose
- Transfer Project Files: Copy the project files to
/var/www/yt-downloaderon your VPS. - Build and Run Containers:
This compiles the project, fetches the latest linux-compatible
cd /var/www/yt-downloader sudo docker-compose up -d --buildyt-dlpandffmpegutilities, and runs the server on port5000in the background.
If you prefer to run native PM2 without containers:
- Install System Dependencies on Ubuntu:
sudo apt update sudo apt install -y nodejs npm ffmpeg python3 curl
- Install yt-dlp globally (crucial for Linux execution):
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp sudo chmod a+rx /usr/local/bin/yt-dlp
- Install PM2 globally:
sudo npm install -g pm2
- Compile & Boot:
cd /var/www/yt-downloader npm install npm run build pm2 start pm2.config.js --env production - Set up auto-restart on reboot:
pm2 startup pm2 save
To secure the platform with HTTPS and link it to your domain (e.g., downloader.yourdomain.com):
- Install Nginx:
sudo apt install -y nginx
- Configure Nginx Site:
Replace the default Nginx configurations with the provided nginx.conf:
sudo cp nginx.conf /etc/nginx/sites-available/yt-downloader sudo ln -s /etc/nginx/sites-available/yt-downloader /etc/nginx/sites-enabled/ sudo rm -f /etc/nginx/sites-enabled/default
- Install Certbot for Free SSL:
sudo apt install -y certbot python3-certbot-nginx sudo certbot --nginx -d downloader.yourdomain.com
- Restart Nginx:
sudo systemctl restart nginx
- Logs: View PM2 live processes and console outputs using
pm2 logs. - Docker Logs: View container outputs using
docker logs -f yt-downloader-app. - Cleanup: Expired files are checked and pruned every 10 minutes from the server disk.