Issues upgrading Nextcloud 29.0.0 1.6.60 to 2.0.6 on Dragonfish

I upgraded my system from 23.10.2 Cobia to 24.04.1.1 Dragonfish yesterday, everything has been great except one application I use daily: Nextcloud. I am using the official TrueNAS app, not Truecharts.

While I was still running Cobia I kept Nextcloud on chart version 1.6.60, I was unable to upgrade to 2.0.6 since I was not running a point release. Oddly enough I was also unable to upgrade to 1.6.61 - it was not one of the upgrade options in the GUI. Since I use host paths for the configs and data, I deleted the 1.6.60 container and installed 1.6.61, pointed the container back to the same host paths. After doing this, I can no longer access the web GUI within the container. I only get this page:

"Update needed

Please use the command line updater because updating via browser is disabled in your config.php.

For help, see the documentation."

upgrading to 2.0.6 yields the same result. I thought upgrading the whole system to Dragonfish might fix it but still the same result. Am I able to follow the Nextcloud documentation to fix this or is there a different way to fix this for TrueNAS? I am a bit of a n00b with TrueNAS Scale so any advice is appreciated. Thank you

I tried editing the config.php file in /var/html/config/ but it says I don’t have permission to make changes.

Perhaps not helpful, but it’s this kind of complexity that led me to run nextcloud in a linux VM.

it’s ok - I am at the point researching this issue where I am planning to transfer my data to a VM. I guess this is just a bad time to be running apps on Scale with the transition to Docker/Docker Compose coming in the next release. If I can figure out how to edit the config.php file I may be able to get it working

Just stumbled across this post in search of a solution to a different problem, though I thought I’d add in my findings. You can modify the code below to be run from the TrueNAS shell. Use it to run commands within the nextcloud kubernetes shell as a specific user.

:Tips:
Use ls -al to determine perms
Use k3s kubectl get namespaces to determine your app’s namespace
Code runs as root within TrueNAS, but runs commands within your NextCloud Kubernetes deployment as a specified user (www-data in this case)

:lols:
This was accidentally discovered while trying to resolve cron jobs not running background tasks. I made a truenas cronjob which ran every 5 minutes for NextCloud. Was a fun adventure which ended up working, yay! …then I found the check box for cron in the NextCloud Setup Template </3

regardless…The example below, if this paste goes well, should run whoami within your NextCloud Kubernetes deployment as the www-data user and repeat back “www-data”.

#Script runs as root in order to run commands as the specified user within the NextCloud Kubernetes app
#Remember to chance the 'exec -n "IX-CLOUDZ"' & 'get pods -n "IX-CLOUDZ"' to your specific App name in kubernetes
#Run 'k3s kubectl get namespace' to discover your namespace
#Another variable you MAY need to change is 'pod.name="nextcloud"'  Your pod.name= may be different

sudo su

k3s kubectl exec -n ix-cloudz $(k3s kubectl get pods -n ix-cloudz -l pod.name=nextcloud -o jsonpath="{.items[0].metadata.name}") -- bash -c "su -s /bin/bash www-data -c 'whoami'"