> ## Content Index
> Fetch the complete content index at: https://ostreff.info/llms.txt
> Use this file to discover other available public pages before exploring further.

# Automate NextCloud updates
- URL: https://ostreff.info/automate-nextcloud-updates/
- Published: 2021-12-31T10:45:36.000Z
- Updated: 2021-12-31T10:45:36.000Z
- Author: Jordan Ostreff
- Tags: FreeBSD, #NextCloud

Here is my script to automate NextCloud updates. They can be put into `crontab` in example:

```bash
#!/bin/csh

setenv nextcloud "/usr/local/www/nextcloud"

pushd $nextcloud
sudo -u www -D $nextcloud /usr/local/bin/php --define apc.enable_cli=1 updater/updater.phar --no-interaction
sudo -u www -D $nextcloud /usr/local/bin/php ./occ app:update --all
popd
```