- download appropriate executable from github release page or build it from source using project instructions
- install ffmpeg on system to download best quality of videos (for more information see this post)
- download browser cookies using firefox or chrome extension and copy it on the server
- use --cookies flag to pass cookies file to the yt-dl
./yt-dlp --cookies cookies.txt <video_link>