· Platforms · 8 min read

Sync Clash Config Across Desktop and Mobile: 4 Ways to Sync Across Devices

Compare direct subscription links, self-hosted remote configs, WebDAV backups, and local overrides. See which devices each method supports, what maintenance it requires, and what to watch out for.

What to sync: nodes, rules, and device settings

If you only need the same nodes on your computer and phone, import the same Clash-compatible subscription on both. To keep rules and proxy groups in sync too, maintain a shared config. System proxy settings, TUN or VPN status, listening ports, and the currently selected node still need to be checked on each device. Each device fetches subscription updates separately; this does not sync one device's runtime state to another.

MethodBest forWhat you'll maintain
Direct subscription linkBoth devices can import the same format; you mainly need to keep nodes up to dateCheck refresh results and active config on each device
Self-hosted remote configBoth devices need the same rules and proxy groups and support the fields in useHosting, access control, versioning, and rollback
WebDAV backupRestoring after switching devices, or clients that only support local importsExport, download, and import versions manually
Layered local overridesShared rules stay the same, but ports or traffic routing differ by deviceMaintain per-device differences and check merged results after updates

Method 1: Import the same subscription link on each device

First, make sure the subscription returns a config supported by the client you're using. A full Clash subscription can include nodes, proxy groups, and rules; a node-only source cannot be loaded as a complete config. Some services return different formats depending on request headers, so check the import result on both desktop and mobile even if the URL is the same. A mobile client supporting subscriptions does not necessarily mean it can read mihomo YAML directly. This is especially worth checking on iOS, where clients may have specific format requirements.

  1. In each device's config manager, import the same subscription by URL. The menu name varies by client; look for an option such as “Import from URL” or “Add subscription.”
  2. Manually refresh each device once. Check that the update time and node list have changed, then set the new config as active. A successful download does not mean the config has been switched.
  3. If your client supports automatic updates, start with a 24-hour interval and adjust it to any server-side limits. Mobile background tasks may run late. If the node lists differ, open the app and refresh manually to compare them.

Method 2: Host a remote config for shared rules and proxy groups

Host the shared config at an HTTPS URL with access controls, then update both devices from that location. The shared config can include proxy-groups and rules. If both clients support proxy-providers, you can also define node sources separately and reference the provider names with use in your proxy groups. A full subscription YAML and the data expected by a provider are different formats; they are not interchangeable just because both filenames end in .yaml.

Check rules, paths, and access before publishing

  • Rules are matched from top to bottom. Put specific domain rules before broader ones, and leave the fallback MATCH rule at the end. When you rename a proxy group, update references in rules and other proxy groups as well.
  • If you set a cache path for a provider, use a relative path that both devices' core working directories can resolve, such as ./providers/shared.yaml. Avoid absolute paths tied to one computer, and don't sync cache files as config sources.
  • Being able to open a file in a regular browser doesn't mean the client can fetch it. Test a refresh over mobile data and check the HTTPS certificate, authentication method, and redirect restrictions. Also make sure the config URL is reachable during the first import, before the proxy is enabled.
  • Keep the previous working version of the config. For example, save a copy as profile-v003.yaml, test it on one device, then update the fixed subscription URL on both. To roll back, restore the old content and refresh both devices manually. Credentials for revoked nodes won't be restored with the old file.

Use fields supported by both devices in the shared config. If the phone can only import another format, maintain one source of rules and publish a version in each format; the files don't have to be identical. Never put a complete config containing node credentials in a public repository.

Method 3: Use WebDAV for backups and device migration

WebDAV works well for storing restorable config snapshots, but it doesn't have to be your everyday subscription source. Being able to sign in to a WebDAV client or browse its folders doesn't mean Clash's remote import feature supports the same authentication method. If the target client doesn't support it, download the file with a file manager and choose “Import from file.”

  1. Export the shared YAML and device overrides separately. Include a date and version number in the filename, for example profile-2026-11-08-v03.yaml. There's no need to migrate app-generated logs, temporary caches, or runtime state with your config.
  2. Download the snapshot to your phone and import it as a separate config. If the YAML references external rule sets or node providers, check that the new device can fetch those resources too. Opening the main file doesn't prove its external dependencies still work.
  3. Once the new config loads successfully, set it as active and keep the previous known-good version. If both your computer and phone can write to the backup folder, agree that only one device publishes new versions to avoid an older copy overwriting newer rules.

Give the backup account access only to the folders it needs. If anyone who can access a snapshot can also access its subscription tokens and node credentials, store snapshots somewhere access-controlled or encrypt them before uploading. After migrating, revoke the old device's backup access if appropriate.

Method 4: Combine a shared config with local overrides

Local overrides can complement either of the first two methods. Keep updating nodes and rules from the remote source, then set a separate local proxy port on desktop and check the VPN routing mode in the mobile client. Don't edit an automatically refreshed download, as the next fetch may overwrite your changes. First, confirm that the client has a dedicated override, merge, or script feature. If it doesn't, keep a separate local test config or publish device-specific versions from the same shared source.

Desktop example: Declare only device-specific fields

mixed-port: 7890
allow-lan: false

These two lines are an override snippet, not a complete subscription. If your desktop client limits mixed proxies to the local machine, apps that require manually entered proxy settings can use 127.0.0.1:7890. 127.0.0.1 always points to the current device; copying this address to your phone won't connect it to your computer. If desktop port 7890 is already in use, switch to a free port such as 7892 and update any apps that depend on it.

Override behavior depends on the client; YAML itself doesn't define merge rules. Pay particular attention to lists such as rules and proxy-groups: an override may replace the entire list rather than append to it. Before adding a device-specific exception, check that it comes before MATCH and that the rest of the shared rules are still present. If the client offers a final config preview, review it; otherwise, use rule-hit logs to verify the order in effect.

Different behavior after an update? Check these four layers

  1. Fetch results. Compare the update time, node list, and one proxy group changed in the latest update. If only one device changed, first check for a failed refresh, expired authentication, or a delayed background update.
  2. Load results. If both devices show an update but only one reports a parse error, compare the client and core versions in use. Check for unsupported fields, missing proxy groups, and unreadable rule sets. Restore the previous version on that device first; there's no need to change both at once.
  3. Traffic routing. Enabling the system proxy on a computer may not cover every app; a phone may have imported the config without starting its VPN. On iOS, for example, check the connection under Settings → General → VPN & Device Management → VPN. Use the client's logs to confirm whether a rule matched.
  4. Rules and exit node. Send a new request to the same domain from each device. If the client provides connection logs, compare the matched rule, target proxy group, and final node. If both devices match the same group but use different nodes, first check whether the manual selections match or the group automatically selects a node based on each device's latency test.

For your first setup, use the same subscription to test imports and refreshes on both devices. Add a remote config only if you need shared rules, and add overrides only when ports or traffic routing differ. Use WebDAV just for recovery. Adding one layer at a time makes it easier to pinpoint whether an issue comes from the source, config loading, or device routing—without rebuilding the entire config.

Download Clash