This is a web application for downloading videos from YouTube, Instagram, and X (formerly Twitter). It features user management, cookie support for private videos, customizable download locations, and a clean, modern interface.
- Multi-Platform Downloader: Download videos and audio from YouTube, Instagram, and X.
- User Authentication: Secure login and registration system with JWT-based authentication.
- User & Admin Roles: A default admin user is created, and new users are assigned the 'USER' role.
- Custom Settings: Users can specify their download path and provide cookies to download private/members-only content.
- File Browser: View downloaded files, neatly categorized by platform.
- Easy Deployment: Containerized with Docker and includes a simple installation script for Proxmox LXC on Debian.
- Framework: Next.js 14
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Shadcn UI
- Database: Prisma ORM with SQLite
- Authentication: JWT, bcryptjs
- Downloader:
yt-dlp-wrap
- Node.js (v20.x or later)
- npm
yt-dlpinstalled and available in your system's PATH. (The Docker container handles this automatically).
-
Clone the repository:
git clone <your-repo-url> cd socialdownload
-
Install dependencies:
npm install
-
Create your environment file: Copy the example file and generate a secret key.
cp .env.local.example .env.local
Open
.env.localand replaceyour-super-secret-jwt-keywith a long, random string. -
Set up the database and seed it: This will create the SQLite database file and add a default admin user.
npx prisma generate npx prisma db push npm run seed
The default admin credentials are:
- Email:
admin@example.com - Password:
admin
- Email:
-
Run the development server:
npm run dev
The application will be available at http://localhost:3000.
-
Build the image:
docker build -t social-downloader . -
Run the container: Create directories for persistent data first.
mkdir -p data/db mkdir -p data/downloads
Then run the container, making sure to create and point to a
.envfile.docker run -d \ -p 3000:3000 \ --name social-downloader \ --env-file .env \ -v "$(pwd)/data/db:/app/prisma" \ -v "$(pwd)/data/downloads:/downloads" \ --restart unless-stopped \ social-downloader
The install_lxc.sh script automates the entire setup process on a fresh Debian 12 container.
-
Edit the script: Open
install_lxc.shand change theREPO_URLvariable to your repository's URL. -
Run the script as root: Copy the script to your LXC container and run it.
chmod +x install_lxc.sh ./install_lxc.sh
The script will install Docker, clone the repo, build the image, and run the container.
Important: After deploying, go to the application's settings page and set the Download Path to /downloads to ensure files are saved to the persistent volume created by the deployment scripts.