-
-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
Run the installer as root on a supported Linux server:
bash <(curl -Ls https://raw.githubusercontent.com/RomanovCaesar/m-ui/main/install.sh)The installer detects the CPU architecture, downloads the matching m-ui Release archive, installs a Mihomo core, creates a service, and prints the access URL and credentials.
Caution
Save the generated credentials immediately. The installer prints the generated password only during installation or when you explicitly reset it.
When values are omitted, the installer generates:
- An unused five-digit panel port
- A 16-character mixed-case alphanumeric panel path
- A 14-character mixed-case alphanumeric username
- A 16-character mixed-case alphanumeric password
Every generated value contains at least one uppercase letter, one lowercase letter, and one digit.
bash <(curl -Ls https://raw.githubusercontent.com/RomanovCaesar/m-ui/main/install.sh) \
--port 34567 \
--path MyPanelA1b2C3d4 \
--username AdminUserA1234 \
--password 'ChangeThisA12345'Useful options:
| Option | Description |
|---|---|
--port PORT |
Panel port, from 1 to 65535. Without it, a free five-digit port is selected. |
--path PATH |
Panel URI path. URL-safe segments are accepted; / serves the panel at the root. |
--username NAME |
Administrator username. |
--password PASSWORD |
Administrator password. |
--listen-ip IP |
Bind address; default is 0.0.0.0 for the installer. |
--version TAG |
Install a specific m-ui Release, such as v0.1.0. |
--update |
Upgrade m-ui while preserving data and settings. |
--mihomo-version TAG |
Install a specific Mihomo Release. |
--update-mihomo |
Replace an existing Mihomo core. |
--skip-mihomo |
Do not download a Mihomo core. |
--no-ssl |
Skip the interactive TLS prompt. |
--ssl-domain DOMAIN |
Issue and configure a Let's Encrypt domain certificate. |
--ssl-ip ADDRESS |
Issue and configure a short-lived Let's Encrypt IPv4 certificate. |
--cert FILE --key FILE |
Configure an existing certificate pair. |
--ssl-menu |
Run TLS configuration against an existing installation. |
The default installation uses:
/usr/local/m-ui/m-ui m-ui executable
/usr/local/m-ui/mihomo Mihomo executable
/usr/local/m-ui/data state, YAML, geofiles, and caches
/usr/local/bin/m-ui management command
The installer installs /etc/systemd/system/m-ui.service on systemd systems or /etc/init.d/m-ui on OpenRC systems. Use MUI_INSTALL_DIR to choose another installation directory:
MUI_INSTALL_DIR=/opt/m-ui bash <(curl -Ls https://raw.githubusercontent.com/RomanovCaesar/m-ui/main/install.sh)The service and management script paths are rewritten automatically for a custom directory.
The first interactive installation offers:
- Let's Encrypt domain certificate using HTTP-01
- Let's Encrypt short-lived IPv4 certificate
- An existing certificate and private key
- Skip for now
Domain and IP certificates are managed through /root/.acme.sh and copied to /root/cert/. The panel is configured to use those paths and the acme.sh reload command restarts m-ui after renewal. HTTP-01 requires the challenge port to be reachable from the Internet; if the provider blocks port 80, use the Cloudflare DNS method described in Cloudflare WARP.
Update m-ui and keep all application data:
m-ui updateThe installer also supports an explicit version:
bash <(curl -Ls https://raw.githubusercontent.com/RomanovCaesar/m-ui/main/install.sh) \
--version v0.1.0 \
--updateExisting Mihomo binaries are preserved by default. Use m-ui update --update-mihomo when you explicitly want to replace the core.
Open only the ports you need:
- SSH
- The panel port
- The dedicated subscription port, if configured
- Each Mihomo inbound port
For example, with UFW:
sudo ufw allow 22/tcp
sudo ufw allow <panel-port>/tcp
sudo ufw allow <subscription-port>/tcp
sudo ufw allow <inbound-port>/tcp
sudo ufw allow <inbound-port>/udp
sudo ufw enableDo not expose the Mihomo external controller port to the public Internet.
Run the management command:
m-ui uninstallThe script stops and disables the service, removes the service definition and management symlink, and asks whether to delete /usr/local/m-ui and its data. Keep the data directory if you may reinstall or need a backup.