I use Nextcloud extensively to run my little micro-business, and updating has often been a hassle, with regular timeouts and “Gad gateway” messages.
Then I discovered the Nextcloud CLI updater.
You can update Nextcloud (and apps) directly from the command line on your server.
Just move to the Nextcloud installation directory, execute the PHP script updater/updater.phar as the web-server user, and follow the instructions.
$ sudo -u www-data php updater/updater.phar
Nextcloud Updater - version: v32.0.1-41-g157dc25 dirty
Current version is 33.0.0.
Update to Nextcloud 33.0.1 available. (channel: "stable")
Following file will be downloaded automatically: https://github.com/nextcloud-releases/server/releases/download/v33.0.1/nextcloud-33.0.1.zip
Open changelog ↗
Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done
Start update? [y/N] y
Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done
Update of code successful.
Should the "occ upgrade" command be executed? [Y/n] y
Setting log level to debug
Repair step: ... <many lines>
Repair info: ...
Starting code integrity check...
Finished code integrity check
Update successful
Maintenance mode is kept active
Resetting log level
"occ upgrade" finished
Keep maintenance mode active? [y/N]
Maintenance mode disabled
Maintenance mode is disabled
I’ll never use the web interface again.
Leave a Reply