As advised in #3182, this is a follow up issue asking to improve the way how app updates can be performed.
Since apps can contain bugs and more notably security vulnerabilities, it would be an improvement to keep them up to date automatically. While updates can also introduce new bugs and incompatibilities, this might be a motivation to eventually include unit and integration testing in the app ecosystem for the future. But since this is still a valid concern, all proposed changes to Nextcloud are optional features, which need to be configured by an admin.
Proposals:
occ app:install command. Also having occ app:update would be awesome to complete the maintenance tools one has available via command line.config.php setting proposed in #3182 is one possibility.occ or updater.phar tools, would allow to perform app updates semi-automatic when necessary and fully automated when put into a cron job.The reasoning for my last proposal is that I currently have a cron job that executes php /var/www/nextcloud/updater/updater.phar --no-interaction once a day to keep my Nextcloud instance up to date. The only thing not updated automatically are additional apps like Contacts, Calendar, Tasks, etc. Having the described app update command available, I could imagine calling updater.phar with an option like --update-apps, or call occ afterwards to handle the app updates for me.
@exploide Agreed.
Yeah I have around 12 Nextcloud servers, I upgrade automatically to each Nextcloud release with ansible... but then I have to manually upgrade the apps.... that is sooo boring.
Please provide an automatic app update feature to be enabled in config.php.
This is posted here already but closed: https://github.com/nextcloud/server/issues/3182
A bit off topic. @barrydegraaff Can you point me to your Ansible role/playbook? I would be interested because I maintain a role for Nextcloud/ownCloud and Nextcloud upgrades/updates are currently not automated by it. Ref: https://docs.debops.org/en/latest/ansible/roles/debops.owncloud/introduction.html
it is not really a playbook, just a bash script that I let Ansible download and run,
in the mean time I make sure I have a backup, in case the upgrade fails.
https://github.com/Zimbra-Community/owncloud-zimlet/blob/soapServiceBarry/kvm/upgrade-nextcloud.sh
- Also having
occ app:updatewould be awesome to complete the maintenance tools one has available via command line.
This is done in #11053 -> closing this ticket now.
When adding a cron job sudo -u www-data crontab -e to configure automatic Nextcloud updates you need to add it like so:
15 5 * * * php -f /var/www/nextcloud/updater/updater.phar -- --no-interaction
Note the extra -- needed to pass the --no-interaction argument. Also 15 5 * * * tells cron to check for updates every morning at 15 minutes past 5.
Apologies for posting an offtopic comment to a closed issue but this thread was the only relevant search result
Most helpful comment
When adding a cron job
sudo -u www-data crontab -eto configure automatic Nextcloud updates you need to add it like so:15 5 * * * php -f /var/www/nextcloud/updater/updater.phar -- --no-interactionNote the extra
--needed to pass the--no-interaction argument. Also15 5 * * *tells cron to check for updates every morning at 15 minutes past 5.Apologies for posting an offtopic comment to a closed issue but this thread was the only relevant search result