Apps and software
Smart updates and update policy
Let the panel update WordPress, Joomla, Drupal, Nextcloud and Matomo at night, test updates first on a temporary copy, delay normal releases while security fixes go out at once, and get back with a snapshot or by restoring only the software.
On this page
Keeping CMS installations up to date is the most effective protection against compromised sites, and the most common cause of broken ones. Berth handles both sides: it updates installations automatically at night, can test each update on a temporary copy before touching the live site, lets normal releases wait a few days while security fixes go out immediately, and always keeps a way back.
This article covers what is updated, how smart updates decide, the layered update policy, updating by hand, snapshots, and restoring only the software from a backup.
What is updated automatically
What is updated is chosen per site, on the page of the application:
| Application | Automatic updates |
|---|---|
| WordPress | Core (not, security and maintenance releases only, or all releases), plugins, themes |
| Joomla | Core |
| Drupal | Core and modules (security advisories for modules can go out immediately) |
| Nextcloud | Core, within the current major version |
| Matomo | Core, within the current major version |
When and whether it happens is set by the update policy. Automatic updates run at night, after the backup. If the site returns a server error afterwards, the panel puts everything back to the previous versions and sends a notification of what happened.
berth wp auto-update --domain example.com --set --core minor --plugins --themes
berth joomla auto-update --domain example.nl --set --core
berth nextcloud auto-update --domain cloud.example.com --set --core
berth wp auto-update --domain example.com --status # outcome of the last roundJoomla extensions are updated by hand from the panel, with a snapshot first and an automatic rollback on error (berth joomla extensions-update).
Smart updates
A server error is easy to detect. A page that still loads but has lost its menu, its layout or its shop is not. Smart updates catch that.
With Smart updates on (Test on a temporary copy first), an update round goes like this:
- The panel makes a temporary copy of the site on
berth-update.<domain>, in the same subscription and behind a password. For WordPress the copy is anonymised: customers, commenters and orders are replaced by fake data. - It fetches the chosen pages of the copy twice before the update. The difference between those two fetches is the page's natural variation (dates, rotating banners), so it does not count against the update.
- It runs the update on the copy and fetches the same pages again.
- It compares before and after, per page:
- the HTTP status,
- PHP errors and the error texts WordPress or PHP shows when something breaks,
- the visible text,
- the structure of the page (its elements),
- whether the stylesheets and scripts that loaded before still load.
- Only if every page is at least as similar as the threshold, the same versions are applied to the live site. Otherwise the update is held: live stays untouched, and you get a report with the comparison per page.
- The copy is removed.
Smart updates do not take screenshots: that would need a full browser on the server. Comparing text, structure and assets catches the same kind of breakage without one.
Pages and threshold
On the WordPress page, under Automatic updates → Pages and threshold:
- Pages to compare: one path per line, up to 10. Left empty, WordPress uses the home page and the first four published pages; Joomla and Drupal use the home page.
- Threshold: the minimum similarity, 50 to 100 %, default 90 %.
berth wp auto-update --domain example.com --set --core minor --plugins --themes \
--smart --page / --page /shop/ --page /contact/ --threshold 90
berth drupal auto-update --domain example.org --set --core --smart --pages / --threshold 90
berth wp auto-update --domain example.com --run # run the policy for this site nowSmart updates are available for WordPress (core, plugins and themes) and for Joomla and Drupal core. Nextcloud core updates are automatic but not smart: its data folder is usually too large to copy for every update.
Update policy in layers
The update policy decides whether and when the panel updates. It has three layers: server → subscription → domain. Per setting, the most specific layer wins; inherit follows the layer above.
| Setting | Meaning | Default |
|---|---|---|
| Update automatically | On: the panel updates at night. Off: self-maintenance; nothing is updated automatically, but known vulnerabilities are still monitored and reported | on |
| Delay | Normal releases wait this many days after publication (0 to 60), so the first problems of a new release surface elsewhere first | 5 days |
| Security updates | Immediately, or after the same delay | immediately |
| Snapshot | Up to which size of the website the panel takes a snapshot before a manual update | 2,048 MB |
| Customers may deviate | Server only: customers may set their own subscriptions and domains |
Where to find it:
- Server: the policy card on the Software page (administrator).
- Subscription: Automatic updates on the customer page.
- Domain: the update policy link on the domain page, next to the website.
Every setting shows where its value comes from ("from the server", "from the subscription"). If the hosting company has fixed the policy, customers see it but cannot change it. A restricted login with the software right can change a domain's policy, but cannot switch off automatic updates or security updates.
berth software update-policy # server
berth software update-policy --auto on --delay-days 5 --security-now on --customer-choice on
berth software update-policy --subscription acme --delay-days 2
berth software update-policy --domain example.com --auto off
berth software update-policy --domain example.com --resetSwitch updates off for one installation
To keep one installation entirely under manual control, switch automatic updating off for that installation. The panel then only monitors and notifies:
berth software updates --domain example.com --id 12 --offUpdate now, by hand
On the Software overview, Update now first shows a plan: which parts go from which version to which (core and/or extensions, selectable), whether a snapshot is taken first and why or why not, what visitors will notice during the update, and how to get back. After you confirm with Yes, update now, it runs as a background task in four steps:
- snapshot,
- core,
- plugins, themes, extensions or modules,
- check: scan the installation again, fetch the site, and compare the core with the official package.
The progress shows in the installation's row and in the task bar at the top. A run that ends with a warning (the site does not answer, a different version than expected) is marked in the row. It cannot be stopped halfway, since that would leave a half-updated site.
Snapshots before an update
Before a manual update, the panel takes a snapshot: a partial backup with only the domain's webspace and the installation's database, no mail or containers. It is taken when the measured webspace is below the policy's snapshot limit. Snapshots are kept on the server for a week (at most three per subscription), are not sent to external backup locations and do not count towards the nightly rotation.
Repairs do not need one: they already keep the replaced files in quarantine; see Software installer.
Restore only the software
When an update or a compromise has damaged one installation, restoring the whole subscription would also roll back mail, other sites and databases. Restore only the software brings back just that installation from a snapshot or a backup archive:
- files: the installation's folder comes back exactly as it was; other installations nested inside it, and document roots of other domains in the same webspace, stay as they are now;
- and/or its database.
A fresh snapshot is taken first, so the restore itself can be undone. Afterwards the panel restores the application's file permissions, clears its cache, registers it again and checks the core. With four-eyes approval switched on, a second administrator approves the restore first; see Audit trail and approvals.
In the panel, open the installation and use Restore from a backup → Restore…. On the command line:
berth software backups --domain example.com --id 12
berth software restore --domain example.com --id 12 --archive <archive> --files --databaseRestoring requires the backups right. Encrypted archives with the customer's own key are shown but cannot be chosen here. For every other kind of restore, see Restoring data.
Containers
Containers with automatic updating are updated in the maintenance windows by the same round, with an automatic rollback when the new version does not start; see Containers.