Front server for AlterCPA Pro and Cloud

The installation of the front server is fully automatic. The front server hides the main server of the network, caches the static files of the sites and issues SSL certificates for the parked domains. An affiliate network or a merchant with the site storage needs it. An affiliate team that does not use the storage does not. You prepare a server and run one command from the control panel on it, and the installer does everything else by itself.

Preparing to deploy

  1. Main server with AlterCPA Pro or Cloud installed and set up and the site storage working. A separate license for the front server is not needed.
  2. Server for the front on clean Debian 13 without a control panel, with its own IPv4 address. The smallest plan of your provider will do: from 1 vCPU, 1 GB of RAM and a 10 GB disk. Ports 22, 80 and 443 must be open. The main load falls on the network, so choose a plan without strict traffic limits.
  3. SSH client: PuTTY for Windows, the built-in Terminal for macOS.

Installation

  1. Connect to the server over SSH as root. If the provider does not let you log in as root, run this command after logging in:
    sudo -i
  2. In the control panel, open the “Control — Settings — Diagnostics” section. In the “Extension servers setup” block, copy the command from the “Front server: Debian 13” line. All the data it needs is already filled in. The command looks like this:
    wget https://cpa.st/setup/front.sh && bash front.sh r.domain.com domain.com q1w2e3r4t5y6u7i8o9p0 12.34.56.78
  3. Paste the command into the SSH window and press Enter. The installer asks no questions. Keep the terminal open until it has finished.
  4. Wait a couple of minutes. At the end the installer prints the line “Done. Certificates are being requested in the background”. The server does not need a reboot.
  5. If the installation stopped with an error, remove the cause and run the same command again.

System settings

Go to “Control — Settings — Sites”. Enter the IP address of the front server in the “Parking IP” field.

Tell the affiliates that the existing parked domains must be pointed to the new address, and new domains parked on it from the start. The front server issues the certificate for a domain by itself once the domain points to it. The domain list is checked every 15 minutes, so HTTPS on a new domain does not appear at once. On a moved domain HTTPS may appear only after several hours. Once the domains have moved, check the box “Front server or Private Flare is used” in the “Technical settings” block. Do not check it earlier: with it on, the main server stops issuing certificates for the domains that still point to it.

Further steps

  1. If the IP address of the main server or the global API key has changed, run the command from the “Diagnostics” section on the front server again: it already carries the new values.
  2. The front server keeps the static files of the sites in its cache for 30 minutes. To reset the cache earlier, run this command on the front server as root:
    ./uncache