Skip to content

Maintenance

RomanovCaesar edited this page Sep 11, 2026 · 2 revisions

English | 简体中文

Management commands

The Linux installer places the management script at /usr/local/bin/m-ui.

m-ui                     Interactive menu
m-ui start               Start the service
m-ui stop                Stop the service
m-ui restart             Restart the service
m-ui status              Show service status
m-ui logs                Show recent logs
m-ui settings            Print CLI settings
m-ui configure           Interactively change panel port/path/credentials
m-ui set-port PORT       Change the panel port
m-ui update              Download and install the latest m-ui release
m-ui update-menu         Refresh the management script
m-ui ssl                 TLS certificate management menu
m-ui reset-credentials   Generate or set credentials
m-ui reset-path          Generate a new panel path
m-ui clear-logs          Clear journal/OpenRC log output
m-ui enable              Enable boot autostart
m-ui disable             Disable boot autostart
m-ui uninstall           Remove the service and optionally data
m-ui version             Print the embedded m-ui version

systemd

systemctl status m-ui
journalctl -u m-ui -e --no-pager
systemctl restart m-ui

The service uses /usr/local/m-ui as its working directory, starts /usr/local/m-ui/m-ui, restarts on failure, and runs with a restrictive umask.

OpenRC

rc-service m-ui status
rc-service m-ui restart
tail -n 200 /var/log/m-ui.log

Mihomo core lifecycle

The panel and Mihomo are separate processes. Use the dashboard or core actions to start, stop, or restart Mihomo. Restarting m-ui rebuilds the panel listeners but does not reload a changed core configuration.

When Mihomo fails to start:

  1. Open the panel logs.
  2. Click Test Current Config.
  3. Inspect the generated raw YAML.
  4. Check that the core path is executable and all ports are free.
  5. Restart Mihomo after correcting the error.

Backups

Use the dashboard backup action to download a ZIP containing panel state and generated configuration. The backup can contain client credentials, UUIDs, passwords, WARP account data, and certificate-related configuration. Store it as a secret.

Backups intentionally omit multi-control.json; see Multi-control before migrating a peer node.

To restore, choose a ZIP created by m-ui. The panel validates settings, inbounds, outbounds, routing rules, WARP data, subscription paths, and ports before replacing state. Restart m-ui and Mihomo after a successful restore.

Geofiles

The core maintenance dialog updates:

GeoIP.dat
GeoSite.dat
geoip.metadb

m-ui downloads official MetaCubeX sources with a jsDelivr fallback, stops Mihomo while replacing files, keeps backups, and starts the core again when it was previously running.

Updating the Mihomo core

Open the core version dialog, choose a stable release, and confirm. m-ui downloads the matching architecture asset, validates the executable, keeps a backup, updates the configured core path, and restarts Mihomo when appropriate.

The panel does not silently update to prerelease versions. Test a new core with Test Current Config and inspect logs after switching.

Disk usage and logs

Panel logs are held in memory up to the configured Log Buffer Size. Mihomo stdout/stderr is handled by the service manager. If disk usage grows:

du -sh /usr/local/m-ui/data
journalctl --disk-usage

Rotate or vacuum systemd journals according to your host policy. m-ui clear-logs clears journal retention or truncates the OpenRC log file; it does not delete state, YAML, geofiles, or backups.

Safe update procedure

  1. Download a backup from the panel.
  2. Record the current m-ui and Mihomo versions.
  3. Run m-ui update.
  4. Check m-ui status and the panel logs.
  5. Test and restart Mihomo.
  6. Verify one normal subscription and one Clash subscription.
  7. For a peer network, repeat on all panels before using new sync features.

Clone this wiki locally