Configure High Availability¶
FreePBX HA pairs two UnifiedBX servers in active/passive failover. The standby box mirrors the active's database and config; on a heartbeat failure, standby takes over via shared VIP and DRBD-replicated storage. Significant cost (license, second host) — only worth it for installs where downtime is intolerable.
Complex setup
HA is the most complex feature on UnifiedBX. Misconfiguration can cause split-brain or data loss. Plan carefully, test failover before relying on it.
Before You Start¶
- Two UnifiedBX hosts of identical hardware/version.
- HA license from Sangoma (paid).
- Reliable network between them (LAN, low latency).
- Shared VIP planned (e.g.
10.0.0.50for the cluster, hosts at10.0.0.51and10.0.0.52). - A backup of the active host (in case migration goes wrong).
Steps¶
Install HA¶
- On the active host, System Admin → Modules → install FreePBX High Availability.
- License the module.
- Reboot.
Configure pairing¶
- System Admin → FreePBX HA.
- Fill in:
- Peer IP — IP of the standby host.
- VIP — the shared virtual IP.
- Replication Network — dedicated NIC if available; otherwise the management NIC.
- DRBD options — usually defaults.
- Submit.
- The active host pushes its config to the standby and starts replication.
On the standby host¶
- Install the HA module identically.
- The configuration replicates from the active.
- Standby boots in passive mode — services not exposed.
Test failover¶
- With both hosts up, on the active:
fwconsole ha failover. The active demotes; standby promotes. - Verify the VIP is now responding from the standby.
- Failback:
fwconsole ha failoveragain from the now-active (former standby).
Verify¶
fwconsole ha status
# Shows active/standby roles, replication state, last sync time.
drbdadm status
# DRBD replication health.
Common Issues¶
- Split-brain after network partition. Both hosts thought they were active and accepted writes. Recovery: pick one as authoritative, force-resync the other. Painful.
- VIP not responding after failover. Network gear (switch, router) caches MAC for the old host. Wait for ARP cache to expire (~5 minutes) or send a gratuitous ARP.
- Replication broken. DRBD shows
StandAlone. Resync manually withdrbdadm connect. - Failover takes minutes. SIP re-registrations take time. Phones may need to re-register manually if UDP keep-alives didn't see the VIP move quickly.
- License confusion. HA license is per-cluster (covers both hosts). Don't double-buy.