[软件服务] 新的 Docker Compose For Clash Mihomo

date
Feb 23, 2026
slug
newsoftware-clash-mihomo-docker-composer
status
Published
summary
新软件-
tags
software
service
type
Post
URL
 
 

Summary

dashboard 访问 - 浏览器打开 http://NAS_IP:15080
NAS的局域网IP(不要填 localhost 或 127.0.0.1,因为是从你浏览器端连接的)。
* 端口 (Port) 填入:15090* 密码 (Secret) 填入你配置文件里写的那个。 
lvc爸

宿主机访问端口	容器内部端口	对应 _diy.yaml 配置项
混合端口 (Mixed)	15007	7890	mixed-port: 7890
Web 面板	        15080	80	N/A
API 控制端口	    15090	19090	external-controller: :19090


既然你加入了 npm_nginx_proxy_manager-network,你可以在 Nginx Proxy Manager 里直接通过 http://mihomo:9090 和 http://mihomo-dashboard:80 来反代这两个服务,非常方便。
PM 反代(可选):
如果你想用域名访问,在 NPM 里:
clash.yourdomain.com -> http://mihomo-dashboard:80
api.yourdomain.com -> http://mihomo:19090 (记得开启 Websockets)


export http_proxy="http://NAS_IP:15007" https_proxy=$http_proxy socks5_proxy=$http_proxy; wget www.google.com

安装过程

# 确认工作路径在 /xxx/mihomo_clash 下 - docker-compose.yaml is here

services:
  mihomo:
    image: metacubex/mihomo:latest
    container_name: mihomo
    volumes:
      # 使用相对路径 ./ 指向项目根目录
      - ./clash:/root/.config/mihomo
      - ./clash/_diy.yaml:/root/.config/mihomo/config.yaml:rw
    ports:
      # 你精简后的端口设置
      - "15007:7890"    # Mixed Port - 主力就用这个 (HTTP/SOCKS5 二合一)
      - "15090:19090"   # 外部控制 API 端口 (用于连接面板)
    restart: always

  dashboard:
    image: ghcr.io/metacubex/metacubexd
    container_name: mihomo-dashboard
    ports:
      - "15080:80"      # 访问 http://NAS_IP:15080 即可进入面板
    restart: always

networks:
  default:
    name: npm_nginx_proxy_manager-network
    external: true

截图

notion image
notion image

Raw

 

© Ying Bun 2021 - 2026