An elegant offline YouTube video library using YT-DLP with a React frontend and Express backend.
- Disclaimer
- Features
- Running with Docker
- Manual Installation
- Production Build
- Configuration
- Updating
- Tech Stack
- License
This project was mostly coded using AI (Claude 3.7 Sonnet Thinking).
This code is provided as-is. While effort has been made to ensure functionality, it comes with no warranty or guarantee of support.
Please note:
- Use of this code is at your own risk.
- No official support will be provided for setup, usage, customization, or troubleshooting.
- Community contributions and improvements via pull requests are welcome, but please do not expect personalized assistance.
For any issues or questions, consider consulting online resources, community forums, or attempting to resolve problems independently.
- Download and store YouTube videos locally using YT-DLP
- Beautiful library interface to browse and watch offline videos
- Create and organize playlists
- Automatic English subtitle downloading when available
- Metadata extraction and tag-based browsing
- High-quality video playback with subtitle support
- Real-time download progress updates
- Search functionality for your offline library
- Theme switcher with light and dark mode
- Keyboard shortcuts for playback control
The easiest way to run TubeOffline is using Docker:
-
Make sure you have Docker and Docker Compose installed
-
Clone the repository:
git clone https://github.com/Eidenz/tube-offline.git cd tube-offline
-
Make the management script executable and start the application:
chmod +x tubeoffline.sh ./tubeoffline.sh start
-
Access TubeOffline in your browser at http://localhost:5000 (or your custom port if configured)
For more details on using Docker, see README-Docker.md.
winget install yt-dlp
or download from https://github.com/yt-dlp/yt-dlp/releases and add to PATH
brew install yt-dlp
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
- Clone the repository:
git clone https://github.com/Eidenz/tube-offline.git
cd tube-offline
- Install dependencies:
npm install
- Start the development server:
npm run dev
This will start both the frontend (Vite) and backend (Express) servers concurrently.
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
To create a production build:
npm run build
The built files will be in the dist
directory. To serve these files along with the backend:
npm start
You can modify the server configuration in .env
:
PORT
: Backend server port (default: 5000)DATA_DIR
: Directory to store all data (database, videos, thumbnails, subtitles)DEFAULT_VIDEO_QUALITY
: Default video quality for downloadsDOWNLOAD_SUBTITLES
: Whether to download subtitles by defaultMAX_CONCURRENT_DOWNLOADS
: Maximum number of concurrent downloads
To update TubeOffline to the latest version:
./tubeoffline.sh update
This will automatically:
- Pull the latest code from the repository
- Rebuild the Docker container
- Restart the application with the updated version
If you're running the application manually:
# Pull the latest changes
git pull
# Install any new dependencies
npm install
# Rebuild the application
npm run build
# Restart the server
npm start
- React
- React Router Dom
- Framer Motion for animations
- Tailwind CSS for styling
- Vite for development and building
- React Player for video playback
- Axios for API requests
- React Beautiful DnD for drag-and-drop playlist management
- Express.js
- Better-SQLite3 for database
- yt-dlp for YouTube downloading
- WebSockets for real-time updates
MIT