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

Download deb (amd64 v3) · 21.6 MB

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

MethodFitsWatch out
deb / rpmDebian, Ubuntu, Fedora and friendsInstalls to /usr/bin/mihomo, but you still supply the config
Static tarballCustom images or unusual architecturesUngzip, chmod, write your own unit
ContainerRouters, NAS, isolated environmentsNeeds host networking, or TUN and port mapping break

Manual deployment, five steps

  1. Download the build for your architecture

    The button above is amd64 v3. Older CPUs that lack v3 instructions need v1.

  2. Unpack into /usr/local/bin

    gunzip mihomo-linux-amd64-v3-v*.gz && chmod +x mihomo && sudo mv mihomo /usr/local/bin/

  3. Place the config in /etc/mihomo

    sudo mkdir -p /etc/mihomo && sudo cp config.yaml /etc/mihomo/

  4. Test in the foreground first

    mihomo -t -f /etc/mihomo/config.yaml validates only. Drop -t to run it and watch the log.

  5. Write a systemd unit and enable it

    Use Restart=on-failure, set the working directory to /etc/mihomo, and let journald collect the log so journalctl -u mihomo -f works.

/etc/systemd/system/mihomo.service
[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.target

TUN 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/mihomo

Never 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 -v prints version and build info. Illegal instruction means 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, then systemctl reload-or-restart mihomo. Clients that support remote management can also attach over the external controller API.