Clash Setup and Configuration Guide for Windows, macOS, Android, iOS, and Linux
Getting set up takes just three steps: import a configuration, connect, and verify. Follow the user guide to get started. This page is organized by operating system and helps you choose the right installer, select a traffic-routing method, or understand why the same subscription behaves differently across devices. Jump to your platform for troubleshooting, or see the general setup and final sections for cross-platform issues.
General Setup: Installers, Subscriptions, and Traffic Routing
Check your device architecture before choosing a client
Open the client downloads page, select your operating system, and check its version, processor architecture, and package format. Start with Clash Plus, marked as the recommended option on the downloads page. If you prefer FlClash, check the supported platforms listed there; for iOS, follow the section on App Store clients. The installer determines how the software runs; the subscription provides its configuration. Switching clients may resolve installation or permission issues, but it won't restore an expired subscription.
Before quitting your old client, note the active configuration name, selected proxy group, and traffic-routing method. If the client supports exporting, save a local backup you can re-import, and record any rules you added manually. Export files may not include global overrides or app settings. During initial testing, don't run two traffic-routing features at once: even with two valid configurations, they may compete for a local port or default route.
Know the difference between a subscription URL, a local file, and the active configuration
Your provider supplies a subscription URL, usually for fetching updated configurations. A local YAML file is a saved copy that generally won't sync with remote changes. When copying a subscription URL, make sure it's a link to a Clash-compatible configuration—not a management or payment page, or a share link for a single node. A QR code is just a way to share data; after scanning a link or node, check that the client supports importing that type.
After importing, select the new entry in the configuration list, then open the proxy page to check whether its proxy groups appear. If the list has a new entry but the proxy page still shows the old configuration, make sure the new one is set as active instead of adding the link again. Subscription URLs may contain account credentials. Before sharing a troubleshooting screenshot, hide the full URL, node credentials, and request details. Leave only the platform, client name, and relevant error type visible.
Use traffic coverage to distinguish system proxy, TUN, and rule mode
| Method | Traffic covered | How to verify |
|---|---|---|
| Desktop system proxy | Apps that use the system proxy settings | System proxy settings and the target app's request log |
| Desktop TUN | Traffic routed through a virtual network interface | Client startup logs and real requests from your apps |
| Mobile VPN | Traffic routed through the client after system authorization | System VPN status and the client's connection log |
| Rule mode | Requests that reach the client and are evaluated against rules in order | Matched rule, proxy group, and final outbound route |
On desktop, start by testing a browser with the system proxy. Test TUN only if an app that needs access doesn't use the system proxy. On mobile, you typically start the local VPN from the client and approve the system prompt. A VPN indicator only confirms that the tunnel is active; it doesn't mean every request goes through a remote node. Check the active rules and request logs to see whether traffic goes direct—don't rely on the status icon alone.
For your first test, use one traffic-routing method, one test app, and one destination you can revisit. Send a request and check both the client log and the app's result. If the request isn't in the log, first check whether traffic is reaching the client. If it is logged but fails, check the matched rule, node, and DNS resolution. Isolating the failing layer is more effective than changing ports, switching nodes, and enabling TUN all at once.
Keep a local diagnostic configuration
Here's a minimal direct-connection configuration for mihomo. It has no subscription, nodes, or remote rules. Use it only with clients that support local configuration imports to check whether the configuration loads, the local proxy is listening, and requests appear in the log. Save it as a new file; don't overwrite your active subscription. If another process is already listening on the example port, switch to an unused port and update the test app's proxy address to match.
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
rules:
- MATCH,DIRECT
Windows: System Proxy and TUN Setup
Download and install a desktop client
Open Settings → System → About and check System type. Then choose an installer from the Windows downloads. Supported architectures are listed on each client card; don't assume an x64 package is native for ARM64. If you're upgrading, note your current configuration and exit the old process from the system tray before following the installer. Closing the main window alone may leave the tray process running and its listening port occupied.
After installation, launch the client as a standard user first. If Windows blocks the app from running, confirm on the downloads page that the package came from the client you selected, and check whether your device is managed by an organization. Don't disable system security across the board just to complete installation. When migrating from Clash for Windows, re-import your subscription or local YAML rather than copying the old app's program directory, drivers, or service registrations into the new client.
Check the active configuration and proxy groups after importing
Add a link on the client's configuration or subscription page, or use the file picker to import a YAML file. Once the new entry appears, set it as the active configuration. Open the proxy page and expand a group for a test site to confirm it has options. If import fails, determine whether the download failed or the file arrived but couldn't be parsed. The latter often means you received a login page, an error page, or configuration fields the client doesn't recognize.
If the old and new configurations have similar names, rename the local entry to make it easy to identify before updating or switching. Some clients let you choose a node manually within a group; others select one automatically based on the configuration. While testing, don't update the configuration and switch strategies at the same time—changes to names or group members can make it hard to tell which path a request took. To compare nodes, keep the test site and matched rule the same.
Enable the system proxy first; use TUN only if needed
Enable the system proxy in the client, then check the actual settings under Windows Settings → Network & Internet → Proxy. For a manual local proxy, the address is usually the loopback address and the port should match the client's listening port. If the client uses an automatic configuration script, check its status instead of adding another manual proxy. Make a fresh browser request and look for its domain in the client's connection log. You can only assess the outbound route once the request reaches the core.
Command-line tools, background services, and some standalone apps may use their own proxy settings, so a working browser doesn't mean they'll follow the system proxy. Check whether the target app lets you configure an HTTP or SOCKS proxy directly. If you need to route more traffic, turn off the system proxy used for this test, then enable TUN or install the required service as prompted by the client. Test local resources and common apps again. If a work VPN is running, follow your organization's network requirements.
Check loopback restrictions, port conflicts, and leftover processes
If only one app won't connect, don't assume there's a port conflict. First check whether it uses a separate network stack. Some apps isolated in an AppContainer may be unable to access a loopback proxy even when a browser on the same device works. Check the app's identity and any compatibility options provided by the client. On managed devices, ask an administrator before changing settings; there's no need to change settings for other apps.
If the log clearly reports that the address is already in use, find the listener in PowerShell. Replace the port in the command with the actual value shown in the client, then use the process ID in the output to identify it in Task Manager. If it's the old client, exit it normally from the system tray. If another app owns the port, choose an unused port for the current client instead of terminating an unfamiliar process. Update any manually configured proxy addresses in your browser or terminal to match.
Get-NetTCPConnection -LocalPort 7890 -State Listen |
Select-Object LocalAddress, LocalPort, OwningProcess
macOS: Choose the Right Build and Configure Network Services
Choose an installer for your chip and launch it from the right location
Open About This Mac from the Apple menu. Choose the Apple Silicon build for a device with an Apple chip, or the Intel build for an Intel processor. Check each client's package on the macOS downloads. If you downloaded a disk image, open it and follow the window's instructions to drag the app to Applications, then launch it from there. Don't use the mounted disk image as a permanent app location; eject it after installation.
If macOS says the app can't be opened, first check that the package matches your chip, meets the system requirements, and comes from the expected source. A system block and an architecture mismatch are different problems; granting permissions again won't fix the wrong package. When migrating from an archived client such as ClashX Meta, quit the old app from the menu bar and note any proxy settings or custom rules it changed. Client data directories may use different layouts, so re-importing makes it easier to identify issues than overwriting the entire directory.
Handle configuration changes and network authorization separately
After launching, import a subscription or local file and set it as the active configuration. If fetching fails, check whether your browser can reach the provider's management page on the current network, and confirm that system time is set automatically. Access to the management page doesn't mean the subscription returns a parseable configuration. If the client reports a download error, use the status code or parsing message to diagnose it; don't share a screenshot containing the full subscription URL.
After importing, open the proxy groups, check that the group names referenced by the rules match, and choose a node or direct strategy for this test. If the client asks to install a helper, confirm which feature requires it. You don't need to enable every traffic-routing feature to test the desktop system proxy. If the configuration parses but a specific feature won't start, check permissions or routing instead of rewriting the subscription.
Check the active network service—not just the menu bar toggle
Enable the system proxy in the client, then open System Settings → Network, select the service currently connected to the internet, and open Proxies in its details. Wi-Fi and Ethernet have separate settings, so check the active service again after plugging in a cable or switching networks. If manual proxies, automatic proxy configuration, or a management profile are also present, note what each is for before deciding which setting is active. Don't remove settings your organization requires.
Use this read-only command in Terminal to see the proxy settings macOS has resolved. Enabled entries should match the traffic-routing method you expect. For manual HTTP or HTTPS proxies, also check the host and port. This output doesn't prove that a browser or terminal actually uses those settings. Return to the client's connection page and make a fresh request; if it isn't logged, check the app's own proxy settings and the system bypass list.
scutil --proxy
After enabling TUN, check the default route and local services
Compare TUN only if an app doesn't use the system proxy. First turn off the system proxy used for this test, then configure any required permissions or components as instructed by the client. After enabling TUN, visit an address that normally connects directly and a destination that should be routed by a rule. If a company VPN, virtual machine, or container has already set up routes, check that those services still work. An intranet issue may be caused by route priority or DNS changes, not a node.
If problems appear after waking your Mac from sleep, first confirm the network itself is back, then check the client listener and active network service. If failures only repeat after wake, note whether you were on Wi-Fi or Ethernet before and after, whether a work VPN was connected, and whether turning off TUN restores service. Reproduce the shortest sequence before changing settings. Track wake issues separately from subscription update times so you don't mistake two coinciding events for cause and effect.
Android: Install the App, Approve VPN Access, and Keep It Running
Choose an app package that matches your system's supported ABI
Open the Android downloads and choose a package listed for your client. Packages marked arm64 and arm target different application binary interfaces. A 64-bit-capable processor doesn't guarantee that the installed system can run 64-bit apps. If your device specs don't list supported app architectures, check the manufacturer's details or system diagnostics, or choose a universal package the client explicitly supports for your device. Don't guess based on the phone's release date.
When installing from a browser or file manager, Android may ask you to allow that app to install unknown apps. Grant permission only to the source you're using, after confirming it's trustworthy, and revoke it after installation if you prefer. If an update fails because it conflicts with an existing package, first confirm that the source and signing match. Back up any configuration you need before deciding whether to uninstall the old app. Uninstalling usually deletes the app's private data; downloading it again isn't a substitute for a backup.
Import a configuration and approve the system VPN prompt
Paste a subscription link on the configuration page, or use the system file picker to select a downloaded YAML file. You don't need to grant broad storage access just to read one file; select it in the file picker. Switch to the configuration you just imported and check that its rules and proxy groups appear. If the download link opens the provider's login page, get the subscription from the provider's configuration management page instead. A web login session isn't a subscription.
Tap Connect in the client. The first time, Android usually displays a VPN connection request. Confirm that the prompt names the app you're configuring, then allow it. The system VPN service handles traffic routing on mobile, so you don't also need to set a manual HTTP proxy in your Wi-Fi details. After connecting, open a test app and check its requests in the client. If the VPN icon is on but no app requests appear, check whether the app is excluded from the VPN.
Tell apart a replaced VPN, a stopped background process, and a rule blocking traffic
Within the same user or work profile, another app that uses the VPN interface may conflict with the client, including some firewall and filtering apps. If the VPN icon disappears as soon as you connect, check which app is listed on the system VPN page and whether another app is set to always-on. A work profile managed by your organization may have separate policies; working traffic in your personal profile doesn't mean work apps use the same tunnel.
If the connection drops some time after locking the screen, first check whether VPN status disappeared or stayed active while requests began timing out. If the VPN disconnected, check the app's background restrictions in battery settings and adjust only what's needed. If it stayed connected, check whether the phone switched from Wi-Fi to mobile data while locked, and whether the node still connects on the new network. If only one domain or app fails, check the matched rule and app coverage instead of disabling battery management for the whole device.
Test in the foreground, with the screen locked, and after switching networks
Run three tests: make a request on Wi-Fi with the app in the foreground, lock the screen and retry after unlocking, then switch to mobile data and retry. Keep the same configuration, rule mode, and destination for each test. Record the client connection status, whether the request reached it, and the outbound route. If Wi-Fi works but mobile data doesn't, first check mobile data permissions and network access. If the same app fails on both networks, check whether it's bypassed or excluded in the client's app coverage settings.
If Always-on VPN or blocking connections outside the VPN is enabled, the device may temporarily lose internet access while the client is stopped, crashes, or reconnects. That's different from a deleted subscription. First check whether you enabled that policy yourself; don't bypass management requirements on a managed device. Once the connection is working again, decide whether to keep Always-on VPN. For a more reliable connection, change one background or connection setting at a time so you can identify what made the difference.
iOS: Install from the App Store, Import a Configuration, and Verify VPN
Install from the App Store page for your client
Open the Clash Plus App Store page from the iOS downloads. Check the app name, compatibility, and system requirements for your device before installing. This iOS guide covers App Store clients that support Clash configurations; it doesn't explain how to transfer FlClash desktop or Android packages to an iPhone. Some desktop YAML fields have no equivalent in mobile apps. Check the client's import results and feature pages to see what's supported.
After installation, open configuration management and prepare a subscription link or file. If your old client is still in use, note its active configuration and connection mode, then end its VPN session before testing the new app. Don't delete the old app or its local data until you've verified the new configuration. If your device is managed by a configuration profile or your organization, check whether personal VPNs are allowed. Installing an app from the App Store and getting permission to establish a VPN are separate steps.
Choose the right import method for a link, file, or QR code
Use a link for subscriptions that need regular updates: copy the full URL, paste it into the client's new subscription form, and save. Use a file for a YAML configuration you only edit locally: first make sure the download is complete in the Files app, then select it in the client or import it through the system share sheet. If the client doesn't appear in the share sheet, go back to its import page and use the file picker. Don't change the extension to one the client appears to support.
If the client can scan QR codes, first check whether the code contains a subscription or a single node; they may appear in different lists after import. Grant camera or pasteboard access only when needed for the current import. After importing, confirm the entry exists, set it as the active configuration, and check that its proxy groups expand. For more details, see Install an iOS Client and Import a Subscription.
Connect using system authorization
Start the connection in the client. The first time, iOS usually asks whether to allow adding a VPN configuration. Confirm the app name, complete the system authorization, then check the connection status in the app. On iOS, use the VPN routing provided by the client; don't follow the Windows system proxy steps or treat a desktop TUN field as an authorization toggle. Whether a client's Connect button works depends on the system extension and configuration it actually creates.
Open a site you know is reachable, then check the domain, rule, and strategy in the client log. If the rule is set to DIRECT, seeing your regular network's public IP is expected. To verify a remote proxy route, use a trusted test destination that should match a proxy group, rather than refreshing a page that may be cached. The public IP and logs are useful corroborating clues, but one successful request doesn't prove that every app uses the same strategy.
Troubleshoot on-demand reconnection, network switching, and old VPN configurations
If the connection turns itself back on after you switch it off, check VPN management in Settings for an on-demand connection and identify which configuration triggered it. For testing, use the client's options to disable automatic reconnection you set up, so it doesn't keep reclaiming the connection. If you also have a work VPN, content filter, or mobile device management profile, identify which settings you can change personally. Don't delete every configuration shown in Settings just to test.
When switching from Wi-Fi to cellular, the client may need to reconnect. If the issue only affects the first request after switching, wait for the network to come online and send a fresh request, then check the connection log. If failures persist, check cellular data permissions, whether the provider is reachable, and whether the node is still available. If the client still won't connect, note its error and the system VPN status, then disconnect and retry in the app. Remove an old configuration only when you're sure it belongs to you and is no longer needed.
Linux: Package Formats, Desktop Proxy Settings, and Routing
Check your distribution, package format, and architecture
Open the Linux downloads and check each card to see whether it offers a desktop client or a standalone core. For desktop use, start with the recommended Clash Verge Rev, or choose FlClash based on its package format. Debian-based distributions generally use DEB packages; distributions that use RPM should choose a package explicitly marked RPM. The distribution determines the package format, but you still need to check CPU architecture and desktop dependencies. A matching file extension alone isn't enough.
Use uname -m in a terminal to check the kernel architecture; on Debian-based systems, also run dpkg --print-architecture to check the userspace package architecture. The common x86_64 architecture corresponds to packages marked amd64, while aarch64 corresponds to arm64. If the downloads page doesn't list a matching desktop package, don't force-install a package for another architecture or use a standalone core archive as a replacement installer for a graphical app.
Install with your package manager and launch in a regular desktop session
Open the local package with your distribution's graphical installer, or use its package manager to install the file and resolve dependencies. If libraries are missing, first check which distributions the release supports and whether your package sources are current. Don't download individual libraries from untrusted sites. After installation, launch the app from the application menu as a standard user. Provide elevated permissions only when prompted to install the package or enable a managed network service.
After launching, add a subscription or import a file on the configuration page, then set it as active. Desktop environments may store configuration in different locations, so import through the client instead of copying files over from an old directory. An app running in a standard user session may not use the same directory as a background service. If the client can also run a standalone core, check which process is listening on the proxy port before troubleshooting to avoid conflicts between two processes or configurations.
Distinguish desktop settings, terminal environment variables, and services
After enabling the system proxy in a graphical client, check the network proxy settings for your desktop environment and make a fresh request from a desktop app. Different desktops and apps may read settings differently. If your browser works but a terminal program doesn't use the proxy, check whether it reads proxy environment variables. Newly launched terminal processes may also have a different environment from programs that were already running. Don't write a value from a single test directly into a global login script.
This command applies a local HTTP proxy to one request and checks whether the example port is listening. Replace the port with the actual value shown by the client. If the tool reports that it can't connect locally, fix the listener first. If you get a response through the proxy, check the matched strategy in the client log. Whether a service can use the same proxy depends on its own configuration and runtime environment; success in an interactive terminal doesn't prove that it will work for a service.
ss -ltn 'sport = :7890'
curl --proxy http://127.0.0.1:7890 --max-time 15 -I https://example.com/
Before enabling TUN, note how to turn it off and record the existing routes
Consider TUN only if the target app can't use a standard proxy. Follow the client's instructions for any device permissions or helper services it needs; don't run the entire desktop app as an administrator indefinitely. Before and after enabling TUN, run ip route show and ip rule show to record changes to the default route and policy routing. If the machine also runs containers, virtual machines, a work VPN, or remote management, note those dependencies first.
If only domain names fail after enabling TUN, check both the client's DNS logs and the system resolver. On systems using systemd-resolved, run resolvectl status to inspect DNS and routing domains for each interface. On other systems, check the resolver in use. A route doesn't guarantee that DNS uses the same interface, and a working DNS server on one interface doesn't mean the upstream referenced by a rule is reachable. First check whether disabling TUN restores service, then identify which layer changed.
Configuration FAQ: Troubleshoot by Layer
Does the subscription update fail on every device or just one?
Keep a copy of a configuration that still works. If updates fail on multiple devices, first check whether the subscription expired, its URL changed, or the provider is having an outage. If only one device fails, compare its network, system time, and whether the client is using an old URL. Don't delete your active configuration to test an update. Keeping it available lets you test fetching new content separately from connecting with the current configuration.
Check which stage reports the error. For a connection timeout, check network access. For a permission error, check your account on the provider's site. If the download succeeds but parsing fails, confirm the response is actually YAML, not a login or error page. If the configuration references remote rules or proxy providers, distinguish a failure to import the main file from a failure to load a referenced resource; each uses a different URL.
Why is there no request log even though the client is connected—or logs for only a few apps?
Connected doesn't mean every app's traffic is going through the client. Make a fresh request in the target app, then look for its domain and timestamp. If there's no log entry, check the system proxy, the app's own proxy settings, or which apps are included in the VPN. If there is an entry, check the outbound route, error, and destination reachability. If even direct-connection sites fail, turn off traffic routing for a baseline test and check whether the Wi-Fi or system network itself is the problem.
For apps that let you specify a proxy, compare them with a browser on the same device. If the app works with the local port set explicitly but not with its default settings, the issue is likely between the app and the client. If both approaches show the same upstream error, check the connection path. The Connected but No Internet? Troubleshooting Checklist covers ports, DNS, and mistaken rule matches.
How can I tell which rule is taking effect?
Rules are evaluated in order, usually using the strategy from the first match. Put specific domains before broad fallback conditions, and put MATCH last. This example is a rule section for mihomo; both strategies are built-in and don't depend on custom groups. It demonstrates rule order only. Test it in a copy before using it with an existing configuration; don't replace the entire rule section in your active subscription. This example doesn't route other traffic through a node.
rules:
- DOMAIN,example.com,REJECT
- DOMAIN-SUFFIX,example.com,DIRECT
- MATCH,DIRECT
In rule mode, a request that reaches the core and is recognized as example.com matches the first rule; its subdomains can match the second. Use a new connection for testing to avoid reusing an existing one. If the log only shows the destination IP, don't assume a domain rule matched. Names referenced by custom proxy groups must also match exactly. For more examples of match conditions, rule order, and strategy references, see Custom Rule Syntax and Match Order.
Should I check the port or DNS first?
If an app can't connect to the local proxy, check the listening address and port first; changing DNS won't fix a local port connection failure. If requests reach the core but only some domains fail to resolve, compare the system resolver with the client's DNS logs. If requests to an IP work but domain requests fail, treat that as a troubleshooting clue, not a conclusion: using an IP can also change rule matching, certificate checks, or which site the server selects.
Note the original settings before making changes, and change one thing at a time. System DNS, browser secure DNS, and DNS in the core configuration are separate settings; don't change them all at once. If the problem only affects routing rules that rely on geolocation data, check the configuration's data format and update source. Distinguish a file that failed to load from data that loaded but produced unexpected results. For the relevant fields and references, see GeoIP and GeoSite Database Guide.
What should sync across devices, and what should stay local?
Re-import the same subscription on devices that support its format, or distribute the same rule file without private credentials. Each device controls its own listening port, system proxy status, VPN authorization, and TUN routes; these aren't inherited from a subscription. If the client supports saving custom rules as an override, keep them separate from the remote subscription. Otherwise, keep an offline record of local changes so a subscription refresh doesn't overwrite them without a way to reproduce the setup.
To review a connection, note the operating system, client name, configuration type, traffic-routing method, and matched rule for one request. Remove any credentials. Test the smallest necessary change on one device before applying it elsewhere. To repeat the import and connection steps, follow the main workflow in the user guide. To check proxy group selection and the actual outbound route, see First Connection Verification Steps.