Linux: use the kernel directly
There is no graphical client you must install. The kernel runs on its own: install a deb or rpm, or drop a static binary next to a systemd unit.
mihomo v1.19.34 · 2026-11-11 · Versions checked 2026-12-01
Source GitHub Releases · v1.19.34 · Versions checked
Builds cover amd64 and arm64, with v1/v2/v3 microarchitecture variants. Servers are safest on v1.
Three ways to install
| Method | Fits | Watch out |
|---|---|---|
| deb / rpm | Debian, Ubuntu, Fedora and friends | Installs to /usr/bin/mihomo, but you still supply the config |
| Static tarball | Custom images or unusual architectures | Ungzip, chmod, write your own unit |
| Container | Routers, NAS, isolated environments | Needs host networking, or TUN and port mapping break |
Manual deployment, five steps
-
Download the build for your architecture
The button above is amd64 v3. Older CPUs that lack v3 instructions need v1.
-
Unpack into /usr/local/bin
gunzip mihomo-linux-amd64-v3-v*.gz && chmod +x mihomo && sudo mv mihomo /usr/local/bin/ -
Place the config in /etc/mihomo
sudo mkdir -p /etc/mihomo && sudo cp config.yaml /etc/mihomo/ -
Test in the foreground first
mihomo -t -f /etc/mihomo/config.yamlvalidates only. Drop-tto run it and watch the log. -
Write a systemd unit and enable it
Use
Restart=on-failure, set the working directory to/etc/mihomo, and let journald collect the log sojournalctl -u mihomo -fworks.
[Unit]
Description=mihomo daemon
After=network-online.target
[Service]
Type=simple
WorkingDirectory=/etc/mihomo
ExecStart=/usr/local/bin/mihomo -d /etc/mihomo
Restart=on-failure
LimitNOFILE=1000000
[Install]
WantedBy=multi-user.targetTUN and permissions
TUN mode creates a network device, which an unprivileged process cannot do. Either grant the capability or run as root; the capability is the safer option:
sudo setcap cap_net_admin,cap_net_raw+ep /usr/local/bin/mihomoNever expose external-controller publicly
external-controller: 0.0.0.0:9090 publishes the control API to the whole network. Use an SSH tunnel for remote access, and set secret regardless.
Questions
- How do I check the binary runs?
mihomo -vprints version and build info.Illegal instructionmeans the CPU lacks that microarchitecture variant; drop to v1 or v2.- How do I find what holds port 7890?
ss -lntp | grep 7890. Usual suspects: an old clash service, another client, Docker port mapping, a dev server.- No GUI means no settings?
- Edit the YAML, validate with
mihomo -t -f, thensystemctl reload-or-restart mihomo. Clients that support remote management can also attach over the external controller API.