OpenClash brings the Clash/Mihomo routing engine to OpenWrt, turning a compatible router into a central proxy gateway for phones, computers, televisions, and other devices on your network. Instead of installing a separate client on every device, you can manage proxy nodes, DNS behavior, rules, and traffic policies from the router's LuCI web interface. This guide explains how to install OpenClash safely in 2026, prepare OpenWrt, choose the correct package, upload the required files, enable the LuCI plugin, and verify that the service is ready for basic use.

The installation itself is not difficult, but three details cause most failures: the router architecture must match the package architecture, the OpenClash package must match the installed OpenWrt release, and the router must have enough storage for the core, dashboard, profiles, and rule providers. Read the preparation section before uploading anything. A few minutes of checking can prevent a failed installation or an inaccessible LuCI interface.

What OpenClash Does on OpenWrt

OpenClash is a LuCI-based management interface and service integration for Clash-compatible cores. It does not replace OpenWrt's firewall or network stack. Instead, it coordinates the proxy core with OpenWrt components such as firewall rules, DNS forwarding, policy routing, and the web administration interface.

Once configured, OpenClash can accept traffic from selected devices or from the whole LAN. It can route traffic according to domain, IP range, rule provider, geographic database, or a manually selected proxy group. Depending on the selected mode, traffic may be redirected through a transparent proxy, intercepted by TUN, or sent directly according to your rules.

ComponentPurposeWhat You Need to Check
OpenWrtThe router operating systemRelease version, storage, and architecture
OpenClashLuCI interface and service scriptsPackage compatibility with your OpenWrt build
Clash/Mihomo coreProcesses proxy nodes and routing rulesCorrect binary architecture and executable permission
ProfileContains proxies, groups, DNS, and rulesValid YAML and supported core syntax
Firewall and DNSRedirects and resolves client trafficNo conflicts with another transparent proxy service

OpenClash is therefore more than a browser-based switch. It sits in the path between LAN clients and the internet. A bad configuration can affect every device connected to the router, so begin with a conservative setup: keep SSH or local access available, test with one client, and avoid changing several DNS and firewall services at the same time.

Prepare the OpenWrt Router

Before installing OpenClash, log in to LuCI and collect the information that determines which files you need. Open the router administration page, usually at an address such as http://192.168.1.1, and check the OpenWrt version under System → Software or System → Overview. You should also identify the target architecture and available storage.

The architecture is especially important. A package or core compiled for arm64 cannot run on a mipsel router, even if the download completes successfully. Common targets include x86_64, aarch64, armv7, mipsel, and mips64. The exact label used by OpenWrt may differ slightly from the label used by a release page, so compare the platform documentation carefully.

You can check the architecture over SSH with the following commands:

Check OpenWrt Version and Architecture
cat /etc/openwrt_release
uname -m
ubus call system board
df -h

Pay attention to the output of df -h. OpenClash needs space not only for its package, but also for the selected core, downloaded rule providers, GeoIP or geosite databases, cached profiles, logs, and temporary files created during updates. A router with very limited flash storage may install successfully and then fail when the first rule set is downloaded.

Do not guess the architecture: Installing the wrong OpenClash package or core can produce errors such as “Exec format error,” a service that immediately stops, or a LuCI page that cannot load correctly. Save a backup of your OpenWrt configuration before making changes.

It is also worth checking for existing services that may intercept traffic. If you already use PassWall, HomeProxy, SSR Plus, AdGuard Home, SmartDNS, another TUN service, or custom firewall scripts, record their current settings. Multiple services may compete for DNS port 53, redirect rules, TPROXY marks, or the same network interfaces. You do not necessarily need to uninstall them, but do not enable every transparent proxy feature simultaneously during the first test.

Finally, make sure the router has reliable internet access. The package can be uploaded manually, but OpenClash still needs network access to download a core, update databases, fetch remote profiles, or install a dashboard. If the router cannot reach the required download source, prepare the files on another computer and transfer them through LuCI or SSH.

Choose Compatible OpenClash Files

An OpenClash installation normally involves two separate items: the OpenClash LuCI package and a compatible Clash or Mihomo core. The package provides the interface, init scripts, firewall integration, and configuration management. The core performs the actual proxy processing. Installing only the package does not create a working proxy service because OpenClash still needs an executable core.

When selecting a release, compare the following values rather than choosing the newest file by name alone:

  • OpenWrt release: confirm whether the package targets your OpenWrt generation and package manager.
  • CPU architecture: match the package and core to the router's actual target.
  • LuCI compatibility: verify that the package is intended for your LuCI and OpenWrt environment.
  • Core support: use a maintained Mihomo-compatible core when the profile uses features such as TUN, rule providers, or newer proxy types.
  • File integrity: compare checksums when they are published, especially when transferring files through an unreliable connection.

Do not assume that a profile written for one core will behave identically on every other core. Basic fields such as proxies, proxy-groups, and rules are widely familiar, but newer features may use Mihomo-specific syntax. If OpenClash reports an unsupported field, start with a minimal profile and add advanced options only after the core passes validation.

ItemTypical File FormInstallation Location or Action
OpenClash package.ipkUpload in LuCI Software or install with opkg/apk, depending on the OpenWrt build
Mihomo coreCompressed archive or executableInstall through OpenClash or place in its core directory
Proxy profile.yaml or subscription URLImport under the OpenClash configuration page
Rule databaseDatabase or provider fileDownload after the core and profile work
DashboardWeb assets or built-in interfaceEnable from OpenClash or configure separately

Use official project release pages or a trusted distribution channel for downloads. Avoid random repackaged packages that include unknown startup scripts. If a package is not built for your OpenWrt version, forcing installation may overwrite dependencies or leave a partially working LuCI module. A clean, compatible package is usually faster than repairing a mismatched installation.

Install the OpenClash LuCI Package

There are two practical installation methods: LuCI upload and SSH installation. LuCI is easier for most users, while SSH provides clearer error messages and is useful when the web interface cannot install a local package.

Method One: Upload Through LuCI

  1. Open LuCI and go to System → Software.
  2. Refresh the package lists if the router has working internet access.
  3. Open the local package upload option and select the OpenClash .ipk file.
  4. Start the installation and wait until the package manager finishes processing dependencies.
  5. Reload LuCI or sign out and sign in again if the OpenClash menu does not appear immediately.
  6. Look for Services → OpenClash and open the page to confirm that the plugin is loaded.

Some newer OpenWrt builds use a different package management workflow, while older releases commonly use opkg. Follow the package instructions for your exact release. If LuCI reports a missing dependency, do not repeatedly click install. Copy the dependency name, check whether the package feed is configured correctly, and verify that the package was built for the same release branch.

Method Two: Install Through SSH

SSH is helpful when you want to inspect the output directly. Copy the package to a writable temporary directory, connect to the router, and install it using the package manager supported by your firmware:

Install a Local Package over SSH
scp openclash-package.ipk [email protected]:/tmp/
ssh [email protected]
opkg install /tmp/openclash-package.ipk

The command above is an example for an opkg-based installation. If your OpenWrt build uses another package manager, use the command documented for that build instead of forcing opkg. After installation, check the service and LuCI files:

Verify the Package and Service
logread | tail -n 50
/etc/init.d/openclash status
/etc/init.d/openclash enable

The exact status output can vary between OpenClash releases. The important result is that the init script exists, the service does not immediately exit with an architecture error, and LuCI can display the OpenClash page. Enabling the service at boot is optional during the first test; you may prefer to start it manually after importing a valid profile.

Keep recovery access available: During installation, leave one wired computer connected to the router if possible. If a transparent proxy or DNS change interrupts normal browsing, you can still reach LuCI or SSH and disable OpenClash without relying on the proxy path.

Install the Core and Import a Profile

After the LuCI page becomes available, the next task is installing a core. OpenClash usually provides a core management page where you can download or select a Mihomo-compatible binary. Choose the build that matches the router architecture. If you transferred the core manually, make sure it is placed in the directory expected by the OpenClash release and has executable permission.

Check a Manually Installed Core
chmod +x /path/to/mihomo
/path/to/mihomo -v

A successful version response confirms that the binary can execute on the router. It does not yet prove that the profile is valid. Import a subscription URL only if you trust the provider and the router can reach it. For a first test, a small local YAML file is often easier because you can inspect every field and eliminate remote conversion problems.

A minimal profile should contain a valid general section, at least one proxy, a proxy group, and rules. The following is a structural example; replace the placeholder server and credentials with values from your own provider:

Minimal Profile Structure
mixed-port: 7890
mode: rule
log-level: info

proxies:
  - name: example-node
    type: ss
    server: proxy.example.com
    port: 443
    cipher: chacha20-ietf-poly1305
    password: replace-with-your-password

proxy-groups:
  - name: PROXY
    type: select
    proxies:
      - example-node
      - DIRECT

rules:
  - DOMAIN-SUFFIX,example.com,PROXY
  - GEOIP,private,DIRECT
  - MATCH,PROXY

Use OpenClash's configuration validation function before starting the service. Common YAML mistakes include incorrect indentation, duplicate keys, a proxy group referring to a name that does not exist, an unsupported protocol field, and a subscription that contains characters or values rejected by the selected core.

Do not enable TUN, fake-IP DNS, custom firewall redirection, and several third-party DNS daemons at the same time during the first launch. Start with the simplest supported mode. Once a single client can browse successfully, add DNS enhancements or advanced routing one change at a time. This approach makes the source of a failure much easier to identify.

Enable OpenClash and Test Basic Routing

With the core installed and the profile validated, open the OpenClash service page in LuCI. Select the imported configuration, save it, and start OpenClash. Watch the service log during startup. A healthy launch normally includes messages indicating that the configuration was loaded, the controller or local ports were created, and the firewall or redirection components were applied.

  1. Start OpenClash with the imported profile selected.
  2. Wait for the service status to change to running.
  3. Confirm that the selected proxy group has an available node.
  4. Connect one test device to the LAN or Wi-Fi network.
  5. Open a normal website that should use a direct rule.
  6. Open a destination that should use the proxy rule.
  7. Inspect the OpenClash connections or logs to confirm the selected policy.

Testing one device first is safer than immediately applying the configuration to every LAN client. If the router's DNS or firewall settings are incorrect, a whole-network rollout can make troubleshooting confusing. Test both direct and proxied destinations, because a proxy node may work while direct DNS resolution is broken, or direct browsing may work while the proxy group has no usable node.

SymptomLikely CauseFirst Action
OpenClash menu is missingLuCI cache, incomplete package, or incompatible packageReload LuCI and inspect package installation logs
Core will not startWrong architecture, missing permission, or unsupported binaryRun the core version command and verify the platform
Service starts but no traffic is proxiedWrong mode, inactive group, or firewall redirection disabledCheck the selected profile, group, and service log
Websites fail after enabling DNSPort 53 conflict or invalid upstream DNSTemporarily return to the default DNS path and test again
Only some domains failRule order, fake-IP exception, or provider-specific DNS issueInspect the matched rule and add exceptions carefully
Router becomes slowInsufficient CPU/RAM, excessive logs, or large rule providersReduce rule sets and monitor resource usage

When the basic test succeeds, enable automatic startup if you want the service to return after a reboot. Then save a known-good copy of the profile and note which settings were changed. OpenClash updates, core updates, and OpenWrt upgrades can alter supported fields or firewall behavior, so a backup gives you a quick rollback path.

DNS, Firewall, and Maintenance Essentials

DNS deserves special attention because OpenClash may need to resolve domains before it can decide how to route them. If DNS requests bypass the intended resolver, domain rules may produce unexpected results. If two services listen on port 53, clients may receive intermittent failures or inconsistent answers. Before changing DNS mode, identify which service currently owns DNS and which address your clients use as their resolver.

For a first installation, keep the DNS design simple. Confirm that LAN clients use the router for DNS, verify that the selected upstream servers are reachable, and then test a direct domain and a proxied domain. Advanced fake-IP or TUN configurations can improve rule matching and reduce leaks, but they also require compatible exclusions for local domains, captive portals, games, printers, and device discovery.

Firewall integration should be equally deliberate. OpenClash may create rules for redirected TCP or UDP traffic, but custom firewall scripts can change the order or bypass those rules. Avoid manually adding duplicate redirect commands until you understand which rules OpenClash already creates. If a device must never use the proxy, use an explicit bypass policy or place it outside the managed client range rather than improvising additional NAT rules.

Maintenance is part of a reliable router setup:

  • Keep a backup of the OpenWrt configuration and a copy of the last working OpenClash profile.
  • Update the core only after checking compatibility with your current YAML syntax.
  • Review rule-provider size and update intervals so the router does not waste storage or bandwidth.
  • Monitor memory, CPU load, and storage after enabling TUN, large geosite databases, or many providers.
  • Rotate credentials if a profile URL or secret has been exposed.
  • Restrict external controller access to the LAN and set a strong secret when remote access is required.
  • Read the startup log after every major change instead of assuming that a saved configuration is valid.
Protect the controller: Never expose the OpenClash external controller directly to the public internet. A reachable controller without authentication can allow someone to switch nodes, read connection information, or modify routing behavior.

If performance is poor, first determine whether the limitation is the proxy connection or the router itself. Compare CPU usage with OpenClash stopped and running, check whether encrypted traffic saturates one CPU core, and disable unnecessary logging. Low-powered routers may handle ordinary rule routing well but struggle with TUN, high-speed encryption, large databases, or many simultaneous clients.

OpenClash Installation FAQ

Why does the package install but OpenClash does not appear in LuCI?

LuCI may need a refresh, a new login session, or a service restart. First reload the page and clear the browser cache. If the menu is still missing, inspect the package installation output and system log for missing dependencies or a package built for another OpenWrt release. Installing a different package at random usually makes the problem harder to diagnose.

Is installing the OpenClash package enough?

No. The package supplies the management interface and integration scripts, while a Clash-compatible core performs the actual proxy processing. Install a core that matches the router architecture, verify that it can execute, and then select it in OpenClash before starting the service.

Can every OpenWrt router run OpenClash?

Not every router is suitable. The device needs a compatible OpenWrt build, enough flash storage for installation and updates, and sufficient RAM and CPU capacity for the selected core and rule sets. Older low-memory devices may work with a small profile but fail with TUN, large databases, or several active providers.

What should I do if the internet stops working after enabling OpenClash?

Use a wired connection or SSH to stop the service, then restore the last known-good DNS and firewall settings. Review the startup log, check whether another service owns port 53, confirm that the proxy group contains a working node, and validate the YAML again. Re-enable features gradually after basic direct and proxied tests both succeed.

OpenClash is easiest to manage when the installation is treated as a staged network change rather than a single-click application install. Confirm the router architecture, use compatible files, validate a small profile, test one client, and only then expand the rule and DNS configuration. With that foundation in place, OpenWrt can provide consistent proxy control for the entire home network without requiring a separate client on every device.

Get Started

Take Full Control of Your Traffic with Clash

Available on Windows, macOS, Linux, Android, and iOS. Flexible rules, simple setup, ready to use.

Download Free View Setup Guide →