Running mihomo in Docker: Up in One Command
Prefer not to touch the host system? MetaCubeX publishes an official image, metacubex/mihomo — one command brings the core up, which NAS users especially appreciate.
Minimal command
docker run -d --name mihomo --restart unless-stopped -v /etc/mihomo:/root/.config/mihomo -p 7890:7890 -p 9090:9090 metacubex/mihomo:latest — then drop your subscription yaml into /etc/mihomo as config.yaml.
Compose notes
- Pin latest or a specific tag; upgrade by pulling and recreating
- For TUN mode add cap_add: NET_ADMIN plus the /dev/net/tun device
- Port 9090 pairs with the metacubexd web dashboard for visual control
Upgrades and debugging
Upgrade = pull new image, recreate container; config lives in the mounted folder and survives. If startup fails, docker logs mihomo — nine times out of ten it is a config path or syntax issue.
Ready to get started?
Download Clash Verge Rev, FlClash or the mihomo core and be up in minutes.