Common Issues
YouTube Cookies
If you are having issues downloading trailers due to age restrictions, bot detection, etc., you can save your YouTube cookies and set the Yt-dlp Cookies Path to cookies.txt file containing YouTube cookies. This will allow the app to use the cookies to bypass restrictions.
YouTube rotates cookies frequently on open YouTube browser tabs as a security measure. To export cookies that will remain working with yt-dlp, you will need to export cookies in such a way that they are never rotated.
Note
This is a hack to bypass YouTube restrictions and it might not always work. There is nothing Trailarr can do in those situations.
Do NOT use cookies with New Installations
If you are just setting up Trailarr, it is recommended to not use cookies initially for downloading trailers in bulk, as that might lead to your account being flagged for suspicious activity and YouTube placing a ban on your account. Instead, try downloading trailers without cookies first and then setup cookies once the bulk downloads are complete.
Alternatively, you can try setting up a new YouTube account and use cookies from that new account.
Export YouTube Cookies.txt file
The suggested way to get the cookies file is:
- Open Firefox/Chrome browser.
-
Install a cookies exporter extension like Chrome: Get Cookies.txt locally or Firefox: Get Cookies.txt locally or any other cookies exporter extension.
Extension in Incognito/Private Mode
You might need to open your browser extension settings and allow the extension to work in incognito/private mode.
-
Open an incognito/private browsing window and login to Youtube.
- Open a new tab and close the YouTube tab.
- Export the cookies to a file say
cookies.txt
by settingExport Format
toNetscape
. - Then close the private browsing/incognito window so the session is never opened in the browser again.
- Save/Copy that cookies file to Trailarr App data folder. For example, if you mapped
/var/appdata/trailarr
to/config
in the container, save the cookies file in/var/appdata/trailarr
folder. - Now open Trailarr in browser and navigate to
Settings > Trailer
. UnderAdvanced
settings, setYt-dlp Cookies Path
to/config/cookies.txt
(if you saved the file in/var/appdata/trailarr
folder). - Any new trailers downloaded will use the cookies to bypass restrictions.
See below for more info regarding youtube downloaders and cookies:
- Yt-dlp: Exporting YouTube cookies and How do I pass cookies to yt-dlp?.
- Youtube-dl: How do I pass cookies to youtube-dl?
Warning
Make sure to save the cookies file in a secure location and map the volume to the container. Set the path to the cookies file in Yt-dlp Cookies Path
setting.
Coookies not working
Sometimes the cookies might not work right away. You can try the following steps to troubleshoot:
- Open Trailarr container shell and check if the cookies file is accessible.
- Check the permissions of the cookies file. It should be readable and writable by the app.
-
Run the below command to try and download a trailer using the cookies file and watch out for any errors:
ReplaceYOUTUBE_URL
with the actual video URL. If the download works, then the cookies file is working fine. -
If the download fails, then the cookies file might be invalid or expired. You can try exporting the cookies again and retry the above steps.
- If the download works with the above command, then restart the container and try downloading trailers again.
- If the issue still persists, you can hop on to the Discord server for further help.
Windows Docker Desktop Users
Known Issue - File Access Slowness and Workaround
Windows users of Docker Desktop often experience slow read/write speeds when using volume mounts. This is a known limitation of file sharing between the Windows host and Docker containers.
Relevant threads discussing this issue:
Fortunately, there is a workaround we can use to fix this by using a docker volume. This has already been covered in Example 4 in Volume Mappings.
Copying cookies.txt
to the Docker Volume
If you need to add a cookies.txt
file (for YouTube age verification), you can copy it directly into the container's volume. Follow these steps:
Steps to Copy cookies.txt
to the Docker Volume
-
Run the Container (if not already running): Make sure the container is running.
-
Copy the File to the Container's Volume: Use the
docker cp
command to copy the file from your host machine to the container's/config
directory: -
"C:\docker\trailarr\config\cookies.txt"
: Path to the file on your host machine. -
trailarr:/config/cookies.txt
: Destination path in the container. -
Verify the File Exists: Confirm the file was copied successfully by checking the
You should see/config
directory in the container:cookies.txt
listed.
Notes
- The
/config
directory inside the container is backed by thetrailarr_data
volume. Once the file is in the volume, it will persist even if you recreate the container. - If the file path or permissions cause issues, ensure the
cookies.txt
file on your host machine is accessible and readable.