A documentação está disponível em inglês e russo. Esta é a versão em inglês.

Updating

To update WardPane, run the installer of the new version. It keeps your .env, data and sites, takes a backup before changing anything, and rolls back by itself if the new version fails to start.

Update

With the one-command installer:

curl -fsSL https://wardpane.com/install | sudo bash

Or from an archive:

tar xzf wardpane-<version>.tar.gz
cd wardpane
sudo ./install.sh

An update never asks for the panel sign-in again.

What happens during an update

  1. The new version is prepared in /opt/wardpane.new while the old one keeps running. If this step fails, nothing on the server has changed yet.
  2. Data (without the GeoIP databases), the application with .env and the systemd units are copied to /var/backups/wardpane/<time>/ together with a restore.sh that puts everything back. A complete backup is marked with a COMPLETE file.
  3. The panel stops, the data is copied once more, the old version moves to /opt/wardpane.prev and the new one takes its place.
  4. The new version starts and is checked. If it does not come up, the previous version and the data taken just before the switch are restored automatically. What the new version left is set aside in <DATA_DIR>.failed-<time> and /opt/wardpane.failed, and the backup is marked FAILED.

The three latest successful backups are kept. Backups of failed updates are cleaned up separately, also three at a time.

.env during updates

The installer changes only the values of options you pass explicitly (--email, --staging, --user, --password, --ip, --root-login, --no-root-login). Settings added in newer versions are appended at the end as comments, so their defaults apply. A name or password you changed in the panel takes priority over .env.

Restoring a backup by hand

sudo bash /var/backups/wardpane/<time>/restore.sh

restore.sh --app-only restores only the application and units and keeps the current data, with a warning: site passwords that a newer version stored as hashes will not work in an older one until you set them again. A backup whose creation was interrupted (no COMPLETE file) is restored only with --force.

From Small Web Panel 1.x

WardPane 2.0 is Small Web Panel renamed. The 2.0 installer converts a 1.x installation in place:

  1. While 1.x is still running, the installer checks that the new names are free and makes the usual backup, plus all smallwebpanel* units, /etc/smallwebpanel, the root sign-in state and the list of accounts.
  2. The panel stops; the 1.x units are removed; the user swpanel becomes wardpane, and site accounts swp_<id> become wp_<id>. uid and gid stay the same, so file owners and ACLs on the site folders stay correct. /var/lib/smallwebpanel becomes /var/lib/wardpane.
  3. WardPane starts. If it does not, all names, units and data return to the 1.x state and 1.x starts again.
  4. The root helper regenerates the PHP settings in /etc/wardpane, then /etc/smallwebpanel is removed. The 1.x application stays in /opt/wardpane.prev until the next update.

The restore.sh from that backup can bring 1.x back later as well. Old backups in /var/backups/smallwebpanel stay where they are; delete them once WardPane works. After the move, reload the panel page once (Ctrl+F5) and sign in again.

Existing sites keep their 1.x folders (/var/www/<domain>) and their per-site users. New sites use the owner layout described in sites.