Docs / Initial Setup
Clash Setup Guide
Import a subscription, choose a rule mode, connect, and check the routing results.
Before you begin, get a subscription URL from a trusted source and make sure it works with your client. Open a browser and check that you can reach a site you normally use with the proxy turned off; keep it as a baseline for testing. If another proxy or VPN is already handling your system’s traffic, disconnect it normally before setup, unless it’s required for work or device management. This makes it easier to tell a pre-existing network issue from a change caused by this setup.
1. Import a Subscription and Activate the Configuration
Open “Profiles” or “Subscriptions” in the client’s sidebar. Find the URL field, or click the add button in the top-right corner and choose an option such as “Import from URL.” Paste the full subscription URL and check that the protocol at the beginning and any parameters at the end are intact. Make sure you haven’t copied extra quotation marks, spaces, or line breaks. Click “Import” or “Save” and wait for the result. For your first import, add just one source. Avoid enabling override scripts or merging multiple subscriptions at the same time; otherwise, it can be hard to tell which content is active if something goes wrong.
Return to the configuration list and find the entry you just added. Some clients select an imported configuration automatically; others require you to click its card or choose “Enable” or “Set as current” from a menu. Check the current-configuration indicator or status text—an entry appearing in the list doesn’t mean it’s enabled. Next, open the Proxies page and check for the policy groups and candidate nodes defined by this configuration. If you still see groups from the previous configuration, go back and confirm your selection, then wait for the core to finish loading before continuing.
If the import fails, check whether the error occurred while downloading or parsing. For a timeout or connection error, first confirm that your network is working, then ask your subscription provider whether the URL is reachable. For a format error, make sure you copied the client subscription URL—not an account page, help article, or share link for a single node. If the entry was saved but won’t activate, check the field or line number reported by the client and get a configuration that works with it. Subscription URLs may contain credentials. When reporting an issue, share only the error type and client name; never disclose the full URL or a screenshot that shows it.
If you already have a local config.yaml file, you can use “Import from file” on the same page instead of importing from a URL. After selecting the file, check that it’s set as the current configuration. Local files and remote subscriptions may update differently. If the client still can’t load the file, use the FAQ to troubleshoot format or compatibility issues. Continue only after the Proxies page shows the policy groups from the current configuration.
2. Choose a Rule Mode and Proxy
On the Proxies page or home screen, find the mode selector and choose “Rule” or Rule. Rule mode checks requests against the current configuration’s rules in order, then applies the corresponding policy when a rule matches. If the configuration ends with MATCH, it catches traffic that didn’t match an earlier rule. Rules can send some requests directly and route others through a policy group. Rules vary by subscription, so don’t assume a destination based on its domain suffix or server location.
Next, choose the route for your traffic. On the Proxies page, find the policy group referenced by the rules. Group names come from the configuration; the group may not be called Proxy. If the client has a Rules page, check which group a proxy rule points to, then return to Proxies and expand that group. For a manual-selection group, choose an available node that works on your network and confirm the selection indicator moves to it. If the group points to another group, follow the chain to see the final selection. A selected outer group doesn’t necessarily mean a proxy node has been selected. Automatic and failover groups choose for you based on the configuration; there’s no need to change them to a manual group.
The client’s latency test can give you a useful first check, but it tests a specific address—not whether a particular website or app is reachable. Keep a clear selection and verify it with an ordinary website in the next step. If the group is currently set to DIRECT, traffic matched to that group will connect directly. First check whether you selected the wrong group or route; don’t rewrite your rules just to force every connection through a proxy.
“Global” mode can help with a quick comparison. If your client supports it, test the same website in Rule mode and Global mode, then switch back to Rule mode so traffic that should connect directly doesn’t go through a proxy. “Direct” mode sends traffic handled by the core directly; it doesn’t turn off the system proxy or disconnect the VPN. If everyday connections work but a few sites aren’t routed as expected, check the connection logs first, then see Policy Groups or Rule Set Management.
3. Enable the System Proxy or VPN
On desktop, first confirm that the client’s core is running, then enable “System Proxy” from the home screen, Settings, or the system tray menu. Keep the client running. This setting sends traffic from apps that honor the system proxy to the client; it doesn’t change your node selection. When testing in a browser, use one that follows the system proxy settings. If the browser has its own proxy settings or an extension manages its connection, make sure those settings aren’t overriding the system proxy. Linux system proxy support depends on the desktop environment and apps. If the toggle isn’t available, follow the client’s documentation to use its local proxy address and port. Don’t assume an example port is the one assigned on your device.
On mobile, return to the client’s home screen and tap “Start” or “Connect.” The first connection usually prompts the system to authorize a VPN configuration. Confirm the request comes from the client you just opened, then allow it. Wait for the client to show that it’s connected, and check the system’s VPN settings or status indicator. If you denied the authorization, switching nodes won’t fix the issue; return to the client and try connecting again. If your device is managed by your organization or already has a VPN you need to keep, don’t bypass its restrictions. Check whether your device policy allows another VPN configuration.
For your first test, use just one clear way to route traffic. On desktop, start with the system proxy; on mobile, use the VPN created by the client. Don’t enable TUN or add another proxy while testing the desktop system proxy. Seeing policy groups on the configuration page, a running core, and an active system proxy or VPN are three separate things. If the desktop toggle turns itself off, check whether the core failed to start or the local port is already in use. If mobile reports that a VPN is already active, identify the current connection before deciding whether to disconnect it. Find related errors in the FAQ.
If the baseline site you checked before setup stops opening, turn off the system proxy you just enabled or disconnect the VPN on mobile, then try the same site again. If it works, the problem started after traffic routing was enabled; check the client’s connection status and configuration logs first. If it still doesn’t work, troubleshoot your Wi-Fi, mobile network, or existing system settings. If the browser works but some desktop apps don’t appear in the connection logs, check whether those apps follow the system proxy. If you need to capture their traffic, read about TUN and Fake-IP.
4. Check Connection Logs and Routing
A connected status means only that the traffic entry point is active. To verify that rules are working, open the client’s Connections page and note the test start time. Choose two ordinary websites that should be reachable under your current configuration: one that should connect directly and one that should use a proxy policy group. Visit them in a browser that follows the system proxy or is covered by the VPN. Open new tabs to make the requests; if no new connections appear, check whether the browser is using cached content or reusing an existing connection. If needed, quit and reopen the browser before trying again. If the client shows only active requests on its Connections page, watch the logs while the page loads or look for the relevant entries on the Logs page.
Check the direct-connection sample first. Find its entry by time and destination domain, then confirm the matched rule and final policy. If the entry shows DIRECT, that request connected directly. Next, check the site that should use a proxy. Confirm it matched the expected policy group and that the group selected a node rather than routing the request back to a direct connection. A page may load images, scripts, and third-party services from different domains, and their traffic may be routed differently. Check the main site request first, then investigate any resource domains that behave unexpectedly. An IP lookup tells you which route that one request took; it doesn’t replace checking rules for individual connections.
When something goes wrong, change one thing at a time. If neither request appears in the logs, check whether the browser uses the system proxy, the mobile VPN is still connected, and the client shows only active connections. If a request is logged under the wrong group, check whether a rule earlier in the list matched first or whether the request fell through to the MATCH rule. Changing nodes won’t fix routing. If the rule and route are correct but a proxied site still errors, switch to another node in the same group and retry the same site, noting the error. If only domain resolution is failing while other destinations connect, check DNS Settings. Don’t change DNS, the mode, and the traffic-capture method all at once.
Once both sites load and the connection logs match your expectations, the initial setup is complete. Keep the current configuration, Rule mode, and verified route so you can repeat the same tests after changing subscriptions or networks. If you only need a temporary connection, turn off the system proxy or disconnect the VPN before quitting the client. Otherwise, the system may keep sending requests to a local process that’s no longer running. If your network doesn’t recover after you turn it off, check the system proxy or VPN settings, then troubleshoot the relevant issue in the FAQ.