Installing a frontend
A frontend is a server that runs the Lightbolt engine and serves sites. An agency with its own themes, with PHP, gets a frontend of its own. So its code never runs next to the sites of other agencies.
Installing one takes one command. When the hosting has no SSH, it takes one scheduled task. You type nothing into a config. No token or password is ever shown, mailed, or put in a file that you download.
Before you start
Hosting a frontend explains what the hosting package needs, whatever the control panel is. It has pages for Plesk, cPanel and DirectAdmin. The clicks below are the ones in Plesk.
- A hosting package of its own. In Plesk that is a subscription, such as
frontend-agency.example.com. Do not use the package of another frontend. - DNS. The name points to the server, with an A record, and AAAA for IPv6. Check it on dnschecker.org.
- A certificate. In Plesk, use SSL/TLS Certificates → Let's Encrypt, once the DNS is right.
- PHP 8.3 or newer for the domain. In Plesk, that is under Hosting & DNS → PHP.
- Scheduler management allowed for the subscription. In Plesk, that is under the subscription → Customize → Permissions. The engine needs a schedule. Without SSH, that is also how you install.
- In Lightbolt, under Platform → Frontends:
- the frontend exists, with its Owner, which is the agency, and its Address, which is
https://with the domain of step 1; - an engine version that has an installer is uploaded under Engine versions. That is 1.118.0 or newer. Without a choice, the newest is taken.
- the frontend exists, with its Owner, which is the agency, and its Address, which is
Get a command
On the card of the frontend, click Install guide. You get a command and a file. They work once, for 30 minutes. Did they expire? Click Install guide again. There is no limit, and nothing breaks. Each new code gives the frontend a new token once it is used, and the old token stops.
With SSH
- In Plesk, go to the subscription → Hosting → SSH access, and choose
/bin/bash, not chrooted. It may say Forbidden. Then your hosting turned SSH off. Use the way without SSH below. - Open SSH Terminal, or connect with
sshfrom a terminal. - Paste the command, and press Enter:
curl -fsS https://<cms>/delivery/v1/install/ABCD-EFGH | phpDoes
phpsay that it is older than 8.3? Then use the PHP of the subscription, such as| /opt/plesk/php/8.5/bin/php.
Without SSH: a scheduled task
- On the install card, click Download lightbolt-install.php.
- In Plesk, open the File Manager of the subscription. Upload the file into the top folder, next to
httpdocs. Do not put it intohttpdocs. Anyone could open it there, so it refuses to run from there. - Go to Scheduled Tasks → Add Task → Run a PHP script. Choose the file, and PHP 8.3 or newer. Any schedule is fine. Click OK.
- Tick the task, and click Run Now. Plesk shows what it printed.
- When it is done, it has removed itself. Delete the task.
What you see
The install card in Lightbolt follows along: waiting, token fetched, engine downloaded and checked, installed.
First comes the part of the CMS:
- ✓ PHP and the folders of the subscription;
- ✓ the name of the frontend. The code is used up now;
- ✓ the engine version, checked against its SHA-256, and unpacked in
lightbolt/engines/<version>/.
Then the installer of the engine runs, in eight steps:
- It reads what the CMS left, and checks the folders.
- It puts the version with the others, and checks every file.
- It writes
lightbolt/config.php, with the token. Only this user can read it. It deletes the temporary file. - It makes the folders for its data.
- It puts the loader and
.htaccessinhttpdocs. On a first install, what was there moves tolightbolt/before-install-<time>/. That is, for example, the welcome page of Plesk. Nothing is deleted. - It sets a schedule that runs
lightbolt/tick.phpevery 5 minutes. This keeps working after engine updates. - It fetches the sites once. That also proves that the token works.
- It checks
/_healthon the own address of the frontend. When the DNS or the certificate is not ready yet, that is only a note.
One step by hand
Some hosting gives a subscription no crontab. Then the installer finishes everything else, and ends with:
Almost done. One thing to do by hand, in Plesk:
Websites & Domains → Scheduled Tasks → Add Task → "Run a command":
<php> <home>/lightbolt/tick.php
Run: Cron style, every 5 minutes: */5 * * * *The card in Lightbolt then says finish by hand. It shows the command and its schedule, each with a copy button.
- In Plesk, go to Scheduled Tasks → Add Task → Run a command.
- Paste the command.
- Set Run to Cron style, and paste the schedule,
*/5 * * * *. - Click OK.
When it stops
| What you see | What to do |
|---|---|
| This code does not work (any more) | It was used, or it is older than 30 minutes. Click Install guide for a new one. |
| PHP … runs this. 8.3.0 or newer is needed | Choose a newer PHP for the domain. Or use the command with the PHP of Plesk, such as /opt/plesk/php/8.5/bin/php. |
| PHP misses the extension … | Turn it on in Plesk, in the PHP settings of the domain. Then run it again with a new code. |
| No engine version is chosen | Upload an engine version of 1.118.0 or newer, under Platform → Frontends → Engine versions. Choose it for this frontend. |
| This engine version has no installer of its own yet | The version is older than 1.118.0. Choose a newer one, and run it again. Delete lightbolt/install.json, because it holds the token. |
| This file is in httpdocs | Move it one folder up, next to httpdocs. |
A note that /_health cannot be reached |
The DNS or the certificate is not ready yet. Check again later. You do not need to install again. |
You can always run the install again safely. It keeps its settings, takes a new token, and only replaces its own schedule.
After it is installed
- Move sites to it. On its card, choose Add environments → Tick every site of <agency> → Add. Lightbolt then sends those sites to this frontend.
- Then move the domains in the control panel. Move the domain of each site to the package of this frontend. Add it as an alias, for the web only, without a redirect. Then issue its certificate again, with the alias. Lightbolt lists the hostnames after moving. Moving the domain of a site explains the order, and what can go wrong.
- Engine updates need nothing on the server. Choose a version for staging and production on the card of the frontend. The engine then fetches it, checks it, and switches by itself.
- To stop it at once, go to its card → ⋮. Choose New token and secret, which stops it until it is installed again. Or choose Remove this frontend.
Also called: frontend installation, engine setup, onboarding an agency, Plesk setup.
Last changed