Panel Upgrade

NexPanel upgrades are safe and reversible. The upgrade script backs up your panel database and binary before touching anything, then replaces the binary and restarts the service. Migrations run automatically on startup.

Open Panel → Upgrade to see the current version and check for newer releases.

Checking for Updates

Click Check for updates next to the Latest Version section. The panel contacts the release server and reports whether a newer version is available.

The panel stores the timestamp of the last check so you can see when it was last refreshed. It does not check automatically in the background.

Upgrade Methods

There are two ways to upgrade:

  • Command-line (recommended) - safer, backs up before upgrading, automatic rollback on failure
  • Panel UI - convenient, no SSH needed (backs up before upgrading)

The command-line method is preferred because it can roll back automatically if the service fails to start.

Upgrading via Command Line

Run as root on the server:

curl -sSL https://nexpanel.dev/upgrade.sh | bash

This upgrades to the current stable release.

Choosing a Version

By default, the script upgrades to the newest stable release. Use --version to change this:

# Newest stable (default)
curl -sSL https://nexpanel.dev/upgrade.sh | bash

# Newest build of pre-releases
curl -sSL https://nexpanel.dev/upgrade.sh | bash -s -- --version v0.2.28-rc1

# Specific version
curl -sSL https://nexpanel.dev/upgrade.sh | bash -s -- --version v0.2.27

The v prefix is optional. 0.2.27 and v0.2.27 are treated the same.

Note

The -s -- is required when piping the script into bash. If you download the script first and run it as ./upgrade.sh --version v0.2.27, you do not need it.

Version Rules

The script enforces safe upgrade paths:

  • Equal version - nothing to do, exits
  • Older version - blocked, cannot downgrade
  • Same major, newer - allowed
  • Next major - allowed (e.g. v1.x → v2.x)
  • Skipping a major - blocked (e.g. v1.x → v3.x). Upgrade through each major in order.

Warning

Jumping between major versions (v1 → v3) is not recommended even when it might technically work. Each major release may contain database migrations and configuration changes that assume the previous major was applied. Go through each major in sequence.

What the Script Does

  1. Detects your architecture
  2. Resolves the target version
  3. Validates the upgrade path
  4. Verifies the target exists on dl.nexpanel.dev
  5. Downloads to a temporary location
  6. Runs the new binary's version command to confirm it works
  7. Stops the panel service
  8. Backs up the SQLite database and current binary to /opt/nexpanel/data/
  9. Swaps the binary
  10. Starts the service
  11. Waits and checks that the service is running
  12. Rolls back automatically if the service fails to start

The service is down only during steps 7 through 10 - usually a few seconds.

Upgrading from the Panel

Click Upgrade Now in the panel to upgrade from the web interface.

Before making any changes, the panel:

  1. Checks for an available update
  2. Downloads the new binary to a temporary file next to the current one
  3. Verifies the downloaded file is a valid size
  4. Backs up the panel database and current binary
  5. Swaps in the new binary
  6. Restarts itself

If anything fails before the swap, nothing on disk changes. The Upgrade Now button is safe to retry.

The panel briefly restarts during the swap, so you may lose access to the interface for a few seconds. Refresh the page and you should land back on the login screen with the new version running.

Note

The panel-based upgrade always uses the stable release. It does not support pre-releases. If you need that, use the command-line method.

After Upgrading

  1. Reload the panel in your browser
  2. Verify the new version under Panel → Upgrade
  3. Check that services are running under Panel → Services
  4. Confirm websites are loading as expected

Migrations for the panel's own database run automatically when the service starts. You do not need to run them manually.

Rolling Back

If a CLI upgrade fails, the script rolls back automatically and restarts the previous binary. You will see a message confirming the rollback.

If you need to roll back manually after either upgrade method, the backups are named with the timestamp of the upgrade.

CLI upgrade backups

Located in /opt/nexpanel/panel-backups/:

/opt/nexpanel/panel-backups/
├── nexpanel_backup_20260929_143022.db    ← SQLite database
└── nexpanel_backup_20260929_143022.bin   ← panel binary

Panel upgrade backups

Panel backups are also located in /opt/nexpanel/panel-backups/:

/opt/nexpanel/panel-backups/nexpanel_backup_20260929_143022.db
/opt/nexpanel/panel-backups/nexpanel_backup_20260929_143022.bin

Restoring a backup

To restore:

systemctl stop nexpanel
cp <binary-backup-path> /opt/nexpanel/nexpanel
cp <db-backup-path> /opt/nexpanel/db/nexpanel.db
systemctl start nexpanel

Replace the backup paths with the actual files from the timestamped list above.

Warning

Always back up your panel database and binary before upgrading. Both upgrade methods do this automatically, but a manual backup before starting is a good habit.

Only the panel database and panel binary are backed up. Your websites, databases, files, and other data are never touched during a panel upgrade, so you do not need to back them up for this step.

Troubleshooting

Upgrade script reports "Cannot skip major versions"

You are trying to jump from one major to a non-adjacent major (v1 → v3, for example). Upgrade through each major in sequence:

# Assume you are on v1.x and want v3.x
curl -sSL https://nexpanel.dev/upgrade.sh | bash -s -- --version v2.0.0
curl -sSL https://nexpanel.dev/upgrade.sh | bash -s -- --version v3.0.0

Upgrade script reports "Cannot downgrade"

You passed a version older than what is installed. Verify the target version:

nexpanel version

Service fails to start after upgrade

The script rolls back automatically. If you see the rollback message but the service is still not running, check the logs:

journalctl -u nexpanel -n 100 --no-pager

Common causes are disk space, missing dependencies, or a corrupted SQLite database. If the database is the issue, restore from the backup as shown in the rollback section above.

Last updated: November 1, 2026