Natvps.id – YouTube-DL-Server is a web ui & rest fire wrapper for YouTube-DL And YT-DLP. Youtube-DL-Server allows us to download YouTube videos through the web interface to integrate YT-DLP with other applications, such as N8N.
This article discusses the steps to install YouTube-DL-DL-Server on NAT VPS using a docker, along with the Nginx configuration for Reverse-Proxy. This article uses Ubuntu 22.04 as a reference, but you can use other distributions such as Debian and Centos. Make sure the OS used supports the docker.
Port forwarding configuration
Considering we use grout, we need to add 2 Port Forwarding Configuration on the virtualizor panel (or other VPS panels according to the provider), namely Port Forwarding HTTP and HTTPS For the Gowhatsapp domain.
For example, in this article will use a domain ytdl.tutorial.mdinata.my.id to access the application. You are free to change the domain according to your choice. Record this port and domain, because we will use it again in the deploy process.

Don’t forget to add DNS Records to go to your NAT VPS public IP, like this:

Install Docker
We will use a docker and compile a docker for men-spread Gowhatsapp.
First, install curly Using Orders:
apt update && apt install curl -y

Then, run manuscript Automatic installation from the docker by entering:
curl -fsSL get.docker.com | sh
Wait until the installation process is complete.

Install YouTube-DL-Server
Youtube-DL-Server provides examples of compose docker configurations that can be used, so we don’t need to create configuration files docker-compose.yml from the beginning.
Create a new directory:
mkdir youtube-dl-server cd youtube-dl-server/

Create a file docker-compose.yml using nano:
apt install nano -y # jika belum nano docker-compose.yml
Attach the following configuration:
# https;//natvps.id/install-youtube-dl-server-nat-vps
# References:
services:
youtube-dl:
ports:
- 8080:8080
image: "nbr23/youtube-dl-server:latest"
volumes:
- ./youtube-dl:/youtube-dl
- ./config.yml:/app_config/config.yml:ro # Overwrite the container's config file with your own configuration
restart: always

Save the file with Ctrl-XY, then enter.
Create a new file again by name config.yml For YouTube-DL-Server Configuration:
nano config.yml
Fill in the following configuration;
ydl_server: port: 8080 host: 0.0.0.0 metadata_db_path: '/youtube-dl/.ydl-metadata.db' ydl_options: output: '/youtube-dl/%(title)s [%(id)s].%(ext)s' cache-dir: '/youtube-dl/.cache'

Save the file.
If so, run the application:
docker compose up -d
Wait until the process spread finished.

Nginx Configuration (Reverse Proxy)
So that we can access the URL through a domain like ytdl.tutorial.mdinata.my.idwe can use Reverse Proxy Like Nginx.
First, install Nginx through the command:
# Hapus Apache2 dan pendukungnya (biasanya terpasang secara bawaan di VPS OpenVZ) apt purge apache2* -y # Install NGINX apt install nginx -y

Create a new host configuration specifically for Youtube-DL-Server:
nano /etc/nginx/sites-available/ytdl
Then stick the following configuration:
# Konfigurasi NGINX untuk deploy youtube-dl-server di NAT VPS
#
server {
server_name ytdl.tutorial.mdinata.my.id;
listen 80;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass
}
}
Adjust ytdl.tutorial.mdinata.my.id with your domain.

Activate the configuration with:
ln -sf /etc/nginx/sites-available/ytdl /etc/nginx/sites-enabled/ytdl # Restart NGINX systemctl restart nginx

Produce SSL certificate (let’s encryption)
So that our domain can be accessed through HTTPS, we need to make a SSL certificate. We can use a free SSL certificate from Let’s Encrypt through Certbot.
Install Certbot and Nginx plugin use the command:
apt install python3-certbot python3-certbot-nginx

So, produce Certificate through Certbot with the command
certbot --nginx -d ytdl.tutorial.mdinata.my.id
Change ytdl.tutorial.mdinata.my.id with your domain.

Happy! Your current domain can be accessed via a safe connection https.
Access the dashboard
Dashboard can be accessed via your previous domain. Example: https://ytdl.tutorial.mdinata.my.id.


Cover
Thus this article is about the steps to install YouTube-DL-Server on NAT VPS. If you are confused or doubtful, don’t hesitate to ask questions in the telegram group @ipv6indonesia. Thank You!
Game Center
Game News
Review Film
Rumus Matematika
Anime Batch
Berita Terkini
Berita Terkini
Berita Terkini
Berita Terkini
review anime