Server security checklist
This checklist covers the server under ClientFence: files, web server, PHP, database and mail. The in-app features, such as two-factor sign-in and rate limits, have their own pages. Most items match a check on the System Health page, so you can see at once what is left to do.
Run the checks first
Section titled “Run the checks first”- Go to System → Settings → System and open the System Health tab.
- Select Run checks now.
- Work through Needs attention, then Warnings, with the items below. Each item names the check as the page shows it.
The checks also run every hour through the cron. See System health. Items marked not checked are yours to check by hand.
Files and folders
Section titled “Files and folders”File owner and config.php
Section titled “File owner and config.php”-
Why:
config.phpholds the database password andinfo.salt, the key that decrypts saved passwords and API keys. Admin pages that save a setting writeconfig.phpagain (and copy the old one toconfig.old.php), so PHP must be able to write it and the ClientFence folder. -
Check: config.php permissions needs attention when other users of the server can read the file, and warns when its group can write it. From the ClientFence folder:
Terminal window stat -c '%a %U %n' config.php config.old.php -
Fix: all ClientFence files belong to the site’s user, the user PHP runs as, never root. Set both files to
600. Use600even though the installer’s last screen shows644.Terminal window chmod 600 config.php config.old.php
Keep a copy of config.php off the server too: without it, a restored database cannot read its
saved keys.
Private upload folders
Section titled “Private upload folders”-
Why: ticket attachments and payment receipts can hold personal and payment details.
-
Check: Private folder: ticket attachments and Private folder: payment receipts. Each folder must be outside the web root (needs attention otherwise), and mode
700(warning otherwise). -
Fix: keep
.clientfence-ticket-filesand.clientfence-receiptsnext to the site folder, not inside it, and close them to other users. Do the same for.clientfence-client-filesand.clientfence-id-documents.Terminal window chmod 700 ../.clientfence-ticket-files ../.clientfence-receipts -
Read: Backups and cloud copies.
HTTPS and HSTS
Section titled “HTTPS and HSTS”-
Why: sign-ins, card pages and API keys must never travel as plain text.
-
Check: HTTPS only passes when the portal URL starts with
https://andsecurity.force_httpsistrue. Security headers asks your own site for its home page and needs HSTS, CSP and X-Content-Type-Options. General Check also fails while HTTPS is not enforced.Terminal window curl -sI https://billing.example.com/ | grep -i -E 'strict-transport|content-security|x-content-type' -
Fix: install a certificate for the portal’s domain in your hosting panel (Let’s Encrypt is fine). Then set
urlandsecurity.force_httpsinconfig.php. ClientFence sends the headers itself fromclientfence-security-headers.php: if one is missing, upload that file from your release again, and check that a proxy in front of the site does not remove them.
PHP settings
Section titled “PHP settings”| Check on the page | What it wants | Fix |
|---|---|---|
| Debug and error display | Debug mode off, PHP display_errors off |
Set debug_and_monitoring.debug to false and display_errors = Off in the site’s PHP settings |
| PHP version and PHP Version Check | A PHP that ClientFence supports and that still gets security fixes | Switch the site to PHP 8.3, 8.4 or 8.5 in your panel |
| PHP extensions | Every required extension, and the recommended ones | Turn them on in your panel’s PHP settings |
| PHP memory limit | memory_limit of 256M or more |
Raise it in the site’s PHP settings |
| PHP OPcache | OPcache on for the website’s PHP | Set opcache.enable = 1 (often Opcode caching in the panel) |
| Dangerous PHP functions | exec, passthru, system, shell_exec, popen, proc_open and pcntl_exec turned off |
Add them to disable_functions in the site’s PHP settings, if nothing else on the site needs them |
The command-line update (php console.php system:update) finishes with passthru. If your
command-line PHP disables it, run php console.php system:run-patcher yourself after the update.
See Requirements and Caching and speed.
config.php security settings
Section titled “config.php security settings”- Why: a few settings in
config.phpswitch protections on or off. - Check: Strict security mode needs
security.modeset tostrict. General Check warns when session fingerprinting orapi.CSRFPreventionis off, whentwig.debugor debug mode is on, or whenupdate_branchis notrelease. - Fix: put the default back for each key the check names.
- Read: The config.php file reference.
Cron user
Section titled “Cron user”-
Why: the cron writes cache files, logs and backups. Run as root, those files would belong to root and the website could no longer change them. Started as root,
cron.phpswitches to the user that owns ClientFence first (with PHP’s posix extension), but the site user’s crontab is safer. -
Check: Scheduled tasks (cron) passes when the last run is under 15 minutes old, warns up to two hours, and needs attention after that or when the cron never ran.
-
Fix: add the line from Recommended Schedule on System → Settings → Scheduled Tasks to the crontab of the site’s user, every five minutes.
*/5 * * * * php /path/to/clientfence/cron.php -
Read: Scheduled tasks (cron).
Database user rights
Section titled “Database user rights”Not checked. Database version only checks the version (MySQL 8.0 or MariaDB 10.6 and newer recommended).
- Why: a leaked password for a user with rights on every database exposes every site on the server.
- Check: sign in to MySQL as the ClientFence user and run
SHOW GRANTS;. - Fix: give ClientFence its own database user with all rights on its own database only, never the MySQL root user. Updates create and change tables, so keep those rights. Do not open the database port to the internet.
- Read: Install ClientFence.
Backups and restore tests
Section titled “Backups and restore tests”- Why: a backup you never restored is a guess.
- Check: Database backup and Site files backup look at every source: the daily database backup and cloud copies for the database, cloud copies for the files. Each warns when nothing backs it up or its newest copy is old (two days for the daily backup, twice the schedule for cloud copies). ClientFence cannot see backups your host makes. Daily database backup (when a destination is on) warns when its newest backup is more than two days old or stays only on this server with no cloud copy, and needs attention when the last one failed. Cloud backups (when on) warns when a copy failed or is too old.
- Fix: turn on a destination off this server, and keep
config.phpand the private upload folders in your file backups. A few times a year, restore a backup on a test install and check that Encryption key passes there. - Read: Backups and cloud copies and Restore a backup.
Updates
Section titled “Updates”- Why: releases fix security issues.
- Check: ClientFence version shows the version you run. Database updates, Core patches, Pack files unchanged and Pack manifest need attention when an update did not finish or shipped files were changed or are missing.
- Fix: install new releases from System → Update ClientFence. When a file check fails,
upload the files of the release you run again (your
config.phpis not in the release), then remove theinstallfolder. Keep the server’s own packages (operating system, web server, PHP, database) updated too: your host or panel does that, ClientFence does not. - Read: Update ClientFence.
Private paths
Section titled “Private paths”-
Why: code, libraries, logs and
config.phpmust be read by PHP only, never served to visitors. -
Check: Private paths blocked asks your own site for seven private paths, such as
vendor/composer/installed.jsonanddata/index.html, and lists any it gets back. Webserver Check asks forconfig.php,data/log/php_error.logandvendor/autoload.php. Pack .htaccess rules checks that the ClientFence rule blocks are in.htaccess.Terminal window curl -s -o /dev/null -w '%{http_code}\n' https://billing.example.com/config.phpAnything but
200is right. -
Fix: keep
.htaccessin the site folder anddata/.htaccessin the data folder (upload hidden files too), and use a web server that reads them: Apache, LiteSpeed or OpenLiteSpeed. On Nginx, add the rules from Run ClientFence on Nginx. Remove theinstallfolder if it is still there. -
Read: Install ClientFence.
Admin area address
Section titled “Admin area address”- Why: bots try
/adminfirst. - Check: Admin area address warns while the admin area is at
/admin. The report never shows your own address. - Fix: choose an Admin address in the Security step of System → Settings → Quick
setup, or set
admin_area_prefixinconfig.php. Add staff sign-in rules, such as sign-in only from your IP addresses. - Read: Quick setup and Staff sign-in rules.
Firewall and proxies
Section titled “Firewall and proxies”The firewall is not checked. Visitor addresses checks the proxy part.
- Why: every open port is a way in. Behind a proxy that is not trusted, every visitor shows with the proxy’s address, so sign-in limits and logs see one visitor.
- Check: list the open ports from another machine, and read Visitor addresses.
- Fix: open only HTTP and HTTPS (80, 443) to everyone. Keep SSH to your own addresses and the database, Redis and Memcached closed to the internet. Allow outgoing HTTPS: ClientFence connects to your control panels, registrars, payment gateways, backup destinations and the release list on clientfence.com. Behind Cloudflare or another proxy, trust it on Security → Settings, Proxies tab.
- Read: Proxies, access lists and sessions.
Mail: SPF, DKIM and DMARC
Section titled “Mail: SPF, DKIM and DMARC”SPF, DKIM and DMARC are not checked. Email delivery checks the transport.
- Why: without these DNS records, invoices and password resets land in spam, and anyone can send email in your name.
- Check: Email delivery passes for SMTP on port 465 (TLS) or 587 (STARTTLS) and for
SendGrid, warns for other ports and mailers, and needs attention when no transport is set.
For the DNS records, send a test email to a Gmail address and open Show original: SPF, DKIM
and DMARC should say
PASS. - Fix: publish the SPF, DKIM and DMARC records your mail provider gives for the sender domain, and send through SMTP with TLS.
- Read: Emails and Troubleshoot queued email delivery.
Other checks on the page
Section titled “Other checks on the page”| Check | What it wants |
|---|---|
| Captcha on public forms | A captcha on with its keys set. See Captcha and anti-spam |
| Script policy | No script blocked by the page policy in the last 7 days |
| Encryption key | Every module setting readable with info.salt |
| Email queue | No failed emails and none waiting over an hour |
| Help desk: name | A help desk email address of your own, not the installer’s placeholder |
| Google sign-in | When on, a client ID and secret |
| Registrar: name, Hosting server: name | Each Dynadot registrar’s API and each active hosting server’s control panel answer |
| Free disk space | 5 GB or more (warning under 5 GB, attention under 1 GB) |
| Cache backend | The chosen cache reachable; Redis or Memcached for a busy site |
| GeoIP database | Present and updated in the last 60 days |
Warnings and errors from the admin dashboard alerts also appear under Core checks.

