Upgrade Nextcloud in FreeNAS jail

Signed up to say the following :slight_smile:

If running nextcloud inside FreeNAS jail, launch the jail shell from FreeNAS and run:

$ cd /usr/local/www/nextcloud
$ su -m www -c /bin/sh
$ php ./occ maintenance:mode --off

If the upgrade was stuck then follow through with:

$ php ./occ update
2 Likes

Thanks for letting us know. I moved to a new topic since your environment is different to the original post. Instead of changing the user, you can also run a single command as a different user:

su -m www -c 'php ./occ maintenance:mode --off'
1 Like

Hi all,
i wanted to update nextcloud from 25.0.5 , to 25.0.6 using the updater app.

The update is stuck.

I can no longer reach nextcloud via the browser.

So I went to the Nextcloud FreeNAS jail in the console as described above and typed “php ./occ update”.

Result: “could not open inputfile ./occ”.

How do I get the aborted update of nextcloud to work again?

Do I need to delete something to make this work again.

Even restarting nextcloud or its jail did not help.

Thanks for your support

That only works when you are in the folder where the occ file is (and that is where nextcloud is installed). For FreeBSD this can be in /usr/local/www. For Linux-like systems it is often within /var/www/..., in the worst case you need to use some file search tools (find, locate, …)

Exclusively in /root in nextcloud-jail there is the file occ.sh.

If I go to the home directory of root and enter the above command, I get the same error message.

So the question is, why is occ not where it should be?

You have installed Nextcloud at /root? What is in that occ.sh (normally this occ is also a php file, like other code from Nextcloud, perhaps it’s something from the jail environment)?