Skip to content

Deploying yt-dlp Web UI

Introduction

yt-dlp Web UI provides a user-friendly browser interface for yt-dlp, the popular command-line video downloader. Instead of memorizing complex command-line options, users can paste URLs, select formats, and manage downloads through an intuitive web interface.

Built to make yt-dlp accessible to everyone, the Web UI maintains the full power of yt-dlp while presenting it in a graphical format. Users can download videos from thousands of supported websites, choose quality settings, extract audio, and monitor download progress all from their browser.

Key highlights of yt-dlp Web UI:

  • Browser-Based: Access from any device with a web browser
  • Easy Downloads: Paste URL, select options, and download
  • Format Selection: Choose video quality, audio format, and more
  • Download Queue: Manage multiple downloads simultaneously
  • Progress Tracking: Real-time download progress and status
  • History: View past downloads and re-download files
  • Audio Extraction: Extract audio from videos easily
  • Playlist Support: Download entire playlists or individual videos
  • Subtitle Downloads: Fetch available subtitles automatically
  • Mobile Friendly: Responsive design for phones and tablets
  • Open Source: Multiple implementations available

This guide walks through deploying yt-dlp Web UI on Klutch.sh using Docker, configuring the interface, and managing video downloads.

Why Deploy yt-dlp Web UI on Klutch.sh

Deploying yt-dlp Web UI on Klutch.sh provides several advantages:

Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds the Web UI without complex configuration. Push to GitHub, and your interface deploys automatically.

Persistent Storage: Attach persistent volumes for downloaded files. Your videos survive container restarts and redeployments.

HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure access from anywhere.

GitHub Integration: Connect your configuration repository directly from GitHub. Updates trigger automatic redeployments.

Scalable Resources: Allocate CPU and memory based on download frequency and video sizes.

Environment Variable Management: Securely store configuration through Klutch.sh’s environment variable system.

Custom Domains: Assign a custom domain for easy access and sharing.

Always-On Availability: Your download interface remains accessible 24/7 from any device.

Prerequisites

Before deploying yt-dlp Web UI on Klutch.sh, ensure you have:

Understanding yt-dlp Web UI Architecture

yt-dlp Web UI typically consists of these components:

Web Server: Serves the frontend interface and handles user interactions. Usually built with Flask, FastAPI, or Node.js.

yt-dlp Backend: The actual yt-dlp binary that performs downloads. Executes commands based on user selections.

Download Manager: Tracks download progress, manages queues, and handles concurrent downloads.

File Storage: Organizes downloaded files and serves them for access or additional download.

Database (Optional): Stores download history, user preferences, and queue state.

Preparing Your Repository

To deploy yt-dlp Web UI on Klutch.sh, create a GitHub repository containing your configuration.

Repository Structure

yt-dlp-webui-deploy/
├── Dockerfile
├── config.json
├── README.md
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile using a popular yt-dlp web interface:

FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install yt-dlp
RUN pip install --no-cache-dir yt-dlp
# Clone a popular web UI (using alexta69/metube as example)
WORKDIR /app
RUN git clone --depth 1 https://github.com/alexta69/metube.git .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Create directories
RUN mkdir -p /downloads /config
# Set environment variables
ENV UID=1000
ENV GID=1000
ENV DOWNLOAD_DIR=/downloads
ENV STATE_DIR=/config
ENV TEMP_DIR=/tmp
# Expose web port
EXPOSE 8081
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \
CMD curl -f http://localhost:8081/ || exit 1
# Start the application
CMD ["python", "app/main.py"]

Alternative: Using Docker Hub Image

For simpler deployment, use an existing image:

FROM alexta69/metube:latest
# Set environment variables
ENV UID=1000
ENV GID=1000
ENV DOWNLOAD_DIR=/downloads
ENV STATE_DIR=/config
# Create directories
RUN mkdir -p /downloads /config
# Expose web port
EXPOSE 8081

Configuration Options

Create a config.json file for additional settings:

{
"download_dir": "/downloads",
"temp_dir": "/tmp",
"max_concurrent_downloads": 3,
"default_format": "bestvideo[height<=1080]+bestaudio/best[height<=1080]",
"keep_archive": true,
"embed_metadata": true,
"embed_thumbnail": true,
"add_subtitles": true
}

Creating the .dockerignore File

Create a .dockerignore file:

.git
.github
*.md
LICENSE
.gitignore
*.log
.DS_Store
.env

Environment Variables Reference

VariableRequiredDefaultDescription
DOWNLOAD_DIRNo/downloadsDirectory for downloaded files
TEMP_DIRNo/tmpTemporary file directory
STATE_DIRNo/configConfiguration and state storage
UIDNo1000User ID for file permissions
GIDNo1000Group ID for file permissions
OUTPUT_TEMPLATENo-Custom yt-dlp output template
DEFAULT_THEMENoautoUI theme (light/dark/auto)

Deploying yt-dlp Web UI on Klutch.sh

Once your repository is prepared, follow these steps to deploy:

    Push Your Repository to GitHub

    Initialize your repository and push to GitHub:

    Terminal window
    git init
    git add Dockerfile config.json .dockerignore
    git commit -m "Initial yt-dlp Web UI configuration"
    git remote add origin https://github.com/yourusername/yt-dlp-webui-deploy.git
    git push -u origin main

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project. Name it something descriptive like “ytdlp-webui” or “video-downloader”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account and select your yt-dlp Web UI repository.

    Configure HTTP Traffic

    The web interface serves over HTTP:

    • Select HTTP as the traffic type
    • Set the internal port to 8081

    Set Environment Variables

    Configure optional environment variables:

    VariableValue
    UID1000
    GID1000

    Attach Persistent Volumes

    Add persistent storage for downloads:

    Mount PathRecommended SizePurpose
    /downloads100 GBDownloaded video files
    /config1 GBApplication state and history

    Deploy Your Application

    Click Deploy to start the build process. Klutch.sh will:

    • Build the container image
    • Install yt-dlp and ffmpeg
    • Attach the persistent volumes
    • Start the web server
    • Provision an HTTPS certificate

    Access the Web UI

    Once deployment completes, access your yt-dlp Web UI at your deployment URL. No login is required by default.

Using yt-dlp Web UI

Basic Download

  1. Open the web interface in your browser
  2. Paste a video URL into the input field
  3. Select your preferred format and quality
  4. Click “Download” to start

Format Selection

Choose from common format options:

OptionDescription
Best QualityHighest available video and audio
1080pMaximum 1080p resolution
720pMaximum 720p resolution
Audio OnlyExtract audio as MP3 or M4A
CustomSpecify yt-dlp format string

Playlist Downloads

For playlist URLs, you can:

  • Download the entire playlist
  • Select specific videos from the playlist
  • Choose to download as individual files or merge

Audio Extraction

To extract audio from videos:

  1. Paste the video URL
  2. Select “Audio Only” format
  3. Choose audio format (MP3, M4A, etc.)
  4. Download the extracted audio

Managing Downloads

The interface provides:

  • Queue View: See pending and active downloads
  • Progress Bars: Real-time download progress
  • Cancel Option: Stop downloads in progress
  • History: View completed downloads
  • Re-download: Download previous items again

Accessing Downloaded Files

Direct Download

Most web UIs allow downloading completed files directly from the browser through the completed downloads section.

File Browser Integration

If you need to manage files more extensively, consider deploying a file browser alongside yt-dlp Web UI that points to the same download volume.

Volume Access

Files are stored in the persistent volume at /downloads. The file structure typically follows:

/downloads/
├── Video Title.mp4
├── Another Video.webm
└── Playlist Name/
├── Video 1.mp4
└── Video 2.mp4

Production Best Practices

Security Recommendations

  • Access Control: Consider adding authentication if exposing publicly
  • Storage Limits: Monitor disk usage to prevent exhaustion
  • Update Regularly: Keep yt-dlp updated for site compatibility
  • Rate Limiting: Avoid overwhelming source sites

Resource Management

  • Concurrent Downloads: Limit simultaneous downloads
  • Storage Cleanup: Implement regular cleanup of old files
  • Temp Directory: Ensure temp space for processing
  • Memory Allocation: Allocate memory for video processing

Performance Optimization

  • FFmpeg Settings: Configure for your quality/speed balance
  • Network Bandwidth: Consider bandwidth limits
  • Queue Management: Set appropriate queue limits
  • Caching: Enable caching for frequently accessed content

Troubleshooting Common Issues

Downloads Failing

Symptoms: Downloads start but fail to complete.

Solutions:

  • Update yt-dlp to the latest version
  • Check if the site is supported by yt-dlp
  • Verify network connectivity
  • Review logs for specific error messages
  • Check available storage space

Slow Downloads

Symptoms: Downloads proceed slowly.

Solutions:

  • Check source site rate limiting
  • Verify network bandwidth
  • Reduce concurrent downloads
  • Check resource allocation

Format Not Available

Symptoms: Requested format cannot be found.

Solutions:

  • Use a more general format selector
  • Check available formats for the video
  • Some videos have limited format options
  • Try “best” format as fallback

Storage Full

Symptoms: Downloads fail with storage errors.

Solutions:

  • Increase persistent volume size
  • Delete old downloads
  • Implement automatic cleanup
  • Check for incomplete downloads consuming space

Site Not Supported

Symptoms: Error indicating unsupported site.

Solutions:

  • Verify the site is in yt-dlp’s supported list
  • Update yt-dlp to latest version
  • Check for site-specific extractors
  • Some sites require authentication

Additional Resources

Conclusion

Deploying yt-dlp Web UI on Klutch.sh gives you a powerful, accessible video downloading interface without the complexity of command-line tools. The combination of yt-dlp’s extensive site support and a user-friendly web interface means anyone can download videos from thousands of sites with just a few clicks.

Whether you’re archiving content, creating offline libraries, or extracting audio from videos, yt-dlp Web UI on Klutch.sh provides a reliable, always-available solution accessible from any device with a web browser.