A self-hosted web application for downloading videos and photos from various social media platforms including Instagram, YouTube, TikTok, Twitter, and more. Features a modern dark theme UI with an intuitive interface.
by bytetrix
- π¬ Multi-platform support: Instagram, YouTube, TikTok, Twitter, Facebook, and 1000+ more
- ποΈ Quality selection: Choose from 360p to 4K (2160p)
- π± Format options: MP4, WebM, MKV, and best available
- π΅ Audio extraction: Download audio-only versions
- π Batch processing: Handle multiple downloads
- π Self-hosted: Complete control over your data
- π Modern UI: Clean, dark-themed responsive design with sidebar navigation
- π Progress tracking: Real-time download status with visual feedback
- ποΈ File management: Organize and manage downloads with cleanup options
- π‘οΈ Security: Rate limiting and input validation
- π Clipboard integration: Quick paste functionality
- π― One-click actions: Auto, Audio, Info, and Paste buttons
- Modern Dark Theme: Deep black backgrounds with accent colors (yellow, purple, red)
- Sidebar Navigation: Collapsible sidebar with Save, Settings, Donate, Updates, and About
- Animated Mascot: Custom cat mascot with smooth animations
- Responsive Design: Mobile-first approach with hamburger menu
- Action Buttons:
- π‘ Auto - Standard download
- π£ Audio - Audio-only download
- π΄ Info - Get media information
- βͺ Paste - Paste from clipboard
- Toast Notifications: Real-time feedback for all actions
- Loading States: Smooth overlays and progress indicators
- Node.js: Version 16 or higher
- pnpm: Package manager (install via
npm install -g pnpm) - Python: Required for yt-dlp (auto-installed in Docker)
- FFmpeg: For video processing (optional but recommended)
-
Clone or download this project
-
Install dependencies:
pnpm install
-
Run setup script:
pnpm run setup
-
Start the development server:
# Start backend pnpm --filter server dev # In another terminal, start frontend pnpm --filter client dev
-
Open your browser: http://localhost:5173
-
Using Docker Compose (recommended):
docker-compose up -d
-
Or using Docker directly:
docker build -t selftube . docker run -p 3000:3000 -v ./downloads:/app/downloads selftube
- Paste a URL from any supported platform
- Click "Get Info" to see video details (optional)
- Select quality and format preferences
- Click "Download" to start the process
- Monitor progress in the download status section
- Access files from the downloads list
- YouTube: Videos, shorts, playlists
- Instagram: Posts, reels, stories, IGTV
- TikTok: Videos and compilations
- Twitter/X: Videos and GIFs
- Facebook: Videos and posts
- And 1000+ more sites supported by yt-dlp
Create a .env file (copy from .env.example):
PORT=3000
NODE_ENV=production
ALLOWED_ORIGINS=http://localhost:3000
LOG_LEVEL=info
RATE_LIMIT_POINTS=10
RATE_LIMIT_DURATION=60Edit config/default.json for:
- Download timeouts and retries
- Allowed formats and qualities
- Cleanup schedules
- Security settings
POST /api/download
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"quality": "720p",
"format": "mp4",
"audioOnly": false
}POST /api/info
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID"
}GET /api/healthselftube/
βββ downloads/ # Downloaded media files
βββ logs/ # Application logs
βββ config/ # Configuration files
βββ server/ # Backend code
βββ public/ # Frontend assets
βββ scripts/ # Setup and utility scripts
- Rate limiting to prevent abuse
- Input validation and sanitization
- Path traversal protection
- CORS configuration
- Security headers via Helmet.js
NODE_ENV=production npm startsudo cp selftube.service /etc/systemd/system/
sudo systemctl enable selftube
sudo systemctl start selftubeserver {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}- yt-dlp not found: Auto-downloads on first use
- Permission errors: Check directory permissions
- Network issues: Verify firewall and connectivity
Visit /api/health to check system status and dependencies.
Check the logs/ directory:
combined.log: All application logserror.log: Error messages only
# Install dependencies
npm install
# Start in development mode
npm run dev
# View logs
tail -f logs/combined.logMIT License - Use freely for personal and commercial projects.
- Report issues on GitHub
- Check documentation in the wiki
- Join community discussions
Powered by yt-dlp - The ultimate media extraction library