Once a day the shop asks extago.com/uds/torgash/ whether there’s a new version, and the bell in the admin tells you about it. The update is installed from System → Updates, where the update server’s address can also be changed.

A package is installed only if its Ed25519 signature matches a key built into the shop’s own code. The update server is trusted with availability, never with code: even a hijacked server can’t make the shop install someone else’s package. Versions only ever go forward.

The database is backed up before installing. If anything fails, the previous version comes back by itself. To go back after the update is in, use the server’s console:

php artisan torgash:update-rollback

If artisan itself won’t start, php storage/app/update/rollback.php does the same rollback without booting the application.

When the update server can’t be reached

Since 0.2.1 a shop that cannot reach extago.com asks the releases on GitHub by itself — github.com/extago/torgash. They are the same signed packages, checked the same way, so there is nothing to set up. The update address in System → Updates may also be https://github.com/extago/torgash itself.

If GitHub can’t be reached either, the update is installed from a file — the same signed package, the same checks, the same backup:

  1. Download the update package torgash-X.Y.Z.zip (not the -install archive) wherever it opens.
  2. System → Updates → Install from a file: upload it. The shop checks the signature and shows the version.
  3. Press “Install X.Y.Z”.

If the file is larger than PHP’s upload limit, put it into storage/app/update/incoming/ by FTP and reload the page — it shows up in the same list. From the console, the same is done by:

php artisan torgash:update /path/to/torgash-X.Y.Z.zip