The installation of the front server is fully automatic. A front server stands between the domains and the site storage: it hides the address of the storage and protects it from complaints, caches the static files of the sites and issues SSL certificates for the domains by itself. 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
- Site storage, installed and active: the front server is placed in front of it. A separate license for the front server is not needed.
- 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.
- SSH client: PuTTY for Windows, the built-in Terminal for macOS.
Installation
- 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
- In the control panel, open the “Sites” section and click the “Settings” button. Copy the command from the “Front server” block at the bottom of the page. All the data it needs is already filled in. The command looks like this:
wget -q -O setup.sh https://cpa.st/setup/front-tr.sh && bash setup.sh 12.34.56.78 "https://domain.com/api/tracker/domains.raw?id=1-q1w2e3r4t5y6u7i8o9p0"
- Paste the command into the SSH window and press Enter. The installer asks no questions. Keep the terminal open until it has finished.
- 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.
- If the installation stopped with an error, remove the cause and run the same command again.
System settings
Go back to “Sites — Settings” and enter the IP address of the front server in the “Parking IP” field. The panel will show this address in the “Domains” section in the “Your parking IPs” list. Point the existing domains to it and park new domains on it right away. Check the moved domains in the “Domains” section with the “Check” button: the front server gets a domain after the check, and the panel itself rechecks the domains only once in a few hours. The front server issues the certificate by itself, but HTTPS does not appear at once.
Further steps
- There can be several front servers: install each one with the same command and list their addresses in the “Parking IP” field, separated by commas.
- If the IP address of the storage changes, reinstall the front server: run the command from the “Front server” block again, it already carries the new address.
- 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