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
- The new version is prepared in
/opt/wardpane.newwhile the old one keeps running. If this step fails, nothing on the server has changed yet. - Data (without the GeoIP databases), the application with
.envand the systemd units are copied to/var/backups/wardpane/<time>/together with arestore.shthat puts everything back. A complete backup is marked with aCOMPLETEfile. - The panel stops, the data is copied once more, the old version moves to
/opt/wardpane.prevand the new one takes its place. - 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 markedFAILED.
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:
- 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. - The panel stops; the 1.x units are removed; the user
swpanelbecomeswardpane, and site accountsswp_<id>becomewp_<id>. uid and gid stay the same, so file owners and ACLs on the site folders stay correct./var/lib/smallwebpanelbecomes/var/lib/wardpane. - WardPane starts. If it does not, all names, units and data return to the 1.x state and 1.x starts again.
- The root helper regenerates the PHP settings in
/etc/wardpane, then/etc/smallwebpanelis removed. The 1.x application stays in/opt/wardpane.prevuntil 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.