Nextcloud CLI updater

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.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post’s permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post’s URL again. (Find out more about Webmentions.)