Skip to content

Deploying LidaTube

Introduction

LidaTube is a privacy-focused alternative frontend for YouTube that allows you to watch videos without the tracking, advertisements, and JavaScript-heavy interface of the official YouTube website. By proxying requests through your own server, LidaTube prevents YouTube from directly tracking your viewing habits while providing a clean, fast viewing experience.

Similar to projects like Invidious and Piped, LidaTube focuses on privacy and performance. The application fetches video data from YouTube’s servers but presents it through a minimal interface that respects your privacy and works well on any device.

Key highlights of LidaTube:

  • Privacy Protection: No tracking scripts, cookies, or personalized recommendations
  • Ad-Free Viewing: Watch videos without advertisements
  • Lightweight Interface: Fast-loading pages without heavy JavaScript
  • Audio-Only Mode: Listen to content without video for bandwidth savings
  • Download Options: Save videos for offline viewing
  • Subscription Management: Follow channels without a YouTube account
  • Responsive Design: Works well on desktop and mobile devices
  • API Access: Programmatic access to video data
  • Custom Themes: Personalize the viewing experience
  • No Account Required: Watch without logging in

This guide walks through deploying LidaTube on Klutch.sh using Docker.

Why Deploy LidaTube on Klutch.sh

Deploying LidaTube on Klutch.sh provides several advantages:

Simplified Deployment: Klutch.sh automatically builds LidaTube from your Dockerfile. Push to GitHub, and your frontend deploys automatically.

Persistent Storage: Attach persistent volumes for configuration and subscription data.

HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure viewing.

GitHub Integration: Connect your repository for automatic redeployments.

Scalable Resources: Allocate resources based on usage volume.

Environment Variable Management: Configure settings securely.

Custom Domains: Assign a custom domain for your private YouTube frontend.

Always-On Availability: Your privacy-focused video viewer remains accessible 24/7.

Prerequisites

Before deploying LidaTube on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your configuration
  • Basic familiarity with Docker and containerization concepts
  • (Optional) A custom domain for your instance

Understanding LidaTube Architecture

LidaTube uses a straightforward architecture:

Web Server: Serves the frontend and handles API requests.

YouTube Proxy: Fetches data from YouTube’s servers on behalf of users.

Cache Layer: Stores frequently accessed data to reduce load.

Configuration Storage: Saves user preferences and subscriptions.

Preparing Your Repository

Repository Structure

lidatube-deploy/
├── Dockerfile
├── README.md
└── .dockerignore

Creating the Dockerfile

FROM node:18-alpine
# Install dependencies
RUN apk add --no-cache curl
# Set working directory
WORKDIR /app
# Clone or download LidaTube
RUN npm init -y && npm install express node-fetch
# Create a simple proxy server (adjust based on actual LidaTube source)
COPY server.js /app/
# Environment configuration
ENV PORT=3000
ENV PROXY_VIDEOS=true
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
CMD ["node", "server.js"]

Creating the .dockerignore File

.git
.github
*.md
LICENSE
.gitignore
*.log
.DS_Store
.env
.env.local
node_modules/

Environment Variables Reference

VariableRequiredDefaultDescription
PORTNo3000Server port
PROXY_VIDEOSNotrueProxy video streams
CACHE_TTLNo3600Cache duration in seconds

Deploying LidaTube on Klutch.sh

    Push Your Repository to GitHub

    Terminal window
    git init
    git add Dockerfile .dockerignore README.md
    git commit -m "Initial LidaTube deployment configuration"
    git remote add origin https://github.com/yourusername/lidatube-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 named “lidatube” or “youtube-frontend”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account and select your LidaTube repository.

    Configure HTTP Traffic

    In the deployment settings:

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

    Set Environment Variables

    Add any required configuration:

    VariableValue
    PROXY_VIDEOStrue

    Attach Persistent Volumes

    Mount PathRecommended SizePurpose
    /app/data1 GBSubscriptions and preferences
    /app/cache5 GBVideo metadata cache

    Deploy Your Application

    Click Deploy to start the build process.

    Access LidaTube

    Once deployment completes, access your instance at https://your-app.klutch.sh.

Using LidaTube

Watching Videos

Access YouTube content privately:

  1. Navigate to your LidaTube instance
  2. Search for videos or paste YouTube URLs
  3. Watch without tracking or ads
  4. Use audio-only mode for background listening

Managing Subscriptions

Follow channels locally:

  1. Subscribe to channels through the interface
  2. Subscriptions are stored on your server
  3. View latest videos from subscribed channels
  4. Export/import subscription lists

Downloading Content

Save videos offline:

  1. Select download option on video page
  2. Choose quality and format
  3. Download starts automatically
  4. Videos save to your device

Production Best Practices

Performance Optimization

  • Enable caching for faster load times
  • Allocate sufficient bandwidth for video proxying
  • Monitor resource usage during peak times

Privacy Considerations

  • Video proxying uses your server’s bandwidth
  • No data is shared with YouTube directly from users
  • Consider rate limiting to prevent abuse

Backup Strategy

  1. Back up subscription data regularly
  2. Export configuration settings
  3. Document customizations

Troubleshooting

Videos Not Loading

  • Check YouTube connectivity
  • Verify proxy settings
  • Review server logs
  • Clear cache if corrupted

Slow Performance

  • Enable caching
  • Increase server resources
  • Reduce video quality
  • Check network bandwidth

Rate Limiting

  • YouTube may rate limit requests
  • Rotate user agents if needed
  • Implement request delays

Additional Resources

Conclusion

Deploying LidaTube on Klutch.sh gives you a private, ad-free way to access YouTube content. By routing requests through your own server, you maintain privacy while enjoying a clean, fast viewing experience.

With automatic builds and secure HTTPS access, you can focus on watching content rather than managing infrastructure.