Clash Logo Tutorial Center

Setup Clash in 5 Minutes – Visual Guide for All Platforms

From installation to intelligent split tunneling, we'll walk you through all Clash configurations. Supports Windows, macOS, Android, iOS, Linux, and Mihomo Core / CLI server deployment. Easy for beginners and advanced users alike.

Configure in 5 Minutes · 6 Platforms Covered · Includes CLI Guide · Continuously Updated

Complete Clash Setup in Three Steps

The core process is the same regardless of your platform. Platform-specific tutorials below provide more detailed visual instructions.

01

Download & Install Client

Choose the Clash GUI client for your operating system. For Windows, we recommend Clash Verge Rev or FlClash (both actively maintained and free); for macOS, Clash Verge Rev or FlClash (both support Apple Silicon and Intel); for Linux, Clash Verge Rev (.deb / .rpm / AUR) or FlClash (.deb, amd64); for Android, FlClash (arm64, Material Design 3), Clash Meta for Android (universal APK, all-arch), or Surfboard (lightweight Material You); for iOS, Stash or Shadowrocket; and for servers / NAS / routers / Docker without a GUI, use Mihomo Core (command-line binary).

Go to Download Page
02

Import Provider Subscription

Obtain a Clash-format subscription URL from your provider. Copy and paste it into the "Config" or "Subscription" page of the client, then click Update. The client will automatically parse nodes and split-tunneling rules—no manual YAML editing required.

03

Select Node & Enable Proxy

Choose a low-latency proxy node from the list and enable "System Proxy" (lightweight) or "TUN Mode" (global transparent proxy). Clash will automatically split traffic—high-speed local connections and proxied international access with seamless switching.

Windows Setup Guide

Using Clash Verge Rev as an Example – FlClash Steps Are Nearly Identical (For Windows 10 / 11)

Step 1

Download & Install a Windows Client

Go to the Download Page. Two actively maintained free clients are available for Windows:

FlClash

Flutter-based cross-platform client with Material Design 3 UI, covering Windows, macOS, Android, and Linux from a single codebase. Great for multi-device users.

  • Download FlClash-0.8.93-windows-amd64-setup.exe (x64 only; ARM64 users should choose Clash Verge Rev)
After downloading, double-click the installer and follow the prompts. The client will be added to the Start menu. Both clients share the same workflow for importing subscriptions, selecting nodes, and enabling the proxy—this tutorial uses Clash Verge Rev as the reference.
If Windows Defender displays a security warning, click "More info" → "Run anyway." This is normal for open-source software without Microsoft code signing.
Step 2

Import Provider Subscription

Open Clash Verge Rev. Click "Profiles" in the left navigation bar, then:

  1. Click "New" or the input box in the top right
  2. Paste the Clash subscription URL provided by your service
  3. Click "Import" or press Enter
  4. Wait for the download to complete; the configuration will appear in the list
  5. Click "Use this profile" on the right side of the configuration to activate it
We recommend enabling "Auto Update" (e.g., every 24 hours) to ensure your node list stays current and nodes don't expire.
Subscription URL Example
https://your-airport.com/api/v1/client/subscribe?token=xxxxxxxx&flag=clash
Step 3

View & Select Proxy Nodes

Click "Proxies" in the left navigation to see all available nodes and policy groups:

  • Click any policy group (e.g., "Proxy") and choose a low-latency node from the list
  • Click the lightning bolt icon on the right for a manual speed test to see real-time latency
  • The "Auto Select" policy will automatically switch to the best node based on latency—ideal for users who prefer zero manual management
Latency below 100ms indicates a high-quality node; 100–200ms is acceptable. If over 300ms, consider switching. "Timeout" means the node is unreachable.
Step 4

Enable System Proxy

Find the "System Proxy" switch in the top right of Clash Verge Rev and click to turn it on (it will turn blue).

  • System Proxy mode automatically configures Windows settings, taking effect immediately for browsers and other apps that support system proxies
  • By default, Clash listens on 127.0.0.1:7890 (HTTP) and 127.0.0.1:7891 (SOCKS5)
  • Verify: Visit google.com in your browser; if it opens, you're all set
Step 5

Enable TUN Mode (Global Transparent Proxy)

TUN mode proxies all traffic, including games and CLI tools that don't support system proxies. Recommended for advanced users:

  1. In the Clash Verge Rev Settings page, find and enable the "TUN Mode" switch
  2. A Windows UAC prompt will appear; click "Yes" to grant administrator privileges (required for the virtual network interface)
  3. Once TUN Mode is active, you can turn off the System Proxy switch; TUN will handle all traffic
TUN mode requires admin rights; for general browsing, System Proxy is sufficient. Remember to turn off TUN before exiting to avoid affecting other network applications.
FAQ

Windows Usage FAQ

Still can't access Google after enabling System Proxy?
Check: ① Profile is active; ② Node latency is normal (not timeout); ③ Proxy mode is set to "Rule," not "Direct." If the issue persists, try switching nodes or restarting Clash Verge Rev.
How do I make a specific app connect directly, bypassing the proxy?
Add a PROCESS-NAME,xxx.exe,DIRECT rule to the `rules` section of your YAML configuration, or manually add a direct rule in the client's proxy rules page.
How do I set Clash Verge Rev to start on boot?
In the Clash Verge Rev Settings page, enable "Start with Windows" and consider enabling "Start Minimized" to avoid pop-up interruptions.
I'm using Clash for Windows (CFW) – do I need to migrate?
Yes, we recommend migrating as soon as possible. The original author has announced that Clash for Windows is no longer maintained and the repository is archived—no security patches will be released. We recommend migrating to Clash Verge Rev (richer features, most active community) or FlClash (cross-platform, Material Design 3). Both are actively maintained and completely free. Visit the Download Page to get started.
How do I choose between Clash Verge Rev and FlClash?
Both embed the Clash Meta core, are actively maintained, and are completely free. Clash Verge Rev offers richer features (ARM64 support, config overrides, etc.) and broader community support—ideal for most users. FlClash has a cleaner UI and better cross-platform consistency (one client for Windows / macOS / Android / Linux)—ideal for multi-device users.

macOS Setup Guide

Supports Clash Verge Rev & FlClash – For macOS 11 Big Sur & above (Intel / Apple Silicon M-series)

Step 1

Download & Install a macOS Client

Go to the Download Page. Two actively maintained free clients are available for macOS:

FlClash

Flutter-based cross-platform client with Material Design 3 UI, covering Windows, macOS, Android, and Linux from a single codebase. Great for multi-device users.

  • M1 / M2 / M3 / M4 Macs: FlClash-0.8.93-macos-arm64.dmg
  • Intel Macs (Pre-2020): FlClash-0.8.93-macos-amd64.dmg
Unsure about your chip? Click the Apple menu in the top left → "About This Mac." "Apple M..." indicates Apple Silicon, while "Intel" indicates an Intel chip. After downloading, double-click the .dmg file and drag the app icon into the Applications folder. Both clients share the same workflow for importing subscriptions and enabling the proxy—this tutorial uses Clash Verge Rev as the reference.
Step 2

Bypass macOS Gatekeeper Restrictions

When first opening your client, macOS may say "Cannot be opened because the developer cannot be verified." This is normal for open-source apps (both Clash Verge Rev and FlClash are unsigned by Apple). There are two ways to resolve this:

Terminal Command Method

Open Terminal and run the command for your chosen client:

Terminal — Clash Verge Rev
sudo xattr -r -d com.apple.quarantine /Applications/ClashVergeRev.app
Terminal — FlClash
sudo xattr -r -d com.apple.quarantine /Applications/FlClash.app
Step 3

Import Provider Subscription

Open Clash Verge Rev. Click "Profiles" in the left navigation bar:

  1. Click the "New" button
  2. Paste your provider's subscription URL into the input box
  3. (Optional) Enter a name to help distinguish multiple subscriptions
  4. Click "Import" and wait for the file to download
  5. Click the profile to set it as active
Step 4

Select Node & Enable System Proxy

After selecting a node on the "Proxies" page, turn on the "System Proxy" switch in the top right:

  • macOS will prompt for network permissions; click "OK" to authorize
  • Clash Verge Rev will automatically configure macOS proxy settings, taking effect immediately for Safari, Chrome, and other browsers
  • A Clash status icon will appear in the menu bar for quick node switching
Verify: Visit google.com in your browser. If it loads, you're all set.
Step 5

Enable Enhanced Mode (TUN)

To proxy all traffic (including CLI tools and games that don't support system proxies), enable Enhanced Mode:

  1. Find "TUN Mode" or "Enhanced Mode" in Settings
  2. Enable it; you may be asked to install a system extension (confirm with your password)
  3. Allow the system extension in "Privacy & Security"
  4. Restart Clash Verge Rev for TUN mode to take effect
FAQ

macOS Usage FAQ

Why aren't Terminal commands using the proxy?
System proxies do not affect CLI tools. Solutions: ① Enable TUN mode; or ② Manually set environment variables in Terminal: export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890
What if the internet stops working after quitting Clash?
If the system proxy wasn't turned off before quitting, go to "System Settings → Network → Proxies" and manually disable HTTP and SOCKS5 proxies. Alternatively, restart Clash Verge Rev and exit normally.
How do I choose between Clash Verge Rev and FlClash on macOS?
Both embed the Clash Meta core, are actively maintained, completely free, and support Apple Silicon and Intel Macs. Clash Verge Rev offers richer features (config overrides, scripting, finer proxy controls) and broader community support—ideal for most users. FlClash has a cleaner UI (Material Design 3) and better cross-platform consistency (one client for Windows / macOS / Android / Linux)—ideal for multi-device users. Visit the Download Page to get either client.

Android Setup Guide

Compatible with FlClash, Clash Meta for Android (CMFA) and Surfboard – For Android 5.0 and above

Step 1

Download & Install Android Client APK

Go to the Download Page. Three recommended Android clients are available:

  • FlClash (Recommended): Download FlClash-0.8.93-android-arm64-v8a.apk — ideal for most modern phones (2016 and later), Material Design 3 UI, cross-platform consistency across Windows / macOS / Android / Linux
  • Clash Meta for Android / CMFA (Universal): Download the universal APK — compatible with ARM64, ARMv7, and x86_64. Best if you're unsure of your device's architecture
  • Surfboard (Lightweight): Download the universal APK — Material You design, fully compatible with Clash YAML subscriptions, ideal for users who prefer a lightweight experience
Before installing, you must allow "Install unknown apps" in "Settings → Security" (or "Settings → Apps"). The menu location varies by phone brand.
Step 2

Import Subscription Configuration

Open the app (FlClash / CMFA / Surfboard) and click "Profiles" in the bottom navigation:

  1. Click the "+" button in the top right and select "URL"
  2. Enter a name in the label field and paste your provider's link into the URL field
  3. Click the save icon in the top right, then click "Update" to download
  4. Once downloaded, click the dot next to the profile name to set it as active
Long-press a profile to set "Auto Update" (e.g., every 24 hours) to keep node info current.
Step 3

Select Node & Start Proxy

  1. Click "Proxies" in the bottom navigation to view and select nodes in the policy groups
  2. Click the speed test icon next to a node to check latency; choose a low-latency node
  3. Return to the home screen and click the large "Stopped" button (Play icon)
  4. A VPN connection authorization prompt will appear; click "OK"
  5. The status will change to "Running," and a VPN icon will appear in the notification bar
Step 4

Configure TUN Mode (Global Proxy)

FlClash and CMFA use the Android VPN API by default, achieving global proxy effects similar to TUN without extra config. For finer control:

  • Customize proxy mode (Rule/Global/Direct) in "Settings → Override"
  • We recommend enabling "Bypass private networks" to keep local traffic off the proxy
  • Set which apps use the proxy in "Settings → Access Control" (per-app filtering); Surfboard users can configure this in the "App Proxy" section
FAQ

Android Usage FAQ

Error: "App not installed" or parsing error?
Possible causes: ① The APK architecture doesn't match your device (try the universal version); ② The file is incomplete; ③ Your Android version is below 5.0.
Certain apps still can't connect after starting the proxy?
Check "Access Control" to ensure the app isn't set to direct connection. Also, verify that your subscription rules include the relevant domains; if necessary, test in "Global" mode.
How do I save battery while keeping the proxy running?
Set FlClash or CMFA to "Unrestricted" in your phone's battery optimization settings to prevent the system from killing the process; or manually toggle the VPN off when not in use.
How do I choose between FlClash, CMFA, and Surfboard on Android?
FlClash is the top recommendation — Material Design 3 UI, cross-platform consistency (one client for Windows / macOS / Android / Linux), ideal for multi-device users. Clash Meta for Android (CMFA) — universal APK covers all Android architectures; best when unsure of device specs. Surfboard — lightweight Material You design for users who only need basic subscription import and rule-based split tunneling. All three embed the Clash Meta core, are actively maintained, and completely free. Visit the Download Page to get any of them.
iOS

iOS Setup Guide

Using Stash as an Example (Requires non-mainland China Apple ID)

iOS proxy clients require a non-mainland China Apple ID (US, HK, etc.) for purchase. We recommend Stash (most comprehensive) or Shadowrocket (classic choice).
Step 1

Switch to a non-CN Apple ID & Purchase

  1. Open the App Store, click your avatar in the top right, scroll to the bottom, and click "Sign Out"
  2. Sign in with a US or HK Apple ID (you can borrow one or register your own)
  3. Search for "Stash" or "Shadowrocket," purchase, and download
  4. After downloading, you can switch back to your original Apple ID; the purchased app will remain
Do not trust third parties selling "US accounts"; you risk having your device locked. We recommend registering your own US Apple ID (select US as the region; no credit card required).
Step 2

Import Subscription in Stash

  1. Open Stash and click "Home" at the bottom
  2. Click "Add Configuration File" → "Download from URL"
  3. Paste your Clash subscription URL and click "Download"
  4. The profile will automatically become active once downloaded
  5. Select a node on the "Policy Groups" page or use Auto Select
Step 3

Import Subscription in Shadowrocket

  1. Open Shadowrocket and click the "+" icon in the top right
  2. For "Type," select "Subscribe"
  3. Paste your provider's subscription URL and add a label
  4. Click "Done" in the top right and wait for the nodes to load
  5. Choose a low-latency node from the list
Step 4

Start Proxy

After importing and selecting a node, toggle the switch next to "Not Connected" on the home screen:

  • iOS will prompt "Shadowrocket Would Like to Add VPN Configurations"; click "Allow" and confirm with Face ID or your passcode
  • The status will change to "Connected," and a VPN icon will appear in the status bar
  • Verify: Visit google.com in Safari to ensure it's working correctly
FAQ

iOS Usage FAQ

App Store still shows "Unsupported" after switching Apple IDs?
Ensure the account has fully switched: Sign out, sign in with the non-CN Apple ID, then check the avatar in the top right of the App Store home page to confirm before searching again.
Node count is 0 after importing the subscription?
The link might not be in Clash format. Contact your provider for a Clash or Surge compatible link, or try adding ?flag=clash to the end of the URL.
Google works, but YouTube won't load after connecting?
The node speed or connection quality may be poor. Try: ① Switching to a lower-latency node; ② Using manual speed tests to find the best node; ③ Testing in "Global" mode to see if it's a rule-related issue.
Linux

Linux Setup Guide

Supports Clash Verge Rev & FlClash – For Ubuntu / Debian / Fedora / Arch Linux / openSUSE

Step 1

Download & Install a Linux Client

Go to the Download Page. Two actively maintained free clients are available for Linux:

FlClash

Flutter-based cross-platform client with Material Design 3 UI, covering Windows, macOS, Android, and Linux. Great for multi-device users.

  • Ubuntu / Debian (amd64): Download FlClash-0.8.93-linux-amd64.deb
  • RPM-based distros (Fedora / RHEL) or ARM users: choose Clash Verge Rev
Ubuntu / Debian Installation
sudo apt install ./FlClash-0.8.93-linux-amd64.deb
After installation, launch the client from your app menu or terminal. Both clients share the same workflow for importing subscriptions, selecting nodes, and enabling the proxy—this tutorial uses Clash Verge Rev as the reference.
Step 2

Import Subscription Configuration

Operations are identical to the Windows and macOS versions:

  1. Open Clash Verge Rev (or FlClash) and go to the "Profiles" page
  2. Click "New" and paste your provider's subscription URL
  3. Click "Import" and wait for the download to complete
  4. Click the profile to set it as active
Step 3

Enable Proxy

Clash on Linux offers two proxy methods:

Terminal Environment Variable Method

~/.bashrc or ~/.zshrc
export http_proxy="http://127.0.0.1:7890"
export https_proxy="http://127.0.0.1:7890"
export all_proxy="socks5://127.0.0.1:7891"

You can also enable TUN Mode for global transparent proxying (requires root). Find the TUN option in settings and toggle it on.

FAQ

Linux Usage FAQ

Browser not using the proxy after enabling System Proxy?
GNOME users should ensure gnome-settings-daemon is installed; KDE users should check proxy settings in System Settings. Some distros require manual proxy configuration in network settings: host 127.0.0.1, port 7890.
How do I set Clash Verge Rev to start on boot?
Enable "Start on boot" in Clash Verge Rev settings, or manually create a ~/.config/autostart/clash-verge-rev.desktop autostart file pointing to the client executable path.
UI display issues on Wayland?
Tauri apps (Clash Verge Rev) may have display issues on Wayland. Try setting WAYLAND_DISPLAY="" before launching to force XWayland mode. FlClash, being Flutter-based, generally has better Wayland compatibility.
How do I choose between Clash Verge Rev and FlClash on Linux?
Both embed the Clash Meta core, are actively maintained, and are completely free. Clash Verge Rev is more feature-rich and supports .deb, .rpm, and AUR, covering all major distros—ideal for most Linux users. FlClash has a cleaner UI (Material Design 3) and better cross-platform consistency (one client for Windows / macOS / Android / Linux), but currently only offers an amd64 .deb package—Fedora / RPM-based distro or ARM users should choose Clash Verge Rev. Visit the Download Page to get either client.

Mihomo Core / CLI Tutorial

Command-line deployment guide for Linux servers, NAS, Docker containers, routers, and Windows headless environments

This tutorial is for advanced users who need to run Mihomo (Clash Meta) without a graphical interface on servers, NAS, routers, or containers. If you are a regular user, refer to the Windows, macOS, or Linux GUI client tutorials instead.
Step 1

Download the Mihomo Core Binary

Go to the Download Page → Core / CLI and choose the binary for your target OS and architecture:

  • Linux x86_64 server / VPS / NAS: Download mihomo-linux-amd64.gz (compressed) or mihomo-linux-amd64.deb (Debian/Ubuntu package — recommended)
  • Linux ARM64 (Raspberry Pi, ARM servers): Download mihomo-linux-arm64.gz from GitHub Releases
  • Windows x64: Download mihomo-windows-amd64.zip
Mihomo is the official name of the Clash Meta core (formerly clash-meta). It is the most feature-complete and actively maintained Clash engine, supporting Hysteria2, TUIC, VLESS, Reality, and all modern protocols.
Step 2

Prepare the Clash Config File

Mihomo is driven by a single YAML configuration file (config.yaml). There are two ways to get one:

Write a Minimal Config Manually

For building from scratch, here is a minimal working config.yaml:

~/.config/mihomo/config.yaml (minimal)
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
external-controller: 127.0.0.1:9090

dns:
  enable: true
  enhanced-mode: fake-ip
  nameserver:
    - 8.8.8.8
    - 1.1.1.1

proxies:
  - name: "my-node"
    type: vmess
    server: example.com
    port: 443
    uuid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    alterId: 0
    cipher: auto
    tls: true

proxy-groups:
  - name: "Proxy"
    type: select
    proxies: ["my-node", "DIRECT"]

rules:
  - MATCH,Proxy
The default config directory on Linux is ~/.config/mihomo/; on Windows it is %USERPROFILE%\.config\mihomo\. You can also specify a custom directory with the -d <dir> flag.
Step 3

Linux — Install via .deb and Register systemd Service (Recommended)

Installing via the .deb package on Debian / Ubuntu automatically registers a systemd service with startup and process supervision:

Ubuntu / Debian — Install .deb and start service
# Install the .deb package (auto-registers systemd service)
sudo apt install ./mihomo-linux-amd64.deb

# Place your config file in the service directory
sudo mkdir -p /etc/mihomo
sudo cp ~/.config/mihomo/config.yaml /etc/mihomo/config.yaml

# Enable and start the mihomo service
sudo systemctl enable --now mihomo

# Check status
systemctl status mihomo

# Follow logs in real time
journalctl -u mihomo -f
Common service management commands
# Stop the service
sudo systemctl stop mihomo

# Restart after config changes
sudo systemctl restart mihomo

# Disable autostart
sudo systemctl disable mihomo

# View last 100 log lines
journalctl -u mihomo -n 100
After .deb installation, the config directory is /etc/mihomo/ and the systemd unit file is at /etc/systemd/system/mihomo.service. Run sudo systemctl restart mihomo after any config change.
Step 4

Linux — Standalone Binary (.gz)

If you prefer not to use the .deb package, extract the compressed binary and run it directly:

Linux — Standalone binary deployment
# Extract and make executable
gunzip mihomo-linux-amd64.gz
chmod +x mihomo-linux-amd64
sudo mv mihomo-linux-amd64 /usr/local/bin/mihomo

# Create config directory
mkdir -p ~/.config/mihomo
# (Place config.yaml in ~/.config/mihomo/)

# Run in foreground (for debugging)
mihomo -d ~/.config/mihomo

# Run in background
nohup mihomo -d ~/.config/mihomo > ~/.config/mihomo/mihomo.log 2>&1 &
echo $! > ~/.config/mihomo/mihomo.pid

To create a systemd unit manually (when not using .deb):

/etc/systemd/system/mihomo.service
[Unit]
Description=Mihomo Clash Meta Service
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/mihomo -d /etc/mihomo
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target
Register and start the custom service
sudo systemctl daemon-reload
sudo systemctl enable --now mihomo
Step 5

Windows — Run Mihomo via PowerShell

On Windows, run Mihomo through PowerShell directly or register a Task Scheduler task for auto-start:

Windows PowerShell — Extract and run
# Extract the zip archive
Expand-Archive mihomo-windows-amd64.zip -DestinationPath .\mihomo

# Enter directory
cd .\mihomo

# Create config directory and place config.yaml there
New-Item -ItemType Directory -Force "$env:USERPROFILE\.config\mihomo"

# Run in foreground
.\mihomo.exe -d "$env:USERPROFILE\.config\mihomo"

Register as a Task Scheduler task for auto-start at login:

Windows PowerShell — Register autostart task (run as Admin)
$action = New-ScheduledTaskAction `
    -Execute "C:\path\to\mihomo.exe" `
    -Argument "-d `"$env:USERPROFILE\.config\mihomo`""
$trigger = New-ScheduledTaskTrigger -AtLogOn
$settings = New-ScheduledTaskSettingsSet -ExecutionTimeLimit 0
Register-ScheduledTask -TaskName "Mihomo" `
    -Action $action -Trigger $trigger `
    -Settings $settings -RunLevel Highest -Force
On Windows, TUN mode requires Mihomo to run with administrator privileges. Right-click PowerShell and select "Run as administrator", or set "Run Level: Highest Privileges" in Task Scheduler.
Step 6

Docker Container Deployment

Docker is the cleanest way to deploy Mihomo on a server — no manual dependency management required:

docker-compose.yml
services:
  mihomo:
    image: metacubex/mihomo:latest
    container_name: mihomo
    restart: unless-stopped
    network_mode: host          # Required for TUN mode
    cap_add:
      - NET_ADMIN               # Required for TUN mode
    devices:
      - /dev/net/tun:/dev/net/tun
    volumes:
      - ./config:/root/.config/mihomo  # Mount config directory
    environment:
      - TZ=UTC
Start and manage
# Place config.yaml in ./config/ then start
docker compose up -d

# Follow logs
docker compose logs -f mihomo

# Update image and restart
docker compose pull && docker compose up -d

# Stop and remove container
docker compose down
If TUN mode is not needed, remove cap_add, devices, and network_mode: host, and use standard port mapping instead (ports: - "7890:7890" - "9090:9090") for better container isolation.
Step 7

Using the Web Dashboard

Mihomo has a built-in RESTful API. Use an open-source web dashboard to monitor traffic, switch nodes, and view connections in real time—no command line needed.

First, make sure the external controller is enabled in your config:

config.yaml — Enable external controller
external-controller: 127.0.0.1:9090   # Change to 0.0.0.0:9090 for remote access
secret: "your-secret-key"              # API secret (always set one for remote access!)

# Optional: embed dashboard locally
external-ui: ui
external-ui-url: "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip"

After starting Mihomo, open any of the following dashboards in a browser and enter your controller address and secret:

If you set external-controller to 0.0.0.0:9090 for public access, always set a strong secret. Anyone with access to the port will be able to control your proxy nodes otherwise.
FAQ

Core / CLI Common Questions

Startup error: "level=fatal msg="Parse config error: ..."?
The config file has a formatting error. Common causes: ① YAML indentation must use spaces, not tabs; ② the subscription URL did not return Clash format (try appending ?flag=clash to the URL); ③ file encoding is not UTF-8. Run mihomo -t -d ~/.config/mihomo to validate the config without starting the service.
Port 7890 is already in use and startup fails?
Change mixed-port in config.yaml to another available port (e.g. 7892). Or find the conflicting process: on Linux run lsof -i :7890; on Windows run netstat -ano | findstr 7890, then terminate the conflict before restarting Mihomo.
How do I let other LAN devices use Mihomo as a proxy?
Set allow-lan: true in config.yaml and ensure the firewall allows the mixed-port on your LAN. Other devices configure their HTTP proxy to the Mihomo host's LAN IP (e.g. 192.168.1.100:7890). No need to install Clash on every device.
How do I auto-update the subscription?
Configure proxy-providers in config.yaml with the subscription URL and an interval in seconds — Mihomo will refresh the node list in the background automatically without restarting. Alternatively, use a cron job to re-download config.yaml and hot-reload via the API: curl -X PUT http://127.0.0.1:9090/configs?force=true -d '{"path":"/etc/mihomo/config.yaml"}'
Should I use the .gz binary or the .deb package?
On Debian / Ubuntu servers, use the .deb package — it auto-registers a systemd service for easier startup and log management. On other Linux distros (Fedora / Arch / Alpine) or when you need full manual control, use the .gz binary — extract and run directly, fully portable.

Advanced Clash Usage Tips

Master these tips to unlock powerful features and meet personalized proxy needs.

DNS Leak Prevention

Set enhanced-mode: fake-ip in the dns field of your YAML config, and configure DoH (https://8.8.8.8/dns-query) or DoT as a fallback DNS to prevent DNS queries from leaking your real IP.

config.yaml
dns:
  enable: true
  enhanced-mode: fake-ip
  nameserver:
    - 114.114.114.114
    - 223.5.5.5
  fallback:
    - https://8.8.8.8/dns-query
    - https://1.1.1.1/dns-query

Rule Provider Subscriptions

Use Rule Provider to subscribe to remote rule sets, keeping them automatically updated. Clash Meta supports multiple formats like DOMAIN and IPCIDR.

config.yaml
rule-providers:
  reject:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt"
    interval: 86400

Proxy Group Configuration

Implement advanced traffic scheduling with Proxy Groups: url-test for auto-selection of lowest latency nodes, fallback for auto-failover, and load-balance for multi-node load balancing.

config.yaml
proxy-groups:
  - name: "Auto"
    type: url-test
    proxies: [Node-HK, Node-US, Node-JP]
    url: http://www.gstatic.com/generate_204
    interval: 300

External Control Panel (Dashboard)

Clash Meta features a built-in RESTful API for real-time traffic monitoring and node management via a web panel. Visit d.metacubex.one and enter your controller address (default 127.0.0.1:9090) and secret.

Usage Tutorial FAQ

A compilation of the most common configuration and usage issues to help you troubleshoot quickly.

Possible causes: ① The link isn't in Clash format—contact your provider for a dedicated Clash URL; ② Local network cannot reach the subscription address—try updating with another proxy active; ③ Subscription expired; ④ The link contains special characters—ensure it was copied completely.
① Use speed tests to find the lowest latency node; ② Try nodes in different regions (Hong Kong usually has the lowest latency); ③ If available, prioritize new protocols like Hysteria2 or TUIC for better performance in weak networks; ④ Set proxy mode to "Rule" instead of "Global" to avoid routing local traffic; ⑤ Check if your plan has speed limits.
Visit ipaddress.com or ifconfig.me to see if the IP matches your proxy node's region. You can also monitor active connections in the Clash "Connections" tab.
Set allow-lan: true in your config and ensure your firewall allows access to port 7890. Other devices can then point their HTTP/HTTPS proxy settings to your device's local IP (e.g., 192.168.1.100:7890).
The Clash client itself does not upload any data, and its code is fully open-source. Traffic is routed through your chosen provider's nodes—providers may log connection data depending on their policy. The software itself is secure; please read and trust your provider's privacy policy.
Not downloaded yet?

Free Clash Download – Start Configuring Now

Supports Windows, macOS, Linux, Android, and iOS. Completely free and open-source. Complete your setup in 5 minutes with our guide and experience high-speed intelligent proxying.