YouTube aggressively rate-limits and bot-checks IP addresses that make automated download requests. When a self-hosted Yoink instance starts hitting these limits, yt-dlp will begin failing with errors likeDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/coah80/yoink/llms.txt
Use this file to discover all available pages before exploring further.
"Sign in to confirm you're not a bot". Rotating HTTP proxies give each download request a fresh residential IP, making it indistinguishable from ordinary browser traffic.
How Yoink uses proxies
Proxies in Yoink are scoped to YouTube downloads only — other sites are downloaded directly without a proxy. The full fallback chain for a YouTube request is:Try yt-dlp directly
Yoink first attempts the download with yt-dlp using YouTube session tokens (PO token + visitor data) for authentication. No proxy is used at this stage.
Retry with a proxy
If yt-dlp fails and a proxy is configured, Yoink retries the same download with a randomly selected proxy URL injected via
--proxy. A new random proxy instance is picked for each attempt.The Cobalt API fallback is always present even without any proxy configuration. Proxies extend the yt-dlp path before reaching Cobalt — they do not replace the fallback.
Proxy URL format
Yoink constructs a proxy URL for each download request using this format, drawn directly frominternal/util/proxy.go:
{N} is a randomly selected integer between 1 and PROXY_COUNT (inclusive). This matches the session-based username pattern used by major residential proxy providers — the number suffix selects a specific proxy endpoint or geographic session.
For example, with the configuration below, a generated URL might look like:
GetRandomProxyURL() in internal/util/proxy.go, which uses crypto/rand for secure random number generation.
Configuration
All four proxy variables must be set for proxy support to activate. If any one ofPROXY_HOST, PROXY_USER_PREFIX, PROXY_PASSWORD, or PROXY_COUNT is missing or empty, HasProxy() returns false and yt-dlp runs without a proxy.
| Variable | Description |
|---|---|
PROXY_HOST | Hostname of the proxy provider’s endpoint. |
PROXY_PORT | Port number. Defaults to 80 if not set. |
PROXY_USER_PREFIX | Username prefix. The random session index is appended as -{N}. |
PROXY_PASSWORD | Proxy authentication password. |
PROXY_COUNT | Total number of proxy endpoints to rotate across. Yoink selects N in the range [1, PROXY_COUNT]. |
Choosing a proxy provider
When selecting a provider:- Look for providers that support sticky sessions via username suffixes — this is the pattern Yoink uses.
- Choose a provider with a large residential IP pool for maximum rotation diversity.
- US-based pools tend to have the best YouTube reliability, but match the region to your primary audience if download speeds matter.
Verifying proxy configuration
When Yoink starts, you can confirm that proxies are properly configured by checking the startup logs. IfPROXY_HOST is set and HasProxy() returns true, proxy URLs will be passed to yt-dlp as --proxy http://... during YouTube download retries.
If you want to test proxy connectivity independently:
Proxies and Cobalt API together
Proxies and the Cobalt API serve complementary roles. Cobalt is the final safety net — it handles cases where both the direct yt-dlp attempt and the proxy retry fail. Configuring both gives you the best resilience:With proxies only
yt-dlp direct → yt-dlp via proxy → Cobalt API fallback. Proxy adds one extra attempt before Cobalt.
With Cobalt only
yt-dlp direct → Cobalt API fallback. No proxy retry step. Simpler but more Cobalt-dependent.
What bot detection errors look like
What bot detection errors look like
Yoink monitors yt-dlp stderr output for these specific strings to detect YouTube bot-check failures:When any of these appear, the download is classified as a bot-detection failure and the proxy retry path is triggered (if proxies are configured), or the Cobalt API fallback is used.