Documentation / First-Time Setup
Clash Setup Guide
From importing a subscription to verifying your connection, a first-time setup comes down to four checks: which profile is active, how its rules handle traffic, whether your apps are connected, and which exit each request uses.
Import and Enable a Subscription Profile
Open the client’s “Configuration,” “Subscription,” or “Profiles” page. Look for “New,” “Add,” or a plus button, then choose “Import from URL.” Copy the Clash-compatible subscription URL from your provider and paste the full link into the address field. Some desktop clients put the URL field right on the Profiles page; paste the link and click “Import.” If prompted for a name, choose something easy to recognize, such as “Personal devices,” so you can tell which profile changed when it updates.
After a successful import, a new entry appears in the list. Some clients also show when it was last updated. Click the entry or choose “Enable” or “Use this profile.” Some clients enable imported profiles automatically, but check which one is marked as active. Then open the Proxy page and confirm that the profile’s policy groups or nodes have loaded. A subscription in the list doesn’t mean the core is using it. If you import profiles on both a computer and a phone, check the active profile on each device separately; one device’s status tells you nothing about the other.
If your provider only gave you a local YAML file, choose “Import from file” on the same page and check that the profile is enabled afterward. A file import saves a snapshot and won’t update when your provider changes the remote subscription. To receive updates, use the subscription URL from your provider. A single-node sharing link is different from a full subscription; whether you can import it directly depends on the client’s supported formats.
If the import fails, check whether the client reports a timeout, an authorization error, or an invalid format. For a timeout, check your network and try again. For an authorization error, confirm with your provider that the link hasn’t expired. For a format error, make sure you copied the subscription URL—not a management page—and included all query parameters. Subscription URLs may contain credentials, so hide the full link in screenshots or support requests. For now, just confirm that the profile loads; there’s no need to change ports or DNS.
Choose a Proxy Mode and Exit
Open the Proxy page and find “Rule,” “Global,” and “Direct” in the mode bar. Some clients put the same options on the home screen or in Settings. For a first connection, start with “Rule”: requests that reach the client are checked against the active rules, which can send them direct, route them through a proxy group, or reject them. The selected mode will be highlighted. That confirms how traffic will be handled, not that app traffic has reached the client.
The mode determines how a policy is chosen; the policy group determines which exit to use. On the Proxy page, find the groups in your profile. A common proxy group might be named “Proxy Selection.” If it’s a manual selection group, expand it, choose a node from your provider, and check that it’s marked as selected. If the group automatically selects a node by latency or failover, just make sure it has an available member—there’s no need to switch it to manual selection. Group names come from the profile, so different names on two devices don’t necessarily mean they work differently.
Rule-Based Routing: Check the Match Before Changing Rules
Rules are processed in order, and the first match usually determines the result. For example, DOMAIN-SUFFIX,example.com,DIRECT sends the domain and its subdomains through the direct policy. A final MATCH,PROXY sends requests that didn’t match earlier rules to the policy named PROXY, if the profile actually defines one. If a site has a specific rule but uses the wrong exit, check whether a broader rule above it matched first. Don’t keep appending duplicates of the same rule at the end.
“Global” mode can help you quickly check whether a problem comes from your rules: select an exit for the global policy, retry the same request, and compare the results. It only affects traffic that has already reached the client; it doesn’t replace the connection setup in the next step. “Direct” mode lets you compare results without a proxy exit, but it doesn’t turn off the system proxy or VPN. Switch back to Rule mode when you’re done testing.
Connect the System Proxy or VPN
Find “System Proxy” on the desktop client’s home screen, in Settings, or in the system tray menu, then turn it on. Some clients also have a separate “Start” button. Make sure the core is running before enabling the system proxy; otherwise, apps may send requests to a local proxy that isn’t running. For your first browser test, use a browser that follows system proxy settings and temporarily disable any extension that manages proxies. On Linux desktops where the client can’t update system proxy settings, you can enter the local HTTP proxy address and port shown in the client in an app that supports manual proxy settings. Don’t assume someone else’s port number is the default.
In the Android or iOS client, return to the home screen and tap “Start,” “Connect,” or the power icon. The first time you connect, the system will usually ask to create or add a VPN configuration. Make sure the prompt came from the client you just opened, then approve it. Return to the client and check that the status says “Connected.” If needed, check the active connection in your system’s VPN settings. An existing VPN or a device management policy may prevent a new connection from starting. Check what the existing connection is for, and don’t remove a configuration provided by your organization.
If a desktop browser works but another app ignores the system proxy, check whether your client supports TUN. TUN uses a virtual network interface to take over traffic routed to it and may require system permission. When troubleshooting, change one connection method at a time: note the system proxy status, enable TUN as prompted by the client, and test the same app again. If you change both at once, it’s hard to tell which one made the difference.
Launch at Startup: Set It Up After Testing
“Launch at startup” usually means the client opens automatically when you sign in. “Set as system proxy on launch” and “Restore the previous connection on launch” are separate options. Verify your connection in the next step before enabling them. After changing these settings, sign out and back in, then check that the client is running, the right profile is active, and traffic is connected. If you only see a system tray icon but no connection entries, check the auto-connect settings; there’s no need to import the subscription again.
Verify the Connection
Stay in Rule mode, open the client’s “Connections” or “Logs” page, and make a new request in your usual browser. Visit one site that should go direct and another that should use a proxy under your current profile. Watch the log as you make each request, since short-lived connections can disappear quickly. If a page loads from cache, try one you haven’t opened yet. Find the matching domain or destination address, then note the matched rule, policy group, and actual exit. If the profile allows some requests to go direct, seeing DIRECT in the connection list is expected.
If a page loads but you can’t find the request in the log, don’t count that as a successful proxy test yet. Check whether the app follows the system proxy, whether the current client still owns the system VPN connection, and whether the app is excluded from traffic capture. If the request appears but matched the wrong rule, revisit rule-based routing and check the rule order and policy group. If the exit is right but the request still times out, choose another available node in the same policy group and retry. This helps distinguish an exit problem from a local connection issue.
Even if the client reports a successful node test, make a real request too. A test usually only confirms that the node can reach a specific test address; it doesn’t prove that a particular website will use that node. If your browser shows a certificate warning, don’t bypass it or enter a username or password. Check your system clock, then compare what happens with the client on and off to help narrow down whether the issue is with the site’s certificate, your device, or the connection path. For details on name resolution and protocol compatibility, see the relevant section of the Protocol and Core Reference.
GeoIP Updates: Check Only When Rules Misbehave
If your profile uses GEOIP rules and IP-based routing doesn’t match the expected region, look in the client’s settings for “Geo data,” “Geo database,” or an option to update core resources. Update the data using a method supported by your client, reload the profile as prompted, and compare the match for the same request. A GeoIP update refreshes address classification data; it won’t update your subscription or fix apps that aren’t routed through the proxy. If there’s no update option, first check which data format your core and profile use. Don’t swap database files in different formats.