Skip to content

Move cPFence to a new server

Use root on both Enhance servers and keep a private copy of your settings archive. For an in-place v3 upgrade, use Migrate from v3 instead.

  1. On the old server, create a backup:

    Terminal window
    cpfence --backup-cpf-settings
  2. Use your secure file-transfer client to copy the reported /var/cpf_backups/cpfence_backup_*.tar.gz archive into /var/cpf_backups/ on the new server.

  3. When ready to retire the old installation, uninstall cPFence there. Protection stops on that server.

  4. Arrange the new server’s license coverage: Reissue an individual per-server license, sync a per-website license (to move the main control panel server itself, follow its own order), or ask support to update a bulk license. Then install cPFence on the destination with its key.

  5. Restore the copied archive by its exact filename:

    Terminal window
    cpfence --restore-cpf-settings cpfence_backup_YYYYMMDDHHMMSS.tar.gz

    Replace the placeholder with your filename. Check cpfence --status, the restored settings, and website health.

Restore applies supported activation settings and verifies runtime, so a separate restart is not normally needed. Keep the original archive until the new setup is checked. For a restore error, follow settings recovery.

Move the main control panel server (per-website license)

Section titled “Move the main control panel server (per-website license)”

The main control panel server syncs a per-website license, and each sync replaces the license’s IP list with the IPs in your Enhance cluster. The new server cannot sync until it is licensed, so use this order:

  1. Back up and copy your settings as above, then uninstall cPFence on the old main control panel server. While it stays installed, its automatic sync removes any IP that is not yet in your cluster.

  2. Move the Enhance main control panel to the new server.

  3. Ask cPFence support to add the new server’s IP to your license.

  4. On the new server, install cPFence with your license key, restore the archive as above, then run:

    Terminal window
    cpfence --sync-ips
  5. Allow the new server’s IP to reach TCP 9096 on every secondary server in your provider’s firewall.

  6. On each secondary server, run cpfence --reset-agent as root and type reset. Then check Servers in the WebUI for Connected.