Set up failover with SwiftMesh

SwiftMesh lets a standby Mac mirror the primary node and promote itself if the primary disappears.

For servers where uptime matters, SwiftMesh pairs a second Mac with your main node. The standby keeps live state in sync and can take over the Discord gateway when the primary goes offline.

Roles

RoleWhat it doesWhen to use it
StandaloneRuns one local bot node.Default single-Mac install.
PrimaryOwns the Discord gateway and accepts mesh connections.Main production node.
Fail OverMirrors state and promotes if the Primary fails.Second Mac for uptime.
WorkerRuns offloaded jobs for older setups.Existing installs only.

Network rule

Standby nodes connect outbound to the Primary's mesh port, default 38787/TCP. If both Macs are on the same LAN, no router port forwarding is needed. If the Standby is off-LAN, forward the Primary's mesh port to the Primary Mac.

Pair with a Join Code

  1. Copy the code on the Primary:

    Open Settings > SwiftMesh and copy the SwiftMesh Join Code.

  2. Paste it on the Standby:

    Paste the Join Code during onboarding or under Settings > SwiftMesh.

  3. Let it connect:

    The Standby tests the embedded LAN and WAN addresses, saves the one that connects, and begins syncing.

Security and recovery

  • Treat Join Codes as bearer credentials.
  • Rotate the shared secret from the Primary if a Join Code leaks.
  • Use Run Handover Test to rehearse promotion and reclaim before an outage.
  • The public /live endpoint can act as both an uptime probe and a second failover signal.
Rehearse before you rely on it

Run a handover test while everything is healthy so you know the promotion and reclaim path works before a real outage.