Hosting a frontend
A frontend is a hosting package that runs the Lightbolt engine. This page says what such a package needs, and how the domain of a site moves to it. That is the same whatever control panel the hosting uses. Each panel has a page that says where to click:
Installing the engine itself is one command, or one scheduled task. See Installing a frontend.
What the package needs
| What it needs | Why |
|---|---|
| A package of its own | So the themes of an agency, with PHP, never run next to the sites of another agency. Panels call it a subscription (Plesk) or an account (cPanel, DirectAdmin). |
| DNS for its name | An A record for IPv4. When the server has IPv6, also an AAAA record. Both point to the server. |
| A certificate | HTTPS for its own name, and later for every domain that moves to it. Let's Encrypt is free, and renews by itself. |
| PHP 8.3 or newer | The engine is tested on 8.3 and 8.5. |
| A schedule (cron) | The engine checks every 5 minutes for news from the CMS. Some hosting gives a package no crontab. Then the installer asks you to add it once by hand. |
| SSH (optional) | It is handy, but not needed. Without SSH, the installer runs as a scheduled task. |
DNS and IP, in short
- The IP address is the number of the server, such as
62.129.142.84for IPv4 or2a11:…::1for IPv6. The panel shows it. - DNS turns a name into that number. The A record does IPv4, and the AAAA record does IPv6.
- A name only works when two things are true. Its DNS points to the server, and the package knows the name, as its own domain or as an alias. When one is missing, you get not found, or the default page of the panel.
- Check the DNS on dnschecker.org. It shows what the world sees. After a change, that can take an hour.
Moving a site's domain to a frontend
The order matters. Do it like this, one site at a time:
- In Lightbolt, go to the card of the new frontend. Click Add environments, tick the site, and click Add. Lightbolt lists the hostnames to move.
- On the old package, remove the domain, or its alias. A name can only be on one package of a server.
- On the new package, add the domain as an alias. In Plesk that is a domain alias. In cPanel it is an alias or a parked domain. In DirectAdmin it is a domain pointer. Set it up like this:
- web on;
- mail off, unless the mail really should move too;
- no redirect. Panels often redirect an alias to the main domain by default, with a 301. Visitors then land on the own name of the frontend, instead of on the site.
- Issue the certificate again, now with the alias ticked. Without that, the browser says
ERR_CERT_COMMON_NAME_INVALID. Leavewww.off when that name has no DNS. Otherwise Let's Encrypt refuses the whole certificate. - Check it. Open the domain, and a deeper page, such as
/contact.html. It should show the site, on its own address, with a padlock.
Before step 2, check where the mail and DNS of the domain live. When you remove a domain whose DNS the panel keeps, its mail records can go too. An alias for the web only leaves mail alone.
Browser errors and what they mean
| What you see | Cause | What to do |
|---|---|---|
| Not found, or the default page of the panel | The DNS points elsewhere, or the package does not know the name. | Check dnschecker.org, and then the alias. |
| The address changes to the own name of the frontend | The alias redirects, with a 301. | Turn the redirect off on the alias. |
ERR_CERT_COMMON_NAME_INVALID |
The certificate does not have this name. | Issue the certificate again, with the alias ticked. |
| Let's Encrypt fails for every name | One name in the request has no DNS. That is often www.. |
Untick that name, or add its DNS first. |
| This site can't be reached, but only for some visitors | An AAAA record points to an old or wrong IPv6 address. | Fix or remove the AAAA record. |
Staging hostnames: a wildcard per frontend
Some frontends have a name under the test domain of the platform, such as acme.lightbolt.dev under lightbolt.dev. Such a frontend gives the environments it serves a name under its own name: <site>-<environment>.<frontend>. Examples are sunrise-staging.acme.lightbolt.dev and sunrise-tijdelijk.acme.lightbolt.dev.
- Lightbolt fills it in when someone adds an environment.
- Lightbolt refuses a name under the test domain that is not one name under the frontend of its environment. So there are no dots before it, because a wildcard certificate only covers one level.
- A site that moves to another frontend gets Rename it next to each test hostname that no longer fits.
Do this once per frontend, in its hosting package:
- DNS. Names under the frontend reach the server, for IPv4 and IPv6. That is a wildcard record. Check it with Check the wildcard, at the lines for DNS.
- Keep websites secured is on for its subscription. In Plesk, that is under SSL/TLS Certificates. Plesk then gives each new alias a certificate by itself, usually within a quarter of an hour.
- Plesk is set in config.php. The key may be the key of a reseller. The CMS then puts every new test hostname on the subscription of the frontend as an alias by itself, through the XML API of Plesk. It checks every five minutes until https works. Until then, it says Certificate follows under the hostnames. After three hours, it says No certificate yet.
A wildcard certificate is not needed. Where the panel keeps the DNS, it is an option. On managed Plesk without DNS, it is not possible. The steps above do the same, per name.
A new agency, in short
- Go to Platform → Frontends → Add a frontend, with its owner. Tick Make its subscription in Plesk. That needs Plesk in config.php, and a plan under Platform → Config. Lightbolt makes the subscription
<name>.lightbolt.devwithin a minute. The card shows each step: subscription, DNS, certificate, engine installed, and healthy. - Or the agency does it itself, under Organisation → Themes → At Lightbolt. That works when Platform → Config allows self-service, up to its maximum per agency. You get a mail each time, and you can stop it at once.
- Then click Install guide. That leaves one step by hand: a scheduled task in Plesk, or the command over SSH.
Also called: server setup, web hosting, hosting package, subscription, account.
Last changed