Self-hosted YouTube video downloader with a clean web UI
Features โข Quick Start โข Docker โข Development
- Video Download - Download YouTube videos in MP4 format with quality selection
- Audio Extract - Convert to MP3 with bitrate options (browser-based conversion)
- Clean UI - Modern, responsive interface built with shadcn/ui
- Self-Hosted - Full control over your data, no third-party services
- Docker Ready - One-command deployment with Docker Compose
Using Docker Compose:
docker compose up -dThen open http://localhost:3000
| Category | Technology |
|---|---|
| Runtime | Bun |
| Framework | Next.js 16 (App Router) |
| UI | shadcn/ui + Tailwind CSS |
| YouTube Extraction | yt-dlp |
| Audio Conversion | FFmpeg.wasm |
# Clone the repository
git clone https://github.com/initred/youtube-downloader.git
cd youtube-downloader
# Build and run
docker compose up -d --build# Run development mode with source mounting
docker compose -f docker-compose.dev.yml up --buildCode changes in src/ and public/ will be automatically reflected.
docker build -t youtube-downloader .
docker run -p 3000:3000 youtube-downloaderOpen http://localhost:3000 in your browser.
docker compose down- Docker 20.10+
- Docker Compose v2+
- 512MB RAM minimum
- 1GB disk space
# Install dependencies
bun install
# Run development server
bun run dev
# Build for production
bun run build
# Run production server
bun run startGET /api/info?url=<YouTube URL>
Response:
{
"id": "dQw4w9WgXcQ",
"title": "Video Title",
"thumbnail": "https://...",
"duration": 212,
"durationFormatted": "3:32",
"uploader": "Channel Name",
"viewCount": 1000000,
"videoFormats": [...],
"audioFormats": [...]
}GET /api/download?url=<YouTube URL>&formatId=<Format ID>&type=video|audio
Returns the video/audio file as a binary stream.
# macOS
brew install yt-dlp
# Linux
pip3 install yt-dlp
# Windows
winget install yt-dlp# macOS
brew install ffmpeg
# Linux
sudo apt-get install ffmpeg
# Windows
winget install ffmpeg- The video may be private, deleted, or region-restricted
- Try a different video URL
- Large videos (>1 hour) may take longer to process
- The default timeout is 5 minutes
All legal responsibility for using this program lies with the user.
- This program should only be used for educational and personal purposes.
- Downloading copyrighted content without permission is a violation of copyright law.
- Please comply with YouTube's Terms of Service.
- The copyright of downloaded content belongs to the original creator.
- The developer is not responsible for any legal issues arising from misuse of this program.
Contributions are welcome! Feel free to open issues or submit pull requests.
MIT - feel free to use this project for personal or commercial purposes.