Smoke test
Run one command right after the install to check services, ports, addresses, certificates, mail, database, disk and the firewall.
The smoke test is a quick check for a real server, to run once right after the installer has finished (and again after you change DNS or the firewall). It prints a line for every check: a green ✔ when it is fine, a red ✘ with a one-line fix underneath when it is not.
Where: on the server, as root over SSH.
Run it
sudo hf-agent smoke-test
The command's exit code is the number of failed checks, so 0 means everything passed. That makes it easy to use in
a script, for example after a rebuild.
| Option | What it does |
|---|---|
--account USER |
the hosting account used to test phpMyAdmin's sign-in token (default: the first account found) |
--no-network |
skips the checks that need the internet or DNS: addresses and certificates, port 25, the reverse name |
--plain |
no colours |
--dry-run |
for tests only: uses no network, changes nothing and reads settings from a file |
What it checks
| Check | A ✘ means | What to do |
|---|---|---|
| System | the release is not a supported one. The section also shows what resource limits run on: cgroups v2, cgroups v1 (a note: run hf-agent cgroups-v2 and restart), or CloudLinux LVE with its default limits and alt-php versions |
see System requirements |
| Services | a service the server needs is installed but not running (the same list as hf-agent health) |
the fix line gives the restart and log command; for Apache run hf-agent apache-fix |
| Panel ports | nothing answers on the panel port, 443 or 80 | check Nginx: nginx -t, then restart it |
| Addresses and certificates | a name (srv, rs, cp, mail, fm, dbs, cld, dep, api, and docs or cdn when your server has them) does not point to this server's public IP, or its certificate is missing, not trusted, expired or has under 7 days left |
add or correct the DNS record, wait for it to spread, then run hf-agent ssl-now. See DNS setup |
| Outgoing port 25 | no public mail server answered within 5 seconds (with an outgoing mail relay set, the test checks that the relay answers instead) | ask your provider to open outgoing port 25, or set an outgoing mail relay; many providers block it on new servers |
| PTR | the public IP has no reverse name | set the reverse DNS of the IP to your mail name at your provider |
| Mail ports | nothing listens on 25, 465, 587 or 993 | restart Postfix and Dovecot, then run hf-agent health |
| phpMyAdmin | it is not installed, or a one-time sign-in token could not be made for the test account | hf-agent phpmyadmin on |
| Database | the database server does not answer | restart MariaDB and read its log |
| Disk and memory | the disk is 90% full or more, or under 150 MB of memory is free | free space (hf-agent autofix clears caches and old logs) or add memory or swap |
| Licence | no licence plan was found | hf-agent licence sync |
| Firewall | the firewall is on but a needed port (80, 443, the panel port, and the mail ports) is closed | open the port under Server Admin › Security › Firewall |
A yellow ! line is only a note and does not count: a part that is switched off on purpose (mail, phpMyAdmin,
the firewall), a name you have not set up, or a check skipped with --no-network.
Note: the test for phpMyAdmin makes a sign-in token for the test account and deletes it straight away. It never signs in and shows nothing to the customer.
Tip: names that do not point to the server yet are the most common ✘ right after an install. Add the DNS records, wait a few minutes, and run the test again; the certificates follow by themselves.