← Exponential Network

Install and upgrade with xne

Step by step: get xne, install it, plan, upgrade, verify and roll back an Exponential install. xne 0.3.0.8; first public release. Updated November 26, 2026.

Step 1: get xne

Released: xne 0.3.0.8, the first public release (November 26, 2026). Free software under the GPL (version 2 or later), on GitHub and Packagist; every push is tested on Linux (PHP 7.4 and 8.5) and Windows Server 2022 and 2025 (CI).

xne 0.3.0.8 is a folder of PHP files; nothing is compiled. Get it with Composer, or as a git checkout of the release tag for a server-wide install.

# into a project; the command is vendor/bin/xne
composer require se7enxweb/xne
vendor/bin/xne help
# server-wide, at the release tag
sudo git clone https://github.com/se7enxweb/xne.git /opt/xne
cd /opt/xne && sudo git checkout v0.3.0.8

Step 2: install the command (Linux, BSD, macOS)

For a git checkout, run its installer as root. Without --apply it only shows what it would change. With Composer, use vendor/bin/xne and skip this step.

cd /opt/xne
# what it would do, nothing changed
sudo ./install.sh
# links /usr/local/bin/xne, creates /etc/xne, /var/lib/xne (0700), /var/cache/xne
sudo ./install.sh --apply
# what is installed
sudo ./install.sh status
xne version

The installer never removes anything and installs no timer; run it again after every update. On macOS, link bin/xne onto your PATH instead (ln -s ~/xne/bin/xne /usr/local/bin/xne); state and cache then live in ~/.xne/.

Step 2 on Windows

The same commands run through xne.bat (cmd.exe, Task Scheduler) and xne.ps1 (PowerShell), with the PHP of XAMPP, WampServer, Laragon or IIS. Clone (or unpack the release) to C:\xne, add C:\xne\bin to PATH, and tell xne which PHP to use when php.exe is not on it.

Known limit on Windows: a real 6.0.13 to 6.0.14 upgrade with an exact rollback is proven in CI. A full 6.0.14 to 6.0.15 upgrade on Windows waits on a kernel autoload fix (exponential#377); until it lands, xne stops and rolls back safely there.
setx XNE_PHP "C:\xampp\php\php.exe"
xne version
xne detect --root="C:\xampp\htdocs\exponential"

Step 3: check the settings

Server-wide settings live in /etc/xne/xne.conf; one install can choose differently in settings/override/xne.ini.append.php. xne config shows the result and where each value came from (secrets are never shown).

<?php /* #?ini charset="utf-8"?
[NetworkSettings]
Channel=stable           # stable | beta | main | security
Maintenance=keep         # keep serving (default) | page (503 page, admins can sign in)
BackupKeep=5
HealthURL[]=https://www.example.com/
*/ ?>
xne config --root=/var/www/example.com

Step 4: look at the install

Point --root at the install: the folder with lib/version.php, kernel/ and settings/. Neither command changes anything.

# version, install type, PHP, owner, database, extensions, kernel tools
xne detect --root=/var/www/example.com
# known upgrade traps, each with its level (info, warn, block) and fix
xne traps --root=/var/www/example.com

Fix every block trap before you go on. When the PHP on the path lacks the database driver, name one that has it with --php=/path/to/php.

Step 5: plan the upgrade

# stable channel, the default
xne plan --root=/var/www/example.com
# only the newest release of the same x.y line
xne plan --root=/var/www/example.com --channel=security
# an exact release
xne plan --root=/var/www/example.com --to=v6.0.15
# or git, for a git checkout; auto picks
xne plan --root=/var/www/example.com --method=filepatch

The plan lists the target, the file counts, every local edit, the database steps, the traps and the ordered steps. Nothing is touched.

Step 6: dry run

xne upgrade --root=/var/www/example.com --dry-run

Step 7: upgrade

xne upgrade --root=/var/www/example.com
# visitors see the maintenance page meanwhile
xne upgrade --root=/var/www/example.com --maintenance=page

xne takes the install’s lock, makes a verified backup, writes the files, runs the kernel’s libraries, database and scripts stages, rebuilds autoloads, clears caches and runs the health check. It ends with one of three lines:

PASS: upgraded 6.0.14 -> 6.0.15 (backup <id>)
FAIL: <reason>; rolled back to backup <id>
REFUSED: <why>          # a safety check stopped it before anything changed

Step 8: verify

# the backups, newest first
xne backups --root=/var/www/example.com
# read one back: checksums, files, dump
xne verify-backup --root=/var/www/example.com <id>
# what each channel offers and the advisories for this version
xne check --root=/var/www/example.com

Step 9: roll back, if you need to

# what the newest backup would restore
xne rollback --root=/var/www/example.com --dry-run
# files and database back to the newest backup
xne rollback --root=/var/www/example.com
# or a named one
xne rollback --root=/var/www/example.com <id>

A failed upgrade has already rolled itself back. Nothing is deleted: files a rollback takes back are moved into the backup folder. All four ways back.

Many installs on one server

List one install root per line in /etc/xne/installs, then get one line per install from the daily check (it changes nothing). Upgrade one install after the other, never in parallel.

php /opt/xne/cronjobs/xne-check-all
CURRENT  /var/www/example.com: 6.0.15
UPGRADE  /var/www/shop.example.com: 6.0.14 -> 6.0.15
BLOCKED  /srv/intranet/exponential: 6.0.14 -> 6.0.15

Installs that share folders (a clone, or a second host linked to the first one’s extension/ or vendor/) are refused until you choose: --shared=write for the install that owns them, --shared=skip for the ones that link to it.

Bring old settings up to date: xne defaults

An install upgraded over many releases can miss settings a fresh install of the same release has. xne defaults compares it with a fresh reference install, adds what is missing and keeps the site’s own choices; backed up first, rolled back on any failure.

xne defaults --root=/var/www/example.com --reference=/var/www/fresh-6.0.15 --dry-run
xne defaults --root=/var/www/example.com --reference=/var/www/fresh-6.0.15

Inside an install

With the exp_network extension in the install, the kernel console runs the same engine for that install:

php bin/php/console exp:network:plan
php bin/php/console exp:network:upgrade
php bin/php/console exp:network:rollback

Requirements

  • PHP 7.4 to 8.5 on the command line for xne itself; the install’s own tools need the PHP its vendor/ accepts (8.1 or newer).
  • The PHP extension of the install’s database: pdo_mysql, pdo_pgsql, pdo_sqlite, mongodb or oci8; zlib and json; curl or openssl for downloads.
  • git, only for installs that are git checkouts.
  • Run it as root (it then runs the install’s tools as the owner of index.php) or as that owner.
  • An Exponential 6.x install. Older lines (4.x, 5.x) can be detected and planned; their upgrade chains come later.
  • One database per install: MySQL/MariaDB, PostgreSQL, SQLite, MongoDB or Oracle (database engines).

Every command and option: command reference.