Setup Guide / Platforms & Configuration

Complete Clash Setup Guide for All Platforms

From choosing an installer to routing traffic, check subscriptions, system proxy settings, and TUN by platform.

The Quick Start covers importing a profile, connecting, and checking that it works. This page is a reference: start with your platform when setting up a new device, or follow the troubleshooting steps at the end when a connection fails.

01 / Before You Install

General Setup: Clients, Subscriptions, and Active Configuration

Choose a Build for Your OS and CPU

Check your operating system, processor architecture, and installation permissions before heading to the downloads page. On Windows, check “System type”; on macOS, check the chip or processor under “About This Mac”; on Linux, match the package to the architecture reported by your package manager. The same OS name does not mean binaries are interchangeable. A desktop interface also does not guarantee that your account can install system components that route traffic. On managed devices, check your organization's proxy, VPN, and certificate policies first. If you already use a work VPN, note what it is for—don't disable a required connection just to test.

The client handles the interface, subscription updates, and system integration; the core reads the active configuration, accepts connections, and routes them according to rules. An app labeled Clash may not support every mihomo extension field, and subscription caches are not necessarily interchangeable between apps. For a first install, choose the recommended app for your platform on the downloads page. Avoid installing several clients at once and enabling system proxy, virtual interfaces, and launch at startup in all of them. When migrating, keep a configuration you can roll back to, confirm the new client works, and only then remove the old one.

Separate Remote Subscriptions from Local Changes

Clients usually fetch remote subscriptions from a URL, while local configurations are imported from files. If your provider offers several formats, choose one the client explicitly supports for Clash. Seeing an entry after import only confirms that the URL or file was saved. Check the fetch result and parse status, then select it as the active configuration. A login page, expiry notice, or download error is not a usable configuration, even if the response contains text. Never paste a full subscription URL into a support ticket, cloud drive, or screenshot: it may function as an access credential. When reporting an issue, share the error type instead.

Put local rule and port changes in an override layer the client explicitly supports. Direct edits to a cached copy of a remote subscription may disappear on the next refresh. Conversely, an incorrectly ordered override can make an updated configuration behave like the old one. Give similarly named profiles distinct local names, and note which one is active and which is kept for rollback. See Managing Multiple Subscriptions and Local Configurations for how imports, switching, and caches fit together.

Choose One Traffic Entry Point, Then Test the Same Request

Traffic Entry PointWhat It CoversWhat to Check First
App-Level Manual ProxyOnly apps explicitly pointed to the local proxyCheck the protocol, address, and listening port
Desktop System ProxyOnly apps that use the system proxy settingsCheck the active network proxy and app behavior
Desktop TUNDepends on the virtual interface, routes, and exclusionsCheck permissions, routes, and connection logs
Mobile VPNDepends on system authorization and the app's routing settingsCheck the system VPN status and client logs

For desktop apps that support the system proxy, start by enabling only that setting. For mobile apps that use the system VPN, grant the required permission first. Choose a site you know is reachable, send a new request, and watch the client’s connection log. If there’s no entry, first check whether traffic is reaching the client at all. If there is, inspect the matched rule, selected policy, and whether the failure occurred during DNS resolution or connection setup. This lets you verify configuration loading, traffic capture, and a working route separately instead of treating them all as speed-test problems.

02 / Desktop Clients

Windows: Install a Client and Check the System Proxy

Install, Set Up, and Migrate

Start at the Windows downloads. Clash Plus is the recommended option; you can also compare Clash Verge Rev, FlClash, and Clash Nyanpasu. Open “Settings → System → About” and choose a build that matches “System type” and the download card’s requirements. Don't judge architecture compatibility by whether the installer opens: a desktop app might run through a compatibility layer while its system service or driver has different requirements. Installing the app and enabling TUN are separate tasks. Follow the installer’s setup prompts; you don't need to run the app as administrator just to import a subscription.

When migrating from the discontinued Clash for Windows, first note the remote subscriptions, local profiles, and overrides in the old client. If you use local rule scripts, check whether the new client supports an equivalent merge method. Turn off the old client's system proxy and launch-at-startup settings, then quit it using its normal exit option. Don't overwrite the new client's entire data directory or let both clients compete for the same port. Keep the old configuration until the new client can start, update, and exit on its own. See the Migration Checklist for Discontinued Clients for a side-by-side guide.

Import a Profile, Check the Port, Then Enable the System Proxy

Add a compatible subscription URL on the profile or subscription page, or import a local YAML file. After the update succeeds, select the entry as the active profile, then check the actual listening address and port in Settings, Logs, or the running configuration. mixed-port means the same listening port accepts both HTTP and SOCKS5 proxy connections; it is not a port automatically assigned by Windows. If the app overrides the port, use the overridden value. A tray icon only means the app process is running—it doesn't confirm that the core has bound to a port.

After enabling the client's system proxy, open Windows “Settings → Network & Internet → Proxy” to check the active settings. Then send a new request from a browser that follows the system proxy. If your organization uses a proxy script, distinguish automatic configuration from manual settings. Don't treat the company script URL as a local proxy address or remove managed entries yourself. Some command-line tools and background services ignore this proxy setting. If the browser works but a terminal tool doesn't, check that tool's network options before assuming the subscription is broken.

Use the PowerShell command below to check local listeners. The example uses port 7890; replace it first if your client uses another port. A listener only proves that a process has claimed the port. Check the returned process ID against the system process list to confirm it belongs to the current core. If the logs report that the address is already in use and the listener is an old process, exit the old client normally. If both apps must stay open, assign them different ports and update the test app's proxy address too.

Get-NetTCPConnection -State Listen -LocalPort 7890 |
  Select-Object LocalAddress, LocalPort, OwningProcess

Enable TUN and Restore Networking After Exit

Enable TUN only when you have a clear need to route traffic through it, and follow the client’s instructions. Some clients install a service to obtain the required permissions. A running service doesn't prove the virtual interface has taken over routing; check startup logs and the target app's connection records as well. For a controlled test, turn off the system proxy and use TUN alone. Otherwise, a browser may keep connecting through an explicit proxy, making the test look successful without checking routing. If problems begin after sleep, a network change, or a work VPN reconnect, first check the active default network and virtual adapter. Note whether every app fails or only specific destinations.

If every website reports a proxy error after you exit, check whether Windows is still pointing to a local listener that has stopped. Normally, turn off the system proxy and TUN in the client, exit the client, then restore the settings you recorded before installation. On managed devices, use the organization’s settings. If a firewall prompt asks whether other devices can access the listener, a single-user setup generally doesn't need external access. For a local printer or shared folder, first confirm the service works with routing disabled, then check the client's route exclusions. Don't disable the firewall as a troubleshooting step.

03 / Desktop Clients

macOS: Choose a Build, Check Network Services, and Manage Permissions

Match the App to Your Chip; Separate Installation from Authorization

Choose a build from the macOS downloads. Clash Plus is recommended; Clash Verge Rev and FlClash are also available. The archived ClashX Meta listing is useful for finding a client used in older setups, but it isn't the first choice for a new install. If “About This Mac” shows an Apple chip, choose the Apple Silicon build; if it shows an Intel processor, choose the Intel build. Some apps may run through a compatibility layer, but their helper services may not share the same compatibility. Prefer a build explicitly matched to your chip. Open the disk image and follow its instructions—usually, you need to move the app to “Applications” before opening it, rather than running it from the mounted image.

Opening the app for the first time and authorizing a helper component are separate actions. If macOS says the app can't be opened, first check its download source, architecture, and system requirements. Don't disable system-wide security protections. Grant authorization only when the client says a specific feature needs a helper and the system prompt matches the action you just initiated. Importing a profile or viewing logs is not a reason to run the app with elevated privileges long-term. Before switching clients, quit the old menu bar app and check “Login Items” so its background process doesn't take over the proxy after you sign in again.

Select a Subscription and Check the Active Network Service

Import a URL or local file from the client's profiles page. After the fetch succeeds, enable that entry. A prompt for permission to change proxy settings doesn't mean the subscription is faulty; the client is asking to update system network preferences. Once the system proxy is on, open “System Settings → Network,” select the Wi-Fi or wired service you're using, open its details, and check the active entries under “Proxies.” Each network service can have its own proxy settings. After switching from Wi-Fi to Ethernet or connecting a dock, it's easy to miss that the proxy is still enabled only on the old service.

Run scutil --proxy in Terminal to see the proxy settings macOS currently reports. Check whether HTTP, HTTPS, and automatic proxy configuration are enabled, and whether their addresses and ports match the client. A proxy appearing in the system report doesn't prove every app uses it. If browser requests show up in the log but terminal tools don't, check whether those tools support the system proxy or use separate environment variables or proxy arguments. If the settings look right but no requests appear, check the core's listener logs and whether the app is using a different network configuration.

If the configuration includes local rule files, check that they've actually been copied to the client's managed directory. Absolute paths in a configuration exported from another system may not exist on this Mac, and the app may not be able to access the original directory. If the startup log identifies a rule file or provider that failed to load, fix that specific error first. Don't reinstall the app and switch nodes at the same time. For the first test, keep network changes to a minimum; a single page failing to load doesn't by itself mean macOS blocked the app.

TUN, Sleep, and Network Changes

Clients can differ in how they implement TUN and request authorization. Follow the app's instructions to grant permission, then turn off the system proxy and test TUN alone with an app that doesn't use the system proxy. Check that the connection appears in the log and that the matched policy is expected before choosing your everyday routing method. If local shares, screen mirroring, or LAN device discovery fail, turn off TUN to compare. Multicast discovery and ordinary website traffic are different; a browser loading a page doesn't prove local discovery works. Fix only the network ranges that actually have a problem—don't blindly copy route settings from another platform.

After waking from sleep or joining a guest network that requires a web login, first confirm the network itself is connected. If the sign-in page won't open, temporarily pause the client's traffic routing only if your device management policy allows it; complete sign-in, then turn routing back on. Before quitting, explicitly turn off the system proxy or TUN. If the app has already crashed, check the active network service for leftover manual proxy settings. On a work device, restore the organization's proxy configuration rather than clearing it. Enable launch at login only after confirming that regular internet access, internal services, and the client switch as expected.

04 / Mobile Clients

Android: Install, Grant VPN Access, and Keep the App Running

Choose a Compatible APK and Check Its Source

Choose a build from the Android downloads. Clash Plus is recommended; other options include Clash Meta for Android, FlClash, and Surfboard. These apps differ in the configuration fields they accept and how their interfaces work. Check the download card's system requirements and your device's actual runtime architecture. A 64-bit chip doesn't guarantee that Android provides a 64-bit runtime for third-party apps; choose a 64-bit build only if the downloads page lists one for your device. If installation fails because of a signature mismatch, version conflict, or administrator restriction, identify the specific error before deciding whether to migrate data. Don't assume every install failure calls for another download.

If you open the installer from a browser or file manager, Android may ask you to allow installs from that source. Confirm that the installer was launched by the app you just used, and follow your device management requirements. You can turn the source permission back off after installation. If an update can't replace the old app, first note where the subscriptions came from and which configurations and overrides you use. Uninstalling removes the app's internal data; a screenshot of the policy groups is not a configuration backup. Work and personal profiles have separate app environments, so check which one you're using before importing anything.

Import a Configuration and Connect Through the VPN

Create a remote subscription on the profiles page or choose a local file through Android's system file picker. Once the client reports a successful fetch, check that policy groups appear and resources load without errors, then select the profile as active. If you need a local file, use the app's own import option instead of relying on a path copied from a desktop. If the subscription needs updating but can't be fetched on your current network, first check whether the provider is reachable on that network. Contact the provider if you need to confirm the link is still valid. Don't paste a subscription URL into an unfamiliar conversion tool to troubleshoot it.

On Android, many proxy clients route traffic through the system VPN service, so you don't need to copy the desktop “system proxy” setting. After tapping Start, confirm that the system VPN prompt comes from the app you chose, then check its running status. A VPN icon in the status bar only shows that the system has established a session; it doesn't prove the route, rules, or DNS are working. Send a new request and check whether it reaches the client. If only selected apps should use the VPN, make sure the app you're testing is included.

Usually, only one app at a time can hold the VPN connection for a given user or profile. A work VPN, filtering tool, or previous proxy app may still have it. If the system is set to always-on VPN for another app, a second app may not be able to take over. If “Block connections without VPN” is also enabled, internet access may stop when the VPN does. First check which app is active in the system VPN list. On managed devices, follow administrator policy instead of disabling these restrictions yourself.

Connection Drops on Lock, Per-App Routing, and Network Changes

If the app works in the foreground but stops routing after the screen has been locked, check whether the VPN icon disappeared and whether the app restarted. If both the icon and process are gone, check the app's battery and background activity settings. Adjust the client you're using rather than turning off battery saving globally. If the VPN icon is still present but only some sites fail, check connectivity, DNS, and the policy group's actual exit. A lock-screen interruption and a failed node connection can both look like a page stuck loading, so check whether the system stopped the service.

After switching from Wi-Fi to mobile data, existing connections may not reconnect right away. Note whether the subscription update failed, an active connection dropped, or new requests also stopped reaching the client, then test again on the new network. If you exclude an app from routing, fully quit and reopen it before checking; don't judge by its old session. A manual proxy in a phone's Wi-Fi details applies only to that Wi-Fi network and apps that read the setting. It doesn't replace the client's VPN. You don't need to enable LAN sharing for one device; if you do want to share the proxy with another device, check that the network is trusted and access is restricted.

05 / Mobile Clients

iOS: Install from the App Store and Set Up the VPN

Install from the App Store; Keep App Updates Separate from Subscription Updates

Open Clash Plus's App Store page from the iOS downloads. Check the store's compatibility details and the installation status, then open the app from the Home Screen once it's installed. The profiles, nodes, and rules come from an imported configuration; installing the client from the App Store doesn't create a working subscription. App updates and subscription refreshes are different: the former updates the app, while the latter fetches remote configuration. One succeeding doesn't mean the other is working.

If you're moving to another device, first note where the original configuration came from, along with its local rules and selected policy groups. Confirm that the provider allows you to use the service on the new device. For a local YAML file saved in Files, make sure it's downloaded from the cloud and available to select, then import it through the client's own interface. Importing the file won't necessarily bring over desktop scripts or external rule paths. Start with a compatible subscription from the provider, then add local rules back one at a time. If a field isn't supported, you'll know which step introduced the problem.

Import, Authorize, and Check That Traffic Reaches the Client

Paste a Clash-compatible subscription URL into the profile screen, or select a local file. After importing, check that the client parses it and lists its policy groups, then select it as the active configuration. If the update page reports success but active connections still use an old policy, make sure the new entry is selected and check whether an override is pinning the policy. If your provider has changed the URL, test the new entry on its own first. Delete the old local entry only after confirming the new one works, so you have a way back if anything goes wrong.

The first time you start a connection in the app, iOS may ask to add a VPN configuration. Confirm the prompt comes from the app you just opened, grant permission as requested, then return to the app and check its connection status. If you tapped “Don't Allow” and the app still shows as disconnected, start authorization again from the client. On a managed device, check whether policy blocks the request; don't remove management profiles yourself. The system VPN configuration and the subscription in the client serve different purposes. Removing the system VPN won't fix a subscription format error, and deleting a subscription may not remove the system's authorization entry.

Send a new request from Safari or another app you use, then check the client's available logs or connection history. First confirm the expected rule matched, then check the exit and whether the destination loaded. On iOS, this kind of traffic routing usually uses the network extension behind the system VPN. You can't transfer Windows system proxy settings or mihomo's tun.enable directly into the app's interface. “Configure Proxy” in Wi-Fi details is a separate setting; it isn't the client VPN and doesn't mean cellular data will use the same proxy.

Check Old VPNs, Automatic Reconnect, and Platform Differences

Before switching clients, disconnect in the old app, then check which entry is active in the system VPN list. Some profiles use on-demand connections, so iOS may reconnect when matching conditions are met even after you disconnect manually. If the VPN keeps switching back to the old entry, check its on-demand settings and purpose before changing anything. An administrator should handle work VPN or device management profiles. If the client connects but just one app won't load, check the matched rule and that app's network conditions rather than assuming VPN permission is the cause.

If connections drop intermittently after switching to cellular, entering Low Power Mode, or returning from the background, test a new request on the same network first, then compare with another network. If only existing connections drop during the switch but new ones work, there's no need to reimport the configuration. If all new connections fail, check the app's status and whether the system VPN changed at the same time. Test subscription fetching separately from web access on networks that require sign-in or have expired credentials. For interface details and import steps, see Installing an iOS Client and Importing a Subscription.

06 / Desktop and Core

Linux: Desktop Clients and the mihomo Core

Install the Right Package for Your Distro; Decide Whether You Need a GUI

Desktop users can choose Clash Verge Rev or FlClash from the Linux downloads. Start with the format, architecture, and system requirements listed on the download card. Debian-based distributions use a compatible DEB package; distributions that use RPM tools need a matching RPM build. uname -m shows the machine architecture of the running system. Whether a package installs also depends on its architecture declaration and dependencies. If there's no matching package, don't force an install by ignoring dependencies. Check whether the client supports your distribution or choose a core-based setup that fits how you manage the system.

On a desktop, import a subscription or local file from the client's profiles page. Confirm the download and parsing are complete, then select the active configuration. On a headless machine, check the mihomo core downloads for available builds. Core commands aren't a GUI client's subscription manager. Give the core a provider-supplied, compatible configuration, and use explicit file paths for updates, rollback, and startup. Don't treat another desktop app's private cache as a ready-to-run configuration, and don't mix identically named files from different user directories.

Verify the Listener with a Minimal Configuration Before Loading Real Rules

Use the configuration below only to isolate-test the core and its local proxy listener. It binds to localhost, sends every request to MATCH,DIRECT, and doesn't use remote nodes or enable TUN. Save it as config.yaml in a test directory; don't overwrite your active subscription. The example's ports and log level are explicit test values, not defaults for every package or GUI client.

mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
tun:
  enable: false
rules:
  - MATCH,DIRECT

Assuming mihomo is on your command search path, run the checks below from the directory where you saved the test file. The first command validates the configuration in the foreground; if it passes, start the core with the second. Leave it running in the foreground, open another terminal, and use the third command to watch the request and core logs. If the first command fails, read the error before proceeding. If the third request can't reach the remote host, distinguish a local proxy refusal from DNS failure or an unreachable destination. This example checks the local listener and direct connection path, not proxy nodes from a subscription.

mihomo -t -d "$PWD" -f "$PWD/config.yaml"
mihomo -d "$PWD" -f "$PWD/config.yaml"
curl --noproxy '' --proxy http://127.0.0.1:7890 https://example.com/

Desktop Proxies, TUN, and Long-Running Setups

Desktop proxy settings are mainly for GUI apps that choose to use them. Terminals, containers, and background services have separate environments, so check proxy settings for each one. Don't write global environment variables into every user's startup files just to proxy a single command. If the client has enabled the system proxy and a desktop app appears in the connection log but a terminal tool doesn't, give the terminal tool an explicit proxy argument for comparison. To test TUN, remove that explicit proxy first; otherwise, an app connecting directly to the local port could be mistaken for routed traffic.

Before enabling TUN, check system support, device permissions, and the authorization method provided by the client. Changes to virtual interfaces and routes require different permissions from simply reading a configuration. When managing a remote host, don't change global routes from your only management session. Set up a separate management path and a rollback plan first. For a long-running service, give the core a stable working directory and configuration path, then check file access as the service's actual user. Test an updated subscription before replacing and reloading the current configuration. If startup fails, use the service logs to confirm whether it read the same file you tested manually. A listener on an ordinary port can run with restricted privileges; don't expose the management interface to the public internet just to make debugging easier.

07 / Verify and Roll Back

Configuration FAQ: Trace Traffic from Entry to Exit

Sort Out Issues by Configuration, Capture, and Routing

First, check whether the configuration loaded. If startup logs report a YAML parse error, a missing policy group, or an unavailable rule provider, fix the first specific error. YAML indentation uses spaces; preserve the structure when copying a configuration, and don't casually turn the boolean false into a quoted string. Configurations with remote resources may fetch them during core initialization, so valid local syntax doesn't guarantee those resources are reachable. Use the client's load logs to tell a file structure problem from a failed fetch with no usable cache.

Next, check whether traffic reaches the client. On desktop, check the proxy address or TUN routes; on mobile, verify the system VPN and per-app routing scope. Only then check rules and the exit. In rule mode, the first rule in order that matches usually wins. A broad rule placed before a domain-specific one can prevent later exceptions from matching. During troubleshooting, record the domain, matched rule, and actual exit selected within the group—not just “used the proxy.” Restore the mode and one reproducible request before changing rules, so you don't mix results from different configurations. Look up key names in the glossary.

Configuration Keys to Check First

Configuration KeyWhat to CheckCommon Mix-Ups
mixed-portLocal HTTP and SOCKS5 proxy listenerNot the management interface port
allow-lanWhether LAN devices can connect to the proxy listenerDoesn't replace firewall rules or network access controls
modeWhether rule-based routing is activeThe selected policy group isn't the routing mode
external-controllerBind address for the core management interfaceNot an HTTP proxy address for apps
tun.enableWhether TUN is enabled in the core configurationAlso check permissions, overrides, and runtime logs

Use the active configuration as your reference, not just the original subscription. Some GUI clients inject port, log-level, or control-interface settings before startup. If a LAN device needs to connect to the proxy, check allow-lan, the actual bind address, the firewall, and whether the devices can reach each other. On the other device, enter the LAN address of the host running the proxy—not its own 127.0.0.1. Enable access only when needed on a trusted network, then close the listener when you're done. For an example, see Mixed Ports and Sharing on a LAN.

Common Issues and What to Check Next

Why Did My Old Port or Rules Return After Refreshing the Subscription?

You may have edited only the subscription cache. A refresh rebuilds that file; if the client also applies an override, the final result is a merge. Compare the remote entry, active profile, and override, then move lasting changes to an override the client supports. Test by refreshing, reloading, and checking the actual active port. If the client has no override feature, keep a separate local configuration and decide how to sync subscription updates. Don't treat two separate files as one and edit them back and forth.

A Domain Fails but Its IP Works. Should I Change DNS First?

First check whether the failed request reached the client, whether the app uses system DNS or its own resolver, and whether the logs show a specific DNS error. Accessing an IP directly and accessing a domain can match different rules. HTTPS also depends on the domain and certificate matching, so that alone doesn't identify the cause. With dns.enhanced-mode: fake-ip, receiving a mapped address isn't itself a fault. If an internal domain fails only under TUN, compare the failing resolution path, domain exceptions, and route exclusions. Change one thing at a time.

A Node Test Succeeds, but Why Won't the Actual Site Load?

A speed test only shows that a particular path reached the test address under the test conditions. An actual request may select another group or fail during domain resolution, connection setup, or data transfer. Send a new request to the real destination from the same app, check the matched policy and selected exit, then confirm the speed test used that same exit. Repeatedly shortening the test interval won't fix an application request. See How Latency Tests Work for test settings and limitations.

How Can I Roll Back Changes and Check Whether the Network Was Already Broken?

Undo changes in reverse order. Turn off the newly enabled TUN or system proxy, restore the network settings you recorded, switch back to the last working configuration, and send a new request. If basic connectivity still fails after exiting the client, check network sign-in, the original proxy, and system VPN status. Re-enable only one traffic entry point after the baseline works. When reporting an issue, include the platform, routing method, stage where the error occurs, and sanitized logs. Don't share full subscription URLs, credentials, or an entire configuration containing proxy nodes.