Deploying YoutubeDL-Server
Introduction
YoutubeDL-Server is a web interface for youtube-dl (and yt-dlp) that allows you to download videos from YouTube and hundreds of other video sites through a simple browser interface. It provides a convenient way to save videos without installing command-line tools locally.
Key highlights of YoutubeDL-Server:
- Web Interface: Simple browser-based download interface
- Multi-Site Support: Download from YouTube, Vimeo, and hundreds of other sites
- Format Selection: Choose video quality and format
- Audio Extraction: Download audio-only versions
- Queue Management: Queue multiple downloads
- Progress Tracking: Monitor download status
- yt-dlp Backend: Powered by the actively maintained yt-dlp
- Self-Hosted: Run your own download service
This guide walks through deploying YoutubeDL-Server on Klutch.sh using Docker.
Why Deploy YoutubeDL-Server on Klutch.sh
Deploying YoutubeDL-Server on Klutch.sh provides several advantages:
Always Available: Download videos anytime without local installation.
Centralized Downloads: Access your download server from any device.
HTTPS by Default: Secure access with automatic SSL certificates.
Persistent Storage: Downloaded files persist with Klutch.sh volumes.
Prerequisites
Before deploying YoutubeDL-Server on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
Deploying YoutubeDL-Server on Klutch.sh
Create Your Repository
Create a new GitHub repository with a Dockerfile:
FROM jjlin/youtube-dl-server:latest
ENV YDL_OUTPUT_TEMPLATE=/downloads/%(title)s.%(ext)sENV YDL_FORMAT=bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best
VOLUME ["/downloads"]
EXPOSE 8080
CMD ["python", "-u", "./youtube-dl-server.py"]Push to GitHub
Push your Dockerfile to your GitHub repository.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project.
Create a New App
Within your project, create a new app and connect your GitHub repository.
Configure HTTP Traffic
Set the traffic type to HTTP with port 8080.
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
YDL_OUTPUT_TEMPLATE | /downloads/%(title)s.%(ext)s |
YDL_FORMAT | bestvideo+bestaudio/best |
Attach Persistent Volume
Add a persistent volume mounted at /downloads for your downloaded videos.
Deploy Your Application
Click Deploy to build and launch YoutubeDL-Server.
Start Downloading
Access your server, paste a video URL, and download videos through the web interface.
Additional Resources
Conclusion
YoutubeDL-Server on Klutch.sh provides a convenient web interface for downloading videos from your favorite sites. Access your download service from anywhere and save videos without needing to install command-line tools on every device.