Skip to content

Docker updates and rollback

Updates are signed. The updater asks for the target release, pulls the image by digest, checks the signed image manifest, and only then touches your containers.

Run it in the folder with compose.yml (stack) or anywhere (single container):

Terminal window
./nexovirt update # latest release of your line
./nexovirt update 1.3.70 # a specific version
./nexovirt update 1.3.60 --allow-downgrade
./nexovirt status # containers and schema version
./nexovirt backup # database dump into /backups
./nexovirt restore /backups/<dump>.sql.gz
./nexovirt logs [service]

nexovirt update always works. For a single container it finds the container by the label com.nexovirt.role=aio and recreates it with the same settings.

Keep NEXOVIRT_IMAGE on a line tag (latest or 1.3). The update moves that tag to the new digest, so the compose file stays correct. A version tag (for example :1.3.70) would then name a different release, so the update refuses until you change it: “Set NEXOVIRT_IMAGE to a line tag (latest or 1.3) first.”

Updates need Docker Engine 25 or newer (API 1.44). On an older engine the update stops before it changes anything and asks you to update Docker.

  1. Checks the signed manifest of the release.
  2. Turns maintenance on and stops the workers.
  3. Recreates web (or the single container) with the new image. Its start dumps the database to /backups (the last 5 dumps are kept), then runs the migrations.
  4. Recreates the other services and waits for the health check.
  5. Turns maintenance off.

If any step fails, the updater restores the dump, starts the previous containers again, turns maintenance off, and reports what went wrong. The old containers are kept (renamed *-nxold) until the update has succeeded.

An older image never starts on a newer database. The start stops and names the dump to restore and the command. Use --allow-downgrade only together with a dump from before the newer version.

If the database could not be restored, the updater writes /config/update-broken (in the config volume). The panel refuses to start and nexovirt update refuses to run until you restore:

Terminal window
./nexovirt restore /backups/pre-<old>-<new>-<timestamp>.sql.gz

A successful restore removes the marker.

If a finished update could not clean up, containers named *-nxold stay. The next update refuses and names them. Remove them, or rename one back if its replacement is missing, then run the update again.

The panel button and automatic updates need the self-update profile. In .env:

Terminal window
COMPOSE_PROFILES=proxy,self-update
NEXOVIRT_UPDATER_TOKEN=<at least 16 characters, e.g. openssl rand -hex 24>

Run docker compose up -d. This starts the updater service and a socket-proxy that only the updater can reach. The socket proxy allows container and image calls only: no exec, no networks, no volumes, no build. Without the profile (or without the token) the panel shows the host command instead.

The bundled MySQL stays on its major version (8.4). A major upgrade is never part of an update and never automatic. Take a dump with ./nexovirt backup first and follow the MySQL upgrade notes of the release.

NexoVirt is developed and designed by Nucez Software, your partner for custom software and web design.