Configuring Failover with 3CX

Introduction

The Failover feature in 3CX allows you to create a standby replica of your PBX. In the event that your PBX fails, your replica PBX becomes active minimizing downtime and data loss. An AI Edition license key is required. Failover is not supported for Hosted by 3CX systems.

How it works

3CX uses an active - passive approach using built-in configuration replication with a maximum offset of 24h. The active host processes calls and presence information, while the passive host monitors the active host. In case of a failure of the active host (independent of application, OS or hardware failure), the passive host stops its monitoring role and takes over as the active host. The passive host’s configuration determines in which state the active host is declared failed in order to initiate the failover switch.

3CX Failover example

Pre-requisites

Before configuring or enabling 3CX failover on your 2 servers, the 3CX installations need to meet these requirements.

  • Two (2) 3CX PBXs, each with its own public IP, both installed with identical settings, including FQDN, SSL Certificate, SIP, Tunnel, web server ports and operating system.
  • When configuring 3CX after the installation, you need to select 3CX FQDN. You may use a custom FQDN but configuration is more complex and you must edit the sample scripts yourself and support these yourself.
  • When provisioning phones in a Local Lan/VPN environment, the Select Interface field must be set to the FQDN and NOT the IP Address.
  • Split DNS is required as for all 3CX deployments.

Step 1: Configuring the Active Server

  • First go to Admin > System > Storage and set up your remote storage (e.g. Google Storage) or specify other backup options, e.g. SMB or SFTP.

  • Scroll down and configure your backup schedule and properties (Gear icon next to Schedule).
  • A daily off-hours backup is recommended, e.g. start backup at 1:00 AM and upload “3CXScheduledBackup.zip” (latest backup filename) to Google storage.

  • Go to Admin > Backup and select Failover.

  • Set the Enable Failover checkbox and select Active. Press OK to save.

Step 2: Configuring the Passive Server (#2)

  • Switch to your passive server and go to Admin > Backup.
  • Click the Failover button, set the Enable Failover checkbox and select Passive.
  • Enter the IP address of the active server (#1), e.g.
    1.1.1.1
    Configure whether failover occurs if one or all tests fail.Select which services you want to monitor: SIP Server, Web Server and/or Tunnel Server.Select the interval for the heartbeat checks to be made (default 30 seconds).Specify the location of your failover scripts:you can find the Windows scripts here.you can find the Linux scripts here.Set an interval and time for the automatic restores; this should  be some minutes after each scheduled backup on the active (#1) server.Press OK to save the configuration and start monitoring. When the active server (#1)
     fails, the passive detects this and takes over. With the backup already restored, the failover action triggers the 3CX DNS Servers to update the FQDN to the IP address of the new active server (#2). It is important that the previously active server (#1) is shutdown to avoid conflict with the server that just took over.

    Important Notes

    • Gateways in a failover scenario are only supported when local to your PBX system, i.e. reachable via LAN.
    • For scenarios where the Active/Primary and Passive/Failover servers are behind different public IP addresses, when you first complete the installation of the Passive server and you run through the installation options, your public FQDN will be rewritten to the public IP of the Failover server. To re-write your external FQDN to resolve back to the public IP of the Active server, you need to restart the System service.
    • If you are configuring your failover on Microsoft Windows, then the appropriate rights must be assigned to this service running the scripts, being 3CX Event Notification Manager. The minimum account level which the service can be assigned to, must have local administrative rights like the "Local System" user and, if running
      dnscmd
      also DNS management administrator privileges. For this purpose, it is recommended to create a dedicated Active Directory user with suitable administrative rights and the password set not to expire.
    • For Failover use with custom FQDN and LAN-to-LAN or Cloud-to-Cloud scenarios, to update your DNS and FQDNs when failover occurs, you need to use advanced scripting and services like Active Directory to run shell scripts with administrative privileges.
    • If using a 3CX SBC, you can configure the Passive server's IP address in the SBC's Settings tab to speed its switchover when the primary is unreachable, by not waiting for the DNS update to propagate.

    See also

    Last Updated

    This document was last updated on 28 August 2026

    https://www.3cx.com/docs/failover/