m-uising-box panel

One master, any number of nodes

m-ui is a multi-server sing-box panel by design, not by add-on. Every server runs the same binary; one is the master and does the accounting, the others only forward traffic.

Servers page showing a master and two nodes, online and synced

Roles

MasterNode
PanelFull: lines, users, upstreams, resellers, settingsRead-only view of what the master pushed; local settings, certificate, logs
Data planeEmbedded sing-box, serves its own linesEmbedded sing-box, serves the lines deployed to it
AccountingRolls up traffic from every server, judges quota, expiry and device limitsKeeps a monotonic counter per user, reports deltas
SubscriptionsServes them (nodes also can, with the same data)Same data, same formats

Pairing a node

  1. Install m-ui on the new server with the same one-line installer.
  2. In its panel, Settings → Run as node. The pairing card shows its API address and token.
  3. On the master, Servers → Add server, paste the address and token, give it a name and a domain or IP. Each node issues its own certificate (self-signed is fine).

That is the whole procedure. Within five seconds the node shows online · synced and starts serving the lines deployed to it.

Versions: keep the master and the nodes on the same version, and upgrade the nodes first, then the master. Once the master uses a newer feature, a node that is too old rejects the whole sync and keeps serving its last configuration (the Servers page marks it "Version differs from master") until it is upgraded.

What gets synced, and how

Every 5 seconds the master builds a snapshot — lines, upstreams, users with credentials, user↔line assignments, external nodes, resellers and the subscription settings — hashes it into a revision, and pushes it to every node concurrently. A node that already has that revision does nothing; one that does not applies it and reloads its data plane using the same three-tier reload as the master: user changes hot-swap the inbound user table, upstream changes hot-swap outbounds, only line changes restart sing-box (with rollback if the new config fails to start).

In the same round the master pulls each node's report: traffic since the last cursor, online source IPs per user, version, core status, certificate days left and renewal results, recent inbound connections. Nodes usually have no notifications of their own, so the master alerts for their failed renewals and expiring certificates. A slow or unreachable node only delays itself; the others sync on time.

Traffic, quota and device limits across servers

Subscriptions with many servers

A line deployed to N servers appears N times in the user's subscription, named line – server, with each server's own domain or IP. Clash, sing-box and universal-link clients then pick by latency or let the user choose. Adding a server to a line updates every subscription on the next refresh — no per-user edits. When you do want a user, a plan or a reseller grant to carry only one server's entry of a line, pick that entry instead of the whole line; the subscription then lists just that one.

A line deployed on several servers gets a latency-tested group named after the line in Clash and sing-box subscriptions (not when the user only has one server on that line), with node names and order unchanged. Line names always stay with your own lines: external nodes with the same name become "X 2" whether or not the group appears, so a client that picked the line group never lands on a third-party node of the same name.

When a node goes offline

Moving the master, and when the master dies

Two things: Set as master moves the master to another server as planned; master failover lets a standby take over when the master dies (the VPS crashes or gets deleted). Both are done on the master's panel, or over SSH with m-ui ha status | takeover | set-master | abandon | pause | resume | yield | reset.

Set as master

Master failover

Traffic ratio

Each server has a ratio (default 1). Traffic through a server with ratio 2 counts double against the user's quota — useful for premium routes or expensive bandwidth. A user's usage and the charts in the user details and on the landing page all show the scaled numbers, so they reconcile. A node's landing page only sees the traffic through that node, so it shows no chart.

Deeper: how the sync protocol is built · architecture overview