kazeyukiro/3m-ui
About
Lightweight self-hosted web panel for Mihomo: listeners, users, subscriptions, SSL/ACME, Telegram, and multi-node cluster.
Web & AppsMeasured star growth
- in 24h
- +1
- in 7 days
- +8
- in 15 days
- +17
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
docs/readme/README.en.md
Original3m-ui
Languages / 语言: README · English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Español · Français · Deutsch · Русский · Português (Brasil) · Tiếng Việt · Bahasa Indonesia · ไทย · Türkçe · العربية · हिन्दी · Polski · Українська
Mihomo server-side web management panel
Stable first: installation and updates use formal releases only by default. Pre-releases require an explicit choice. Full install bundles and Docker images ship a pinned Mihomo core — see Installation, Upgrade and Recovery.
Lightweight and self-hosted, for managing Mihomo listeners, users, subscriptions and runtime status on Linux.
Documentation: https://3m-ui.top/docs/ · Website: https://3m-ui.top/
Features
| Area | Capabilities |
|---|---|
| Nodes | Protocol-registry-driven listeners: VLESS / VMess / Trojan / Shadowsocks / Hysteria2 / TUIC / AnyTLS / Snell / ShadowQUIC and more; Reality, TLS self-signed, one-click batch certificates, traffic multiplier, transport-layer field mutual-exclusion validation |
| Users | One-click create (random username/password/UUID, optionally bind all nodes), bind nodes, traffic quota, per-node metering (billed = actual × node multiplier), expiry, IP/subscription pull limits, start counting from first use, cycle renewal/reset, group tags, external subscription merge, batch operations, subscription Token |
| Subscriptions | UA auto-detection for Clash/Mihomo YAML, v2ray Base64 (?target=v2ray is always Base64), sing-box JSON; optional ?target=; HTML subscription page; TUIC/HY2 share links carrying SNI/allow_insecure and other client parameters |
| Config | Generate → validate → apply, kept separate; rolls back to the previous config.yaml on failure |
| Telegram | Alerts and management commands (requires Token + Chat ID) |
| Cluster | Register remote panels, health checks, sync node mirrors, merge subscriptions; select local nodes by name and push them to remotes (created disabled by default, name/port editable) |
| Security | JWT, forced password change on first login, TOTP two-factor, optional GitHub OAuth, web_path prefix, credential encryption, CORS |
| Ops | Core start/stop/update, Geo, panel SSL/ACME (including DNS-01 wildcards), backup, Cloudflare WARP one-click registration (WireGuard/MASQUE YAML) |
Supplementary notes (user limits / certificates / subscriptions)
- User limits: IP · subscription pulls
- Per-node traffic and multiplier
- Panel SSL / ACME (HTTP-01, DNS-01 wildcard)
- Batch apply node certificates
- Subscription formats and target
- Cluster nodes / push
- Routing (client subscription + server egress)
- Cloudflare WARP
Frontend: React + Ant Design + Lucide Icons (frontend/), embedded into a single Go binary after building.
Release artifacts: purely statically linked (CGO_ENABLED=0 + modernc SQLite) — no system libsqlite3 required, compatible with glibc / musl.
Full install bundles / Docker: linux/amd64 · arm64. The advanced standalone panel binary additionally supports armv7 · armv6 · 386 · riscv64 · loong64 · ppc64le · s390x, which require you to prepare a compatible kernel yourself.
Quick install
curl -fsSL https://raw.githubusercontent.com/kazeyukiro/3m-ui/main/scripts/install.sh | sudo sh
Full installation supports Linux amd64 / arm64 and installs the panel, the matching Mihomo core and the system service automatically. The first-time configuration and the admin password are both generated by the installer; existing configuration values are preserved. Other architectures can use the standalone binary with a self-prepared kernel — see detailed installation notes.
After installation:
Panel URL http://SERVER_IP:8080/
Default user admin
Initial pwd randomly generated at install and shown once; must be changed at first login
CLI command 3m-ui
Update:
# Recommended (once installed)
sudo 3m-ui update
# Pin a version: sudo 3m-ui update v1.0.6
# When migrating from an older install script, re-run the latest install command above first — configuration and accounts are preserved.
Uninstall:
sudo 3m-ui uninstall
Install with an AI prompt
Copy the prompt into ChatGPT / Claude / Cursor or a similar assistant, and tell it your system (e.g. Ubuntu 22.04) and whether you already have root SSH. The assistant should only help run the official script and must not rewrite it into commands from unknown sources. The full prompt and usage notes are in the AI install prompt doc.
No need to copy a long block of text by hand — load the plain-text prompt straight into your clipboard with curl and paste it:
curl -fsSL https://raw.githubusercontent.com/kazeyukiro/3m-ui/main/docs/ai-install-prompt.en.txt | pbcopy # macOS
curl -fsSL https://raw.githubusercontent.com/kazeyukiro/3m-ui/main/docs/ai-install-prompt.en.txt | xclip -sel clip # Linux X11
curl -fsSL https://raw.githubusercontent.com/kazeyukiro/3m-ui/main/docs/ai-install-prompt.en.txt | wl-copy # Linux Wayland
The prompt only ever guides you to the official one-liner below; every download verifies SHA256SUMS:
curl -fsSL https://raw.githubusercontent.com/kazeyukiro/3m-ui/main/scripts/install.sh | sudo sh
For the optional test / pre-release channel (not the default), see installation docs.
Docker install
On a Linux VPS, download docker-compose.yml from the release, then run in the same directory:
docker compose up -d
docker compose logs 3m-ui
The image is ghcr.io/kazeyukiro/3m-ui:latest, containing the panel and a pinned Mihomo core; latest tracks stable releases only. Configuration, random secrets and the admin account are initialized automatically, and the first password is printed only on the first start. Host networking is used by default — after adding nodes, open the TCP/UDP ports actually in use. A docker-compose.bridge.yml is also provided, along with version pinning, certificate configuration and persistent restore notes — see installation docs.
Build from source
# Frontend
cd frontend && npm install && npm run build
# Embed and compile the backend (amd64 example)
rm -rf backend/cmd/server/web/dist
cp -r frontend/dist backend/cmd/server/web/dist
cd backend
CGO_ENABLED=0 go build -tags sqlite_modernc -trimpath -ldflags='-s -w' -o ../3m-ui ./cmd/server
A compatible Mihomo binary must already be installed on the machine, and its path must be set in the configuration.
Configuration notes
Default data and configuration roughly live at:
| Path | Purpose |
|---|---|
/etc/3m-ui/config.yaml |
Panel configuration |
/var/lib/3m-ui/3m-ui.db |
SQLite |
/var/lib/3m-ui/listener-certs/ |
Node self-signed certificates (back these up together with the database) |
/var/lib/3m-ui/mihomo/ |
Mihomo working directory and config.yaml |
Use independent random values for the JWT / credential secrets (≥ 32 bytes); never use the examples from the documentation.
Custom panel port: 3m-ui config port <port>, or edit the configuration and restart the service.
New nodes get a random listening port in the 10000–60000 range by default (light sampling that avoids ports of already loaded nodes; reverse ranges supported), which you can edit manually or re-roll with the "random port" button.
Architecture
Browser (Ant Design + Lucide)
│ REST + JWT
▼
Gin API ── Telegram Bot
│
Service layer (users / listeners / sub / cluster / …)
│
SQLite · certstore · visual config
│
▼
Mihomo (-t 校验 → 应用 / 回滚)
Backup recommendations
Back up at least:
3m-ui.dblistener-certs/- The panel
config.yamland the Mihomo configuration directory
When only the binary is updated, certificates are hydrated from disk whenever possible; if the directory is lost they are re-self-signed and clients need to re-pull the subscription.
Acknowledgements
Special thanks to the following open-source projects and communities:
- Mihomo — core proxy engine and listener configuration model
- acme.sh — certificate issuance/deployment/renewal in the SSH menu
- clashmeta-inbound — listener configuration examples and protocol reference
- 3x-ui / s-ui — reference for panel interaction and operations ideas
- Gin — backend HTTP framework
- GORM — database ORM
- React — frontend foundation
- Ant Design — UI components
- Lucide — icons (
lucide-react, adapted viafrontend/src/icons.tsx) - AIsouler/MyClash — reference for Mihomo routing config and lite rule ideas
- echs-top/proxy — reference for Mihomo rules and proxy-group schemes
- YiXuanZX/rules — reference for rule sets and mihomo routing templates
- Zustand — frontend state management
- golang-jwt/jwt — JWT
- Go, Node.js and the entire open-source community
Contributors: Contributors
Star History
License
From commit 226c460 onward, this project is licensed under the GNU General Public License v3.0. Earlier commits and already published releases remain under the Eclipse Public License 2.0 (EPL-2.0), which cannot be revoked.
GNU General Public License v3.0
Third-party components: THIRD-PARTY-NOTICES.md.
Languages
Full translations (18 languages): see the language links at the top of this page, or open the main README.
Explore related projects
Loading…
