Convert YouTube videos to MP3. No BS.
Note
For Kamal v1 with Traefik, see legacy v0.1.7.1.
First, you'll need to obtain a cookies.txt
file to avoid bot checks coming from YouTube. Here's a
guide on how to do this: https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp
Short version:
-
Install the
Get cookies.txt LOCALLY
extension (Chrome, Firefox) -
Open an incognito window
-
Create a throw-away Google account, go to https://youtube.com/robots.txt
-
Choose "Current Site" from the
Get cookies.txt LOCALLY
extension menu -
With the
cookies.txt
that was loaded by extension run this command:scp -P <SSH_PORT> config/cookies.txt <SSH_USER>@<HOST>:/rails/config/cookies.txt
-
Clone the repository
-
Install
kamal
(see Kamal docs):gem install kamal
-
Create a
config/deploy.yml
file from sample:cp config/deploy.yml.sample config/deploy.yml
-
Set values in
config/deploy.yml
to match your setup -
Create a
.env
file from sample:cp .env.sample .env
-
Set values in
.env
to match your setup -
Prepare server(s) - everything from copying an SSH key to setting up UFW, users and permissions:
./bin/prepare_server
-
Finally, deploy:
kamal deploy
It's possible to prepare & deploy a custom environment too.
Make sure you have a config/deploy.[environment].yml
and .kamal/secrets.[environment]
files.
For example, for a staging
environment:
./bin/prepare_server staging
kamal accessory boot redis -d staging
kamal deploy -d staging.