4 Expert pathLesson 7 of 8 8 min read

Advanced security and maintenance

  1. 1. Éclair's architecture
  2. 2. Local development and testing
  3. 3. Customize the theme templates
  4. 4. Nginx, VPS, proxy and CDN: deploy Éclair
  5. 5. Éclair performance: staying at 100 out of 100
  6. 6. Migrate from WordPress or Wix
  7. 7. Advanced security and maintenance
  8. 8. Scaling Éclair in an agency
Contents
  1. What the offensive security review checked
  2. Data protections in detail
  3. ECLAIR_SECRET: why and when?
  4. Integrity check and manifest.php
  5. Bounded logs and lost access
  6. How do you update Éclair without breaking anything?
  7. Off-site backups and file permissions
  8. Advanced security: HSTS, admin and firewall
  9. Monitoring and revoking MCP access
  10. Key points
  11. Going further
  12. Frequently asked questions

Advanced security in Éclair starts where the everyday settings stop: understanding what protects your data, repairing lost access, updating without breaking anything and monitoring the site over time. This lesson is for anyone who manages one or more sites, on shared hosting or on a VPS.

What you'll be able to do

Understand the protections

What the offensive review checked and what Éclair does on its own.

Update safely

The complete procedure, via FTP or over SSH.

Keep a routine

Off-site backups, integrity, logs and MCP access.

What the offensive security review checked

Any advanced security effort starts with a question: what was actually tested? Éclair was deliberately attacked: race conditions between requests, brute force, redirects, injections, booby-trapped files. The review found 17 vulnerabilities (2 severe, 7 medium, 8 minor), all fixed, then its 13 attack scenarios were replayed against the fixed version: all were neutralized. Many of them now run every time you execute php tests/run.php, for example:

Replayed attackAutomatic check
site uploaded then forgotten, installed by a strangerinstaller locked after 2 hours
forged site addressnever used to redirect visitors
passwords tried in parallelblocking per network, while the owner is never locked out on their usual device
cache poisoned by a forged headerheaders independent of the announced protocol
data file requested from the web404, plus the <?php exit; ?> line at the top of the file
booby-trapped FTP recovery filerefused and deleted if the protection line is missing

Data protections in detail

ECLAIR_SECRET: why and when?

The vault key is derived from the site secret, stored in data/keys.php. Someone who got hold of a copy of data/ alone (a manual archive of the folder, a Docker volume, a poorly protected data folder) could therefore decrypt your API keys. The ECLAIR_SECRET constant adds a second secret, stored outside data/: both are then needed.

<?php
// eclair-config.php, next to index.php
defined('ECLAIR') || exit;
define('ECLAIR_SECRET', 'une-longue-phrase-secrète-propre-à-ce-site');

Set it before you save your API keys, replacing the example value with a long phrase of your own. If you add, change or lose it later, the keys already saved become unreadable: just enter them again in Settings › AI assistant, since nothing else depends on it. Store this phrase in your password manager, one per site. The eclair-config.php file is protected: the server refuses any .php file other than index.php, and the integrity check recognizes it.

Integrity check and manifest.php

In Security › File integrity, Scan now compares each Éclair file with its original fingerprint, recorded in app/manifest.php, and looks for suspicious files.

ResultMeaningWhat to do
Modified filescontent different from the originalnormal for customized templates; otherwise, put back the file from the archive and look for the cause
Missing filesdeleted or badly uploadedupload them again from the archive
Unknown filespresent in app/, assets/ or at the root, absent from the manifestoften a leftover from an old version: delete it
Suspicious filesin media/, anything other than an image or a font; in data/ or cache/, a script or a .php file without the protection linetreat it as an intrusion

Run the scan after each update, every month, and whenever a behavior surprises you. If you find a suspicious file: download a backup, keep a copy of the file to analyze it, delete it, change the passwords and look for how the intruder got in.

Bounded logs and lost access

The data/logs/security.php and data/logs/errors.php logs record one JSON line per event. Each field is truncated to 300 characters, and beyond 1 MB, only the last 256 KB are kept, so an attacker can't make them balloon. The Security page shows the Security log (logins, failures, blocks, two-factor authentication, backups, changed settings) and the Recent technical errors.

Forgot your password, or lost your two-factor authentication phone, with no other administrator? Create the data/reset.php file via FTP, with exactly these three lines (the protection line, your account's email address, then your new password):

<?php exit; ?>
ton-adresse@email.fr
TonNouveauMotDePasse2026

Within 24 hours, log in with that email and that password, which must follow the usual rules (at least 10 characters). The password is replaced, two-factor authentication for the account is turned off, your other sessions are closed and the file is deleted. Without the first line, the file is refused and erased. Likewise, if the installation shows “Installation locked”, delete data/install-window.php: the 2-hour window opens again.

How do you update Éclair without breaking anything?

Updating Éclair: replace app and assets, keep data and media
What an update replaces, and what it never touches.
  1. Download a backup: Security › Download a backup, with your password.
  2. Via FTP, delete the app/ and assets/ folders, then upload the ones from the new version along with index.php and .htaccess. Deleting first avoids keeping old files, which the integrity check would flag as unknown.
  3. Don't touch data/ (content, settings, accounts, custom CSS), media/ (images) or eclair-config.php.
  4. In Settings › Advanced, click Clear cache: the saved pages still point to the old versions of the static files.
  5. Run Scan now: only your customized templates, if you have any, should appear.

Over SSH, steps 2 and 3 take four commands, since the archive contains an eclair/ folder:

cd /var/www/eclair
unzip -q ~/eclair-cms-1.8.0.zip -d ~/eclair-new
rm -rf app assets
cp -r ~/eclair-new/eclair/app ~/eclair-new/eclair/assets ~/eclair-new/eclair/index.php ~/eclair-new/eclair/.htaccess .

Off-site backups and file permissions

There's no advanced security without an off-site backup. The ZIP backup contains data/ and media/, without the sessions, the counters, the ai/ folder (conversations and MCP connections), vault.php or reset.php. To restore, replace data/ and media/ with those from the archive, clear the cache, then enter your API keys again and reconnect Claude or ChatGPT. Keep at least one copy outside your hosting, and make one before every update.

On a VPS, automate the same backup with tar, excluding the same items:

tar -czf /sauvegardes/eclair-$(date +%F).tar.gz -C /var/www/eclair \
  --exclude=data/sessions --exclude=data/limits --exclude=data/ai \
  --exclude=data/vault.php --exclude=data/reset.php data media

As for permissions, Éclair only writes to data/, cache/ and media/. On a VPS, only these three folders need to belong to the PHP user; the code (app/, assets/, index.php) can stay read-only for it, and eclair-config.php readable by PHP but not by other accounts. On shared hosting, keep folders at 755, as the setup wizard asks.

Advanced security: HSTS, admin and firewall

Monitoring and revoking MCP access

The Protection level card on the Security page sums up seven points: HTTPS enforced, site address verified, two-factor authentication for all administrators, custom admin URL, PHP 8.2 or later, Argon2id passwords, HSTS. Aim for 100%.

FrequencyAction
every monthread the protection level and the security log, run the integrity scan, store a backup off-site
with every releasefollow the update procedure, then run the scan again
every quarterreview the accounts in Users and revoke unused MCP apps
continuouslyexternal uptime monitoring that alerts you if the site stops responding

To revoke the MCP connector, click Revoke access next to the app in Settings › AI assistant. Unchecking Allow MCP connections cuts off every app at once, as does a password change or Log out my other devices in your profile. Access tokens last one hour, and only their hashes are stored.

Key points

Going further

Frequently asked questions

Does the ZIP backup contain my API keys?

No: vault.php and the ai/ folder are excluded. After a restore, enter your keys again in Settings › AI assistant and reconnect your MCP apps.

What should I do if the integrity check flags a suspicious file?

Treat it as an intrusion, right away. The steps are described in the integrity check section: backup, copy for analysis, deletion, new passwords and a search for the security hole.

What happens if I lose eclair-config.php and ECLAIR_SECRET?

Only the API keys become unreadable: the rest of the site keeps working. Recreate the file with a new phrase, then enter your keys again.

Does Éclair need a web application firewall?

It's not necessary, since its protections are built in. If you add one, check that it lets the editor, /_eclair/ and /.well-known/ through.

All the lessons of this path