"The subscription link opens fine in the browser, but the download fails in OpenClash," and "The YAML file download stops halfway through, showing a curl error"—these are classic problems encountered by almost every Clash user.
The reasons for YAML file download failures are far more complex than imagined. It might be hidden in the router's system time, stuck in a corner with insufficient memory, or blocked by the data format of the subscription link itself. The following explains each possible cause and its solution in order from the most fundamental to the most superficial.
Hardware and System Resources: The Most Easily Overlooked "Hidden Killer"
Many software routers seem well-configured, but OpenWrt's default root file system is small, and the `/tmp` space in memory is limited. After the subscription is downloaded, it needs to be decompressed, merged, and then written to the configuration file—if available memory is too low or `/tmp` is full, the process might be killed by the kernel or only half-written, ultimately only displaying a vague "Update failed" message on the UI.
Operational Recommendations: In SSH, execute `free -m` and `df -h /tmp` to monitor whether available memory remains in the single digits (MB level) for an extended period, and whether `/tmp` is approaching 100%. Enabling numerous third-party plugins or setting excessively high log levels can also exacerbate memory fragmentation.
Another type of problem is flash write failure. In extreme cases, running out of space when configuring overlay writes can lead to "downloads appearing successful but disk writes failing." Executing `df -h /overlay` to check remaining space and clearing package caches and old backups are basic maintenance actions.
Temporary mitigation measures include: disabling unnecessary plugins, lowering log levels, splitting subscriptions into smaller groups, or adding swap if hardware allows.
System Time and TLS Certificates: The "Passport" for HTTPS Subscriptions
The vast majority of subscription connections are HTTPS. TLS verification relies on system time—if the router has never synchronized NTP, or if incorrect timezone settings cause time discrepancies, you will see errors such as handshake failure and invalid certificates, which OpenClash will then aggregate as "subscription update failed." This is especially common when the system has been powered off for a long time, configured offline, or time synchronization has been manually turned off.
Operation Recommendations: Confirm that OpenWrt's "System → Time Synchronization" is available and that the time zone and city are set correctly; compare the error using `date` with a trusted site. If a purely offline environment must be used, at least ensure that the time falls within the certificate's validity period.
If certificate-related errors still occur even when the time is correct, check if a missing CA certificate is installed. While HTTP plaintext subscriptions can bypass TLS, they introduce the risk of man-in-the-middle tampering and are not recommended as a long-term solution.
Subscription Link Reachability and DNS: First, confirm that the "path" is working.
This is the most basic troubleshooting step. First, access the subscription link directly with a browser—if the browser can download the YAML file normally, the link itself is valid; if a blank page or HTML login page is displayed, there is a problem with the configuration parameters or IP address.
Some service providers' subscription links return Base64 encoded data, but Clash natively only recognizes YAML format; you need to confirm whether format conversion is required. If the link itself is accessible but OpenClash fails to download, the problem lies in the router's local network environment.
The download path initiated by the router may differ from the path taken by the client on the local network. When OpenClash updates its subscription, the request usually originates from the router; if you also send "local traffic" to a proxy that requires a subscription, a "chicken-and-egg" loop will occur.
Recommendation: Try checking "Do not use a proxy to download the configuration file" in the OpenClash configuration. Also, check if the subscription domain's DNS resolution is normal—you can use `nslookup` or `dig` to directly resolve the subscription link's domain on the router to confirm it's not corrupted or pointing to an incorrect IP.
YAML format issues: from syntax to field names
Sometimes the subscription "downloads successfully," but the node count is 0, or a YAML error is displayed. This could be because: the service provider returned an HTML login page/risk control page, the Base64 content is corrupted, or it contains fields not supported by the current Mihomo version.
More commonly, it's due to format incompatibility. Importing Base64 encoded subscription links directly will cause Clash to fail to recognize node information. The correct approach is to use tools such as SubConverter to standardize the format.
YAML syntax errors are also common: inconsistent indentation, missing necessary fields (proxies, proxy-groups, rules), or the use of unsupported parameters. It is recommended to use an online YAML validation tool to check the syntax and ensure that indentation uses spaces instead of tabs. Pay special attention to the closure of quotes in the `password` field.
Another easily overlooked detail: the field names in the converted configuration file may not be consistent with Clash's expectations. Some users have reported that "proxies/proxy-groups/rules" was incorrectly written as "Proxy/Proxy Group/Rule", causing OpenClash to fail to recognize it. It is recommended to check the field names against the official configuration template.
curl tool and dependency issues: clues hidden in error code
OpenClash depends on the `curl` tool to download subscription files. If you see an error like `curl: (48) Error`, it is usually a problem of incompatibility between libcurl and curl version. Many repositories have compatibility issues with libcurl and curl.
Suggested solutions: Try updating curl and libcurl to the latest versions, or reinstalling from a different repository. If you encounter the error "cannot find dependency ruby-yaml" when installing OpenClash itself, it means the ruby-yaml dependency is missing from the repository. You need to run `opkg update` first; if that doesn't work, you need to switch repositories.
If none of the above works: A last resort solution:
Manually download and import locally. Open the subscription link in your browser, save the downloaded YAML file locally, and then import it into OpenClash using the "Upload Configuration File" method. This completely bypasses the network download step on your router.
Try a different subscription conversion tool. If a converter doesn't work, try SubStore or other conversion tools. Different conversion tools handle special characters and field names differently.
Check the User-Agent. Some service providers implement risk control and blocking for specific User-Agents. Try modifying the User-Agent in the OpenClash subscription settings and simulating browser access.
Consider changing plugins. If OpenClash itself is too resource-intensive or has poor compatibility, experienced users are advised to consider switching to other proxy plugins.
YAML file download failures are 80% not due to a "node crash," but rather environmental issues—insufficient memory, non-writable temporary directories, system time drift causing TLS handshake failure, incorrect DNS resolution links for the subscription domain, or a loop created by the router mistakenly using a proxy when updating the subscription locally.
Troubleshoot in this order: first check memory and storage → then confirm the system time → then verify the reachability of the subscription link → finally check the YAML format. If each step is correct, the problem will naturally be resolved.
For users who rely heavily on subscription updates, a well-configured and stable server is fundamental. Jtti Hong Kong cloud servers use bidirectional CN2 GIA premium lines, providing a stable and smooth network environment for subscription updates and proxy communication—after all, even the best troubleshooting techniques are not as reliable as a stable and reliable underlying network.
EN
CN