Deploy Clash for Linux (nelvko/clash-for-linux-install)
Overview
Use this skill to install, configure, and operate nelvko/clash-for-linux-install on Linux, including TUN mode, upstream LAN proxy-as-node, GeoIP data updates, and systemd autostart.
Workflow (Recommended)
- Install and choose a writable
CLASH_BASE_DIR. - Configure upstream LAN proxy node in
mixin.yamland add routing exclusions. - Merge mixin into
runtime.yaml. - Start the kernel and enable TUN (root required).
- Verify with logs and route checks.
- Enable systemd autostart (with
ExecStartPreauto-merge).
For copy-paste commands, see references/workflow.md.
For common failures and fixes, see references/troubleshooting.md.
Key Decisions
- Kernel: prefer
mihomounless compatibility demandsclash. - Upstream node type: use
socks5withudp: truewhen upstream is a mixed port. - TUN: must run as root; service should run under systemd as root for auto-route.
- IP-echo checks: if
api64.ipify.orgis set toDIRECT, it will show local IP even when proxy works.
Minimal Safe Defaults
- Keep
allow-lan: falseunless you need LAN access to the UI. - Add
route-exclude-addressfor upstream LAN proxy to avoid routing loops. - Enable GeoIP auto-update via
geox-urlif you rely on Geo rules.
References
- Step-by-step commands:
references/workflow.md - Troubleshooting:
references/troubleshooting.md