3 min read
Next Media Downloader

The โ€œNext Media Downloaderโ€ project is a Next.js application that allows downloading mp3/mp4 files from various providers. It includes Docker support for easy deployment and configuration with Cloudflare Tunnel.

I made this project because I needed an easy way to download media files while providing a simple way to deploy and access the application.

๐Ÿš€ Get Started

To get started with your own version of the Next Media Downloader, clone the repository and follow the setup instructions below.

๐Ÿ“‹ Features

  • ๐Ÿ“ฅ Download mp3/mp4 files from various providers
  • ๐Ÿš€ Developed with Next.js
  • ๐Ÿณ Docker support
  • ๐ŸŒ Configurable with Cloudflare Tunnel

๐Ÿ“„ Installation and Setup

Ensure you have Docker installed. Clone the repository and follow the instructions to set up Docker and Cloudflare Tunnel.

Running with Docker

docker run -d -p 3000:3000 --name next-media-dl -e NODE_ENV=production simonvanmello/next-media-dl:latest

Development Setup

npm install
npm run dev

๐ŸŒ Cloudflare Tunnel Configuration

  • Go to the Cloudflare Dashboard
  • Click on the Zero Trust tab
  • Expend the Networks tab by clicking on the down arrow
  • Go to the Tunnels tab
  • Click on Create a tunnel
  • Select Cloudflared then click on the Next button
  • Name your tunnel then click on the Save tunnel button
  • Get your tunnelโ€™s token and paste it in the .env file
  • Click on the Next button
  • Add a public hostname for you app
  • In the service section, enter the following values:
    • Type: HTTP
    • Url: nextjs:3000
  • Click on the Save tunnel button

๐Ÿ’ป Commands

All commands are run from the root of the project, from a terminal:

CommandAction
docker compose upStarts the application using Docker Compose
npm run devRuns the development server
docker runRuns the application using Docker