m-uising-box panel

Guide · 2026-10-23

Backup and server migration with m-ui

Because m-ui keeps everything in one SQLite file and one certificate directory, a backup is one zip and a migration is "restore that zip somewhere else". This is how to do both; when subscriptions use a domain, no user has to re-import anything.

What a backup contains

It does not contain the m-ui binary (the installer provides that) or anything outside /etc/m-ui. A backup is therefore small — usually a few megabytes — and portable between architectures.

Taking one

Backup → Download gives you the zip now. Scheduled backups run daily at the hour you choose in the panel's time zone, keep a rotation, and can be pushed to Telegram so a copy lives off the server. The file is created with owner-only permissions; it contains every user's credentials, so treat it accordingly.

Restoring

Two ways, same result:

  1. From the panel: Backup → Restore, upload the zip. m-ui inspects it, shows what is inside, then swaps the database and certificates in and restarts itself.
  2. From the installer: a fresh server does not have the script yet, so upload the backup zip and run the one-line installer with --restore; it installs m-ui and restores in one go — useful when the old panel is already gone:
    bash <(curl -fsSL https://raw.githubusercontent.com/Maoyangui/m-ui/main/deploy/install.sh) --restore /root/m-ui-backup.zip
    (use your own backup path; as a non-root user run curl -fsSL https://raw.githubusercontent.com/Maoyangui/m-ui/main/deploy/install.sh | sudo bash -s -- --restore /root/m-ui-backup.zip.)

Either way the restore is atomic: the old database is replaced only after the new one has been validated and copied into place.

Migrating to a new server

The order matters, because subscriptions point at a name or address and clients cache it:

  1. Install m-ui on the new server and restore the latest backup. Ports, panel path and credentials are now identical to the old server, and so are subscription addresses if they use a domain.
  2. Open the new panel and check the dashboard: data plane running, lines listening, users present. The migration wizard on the Backup page walks through exactly this.
  3. If you use a domain, point it at the new server. The wizard can query the major public resolvers so you can watch the change propagate. With an IP there is no seamless switch: the subscription address contains the old server's IP, so a client refresh still goes to the old server (or fails once it is off) and never learns the new address. Send every user the new subscription address (with the new IP) to re-import; to make future moves invisible to users, give the panel and subscriptions a domain first.
  4. Nodes need nothing: the master contacts them, not the other way round, and their tokens travelled with the database.
  5. Turn the old server off once traffic has moved. With a domain nothing on clients changed: same credentials, same ports, same subscription link.

Things that are easy to forget

Coming from a legacy panel instead

That is a different tool: the importer reads a compatible legacy panel database and maps inbounds to lines, outbounds to upstreams and clients to users, keeping ports and credentials. Run the installer with --import old.db or use Users → Import for users only; the report tells you what was mapped and what was skipped.