Updating PHP in Nextcloud container/vm

Ayrton5

Member
Oct 23, 2023
25
9
8
I have a spare box running PVE which I use as a sandbox for new applications. I am messing around with NextCloud at present. When I get it to my liking I will port it to my live machine via PBS. I've been using proxmox about a year now, but I'm still pretty inexperienced, and I get most things done by copying and pasting from guides.

I created a container using turnkey-nextcloud as found in the templates list. I got this running and updated nextcloud several times till it was up to date, but I got this message once I was up to 33:

You are currently running PHP 8.2.29. PHP 8.2 is deprecated since Nextcloud 33. Nextcloud 34 may require at least PHP 8.3. Please upgrade to one of the officially supported PHP versions provided by the PHP Group as soon as possible.

I have also created a VM and installed nextcloud using the helper script. That's running now and I'm just going through the updates, but as it installed I noticed that the php version being used here was also 8.2. So if I go past Nextcloud 32 I will see the same thing.

What is the business-as-usual process for getting a new version of php? Does it differ between CT and VM? Should I just leave my nextcloud at 32? Presumably at that point there arises a security risk so I guess the answer to that is no. At this point I don't mind whether the advice is based on a container or a VM, in fact I'd welcome any opinions on which is the better option for this job.
 
Upgrade your container version by changing the ct image I guess, at least that's how it works with docker you just replace the image/modify the Dockerfile while keeping your volumes/mounts.
 
LXCs are different than Docker images. To the OP, you can use standard Debian commands (apt) in an LXC to update to the new version of PHP. But I am not sure if what you need is in the backports repo or some other 3rd party repo.

But, honestly, I think you may spend a lot of time and not be happy with the outcome. You should seriously consider switching to docker and using the Nextcloud AIO docker image. It is the officially supported installation method. I don't believe Turnkey has updated their LXC base Debian distro in a long while. On their website it says they haven't updated it since December 2024.