LinuxWindows

Where Does Mihomo Store Its Config?

Mihomo reads a single config.yaml for ports, proxies, groups, and rules. The core defaults to the working dir; services pin /etc/mihomo.

Last updated

Mihomo drives everything from config.yaml: listen ports, mode, DNS (often fake-ip), proxies, proxy-groups, rules, and the external controller that dashboards attach to. Most users never write it by hand; a subscription link generates it, and GUI clients wrap it with profiles and rule sets.

The path depends on how you run it. The bare core reads ./config.yaml from the working directory unless -d points elsewhere. The documented systemd layout copies the binary to /usr/local/bin and the config to /etc/mihomo with ExecStart pointing at that directory. Reload with SIGHUP (systemctl reload) after edits instead of restarting the tunnel.

Where Mihomo stores this, by platform

Linux
/etc/mihomo/config.yaml (service)

Ports, DNS, proxies, groups, rules, controller. Managed by subscription in most setups; hand edits go here. Validate with mihomo -t -f before reload. Rule provider caches sit beside it.

Windows
config.yaml (working dir)

Same single-file layout beside the executable when running the core directly. GUI clients keep profiles in their own app data; this path is the core default, not the GUI store.

Frequently asked questions

how do i migrate mihomo to a new machine

Copy config.yaml to the new machine and run mihomo -t -f config.yaml before starting. Test mode parses without touching the network and names the failing line. Subscription managed files refresh themselves; hand edits need reapplying.

is config always in etc mihomo

Only the systemd service does. The bare core reads config.yaml from wherever you start it (override with -d). GUI clients (Clash Verge, Mihomo Party) keep their own profiles in app data and generate what the core reads.

Notice an outdated path? Let us know.