Problems Updating PHP from 8.0 to 8.2 in TrueNAS jail


I am pretty new to networking and I am having trouble updating PHP in my TrueNAS jail.

I went the plugin route and by default it installed PHP 8.0.30, which it recommends to upgrade in the admin settings.

I have tried to follow other forum guides and even tried ChatGPT to help me install the newer PHP, but I keep running into errors. A lot of the guides are old and just end up not recommending the update, or go through the process of downgrading after breaking something. What is the best way to upgrade this?

I am using:
FreeBSD Nextcloud 13.1-RELEASE-p9 FreeBSD 13.1-RELEASE-p9 n245429-296d095698e TRUENAS amd64

Message from Nextcloud:

  • You are currently running PHP 8.0.30. PHP 8.0 is now deprecated in Nextcloud 27. Nextcloud 28 may require at least PHP 8.1. Please upgrade to one of the officially supported PHP versions provided by the PHP Group as soon as possible. For more details see the documentation :arrow_upper_right:.

Using pkg install php82 gives a 404 error on the Nextcloud domain


I went through this on FreeBSD and installed all packages I had on php80 with php82, and then it worked. You have to perhaps fix paths in the configuration, e.g. in my case the socket path didn’t contain a version number (here nginx config):
fastcgi_pass unix:/var/run/php-fpm.sock;
if you have a version within this path, you need to fix that. This is just an example, no idea how this is set up for you.

If you check the logs, it will often give more details on what is failing, perhaps it’s the path, a permission, …

I don’t know the TruNAS system, from that post: Updating php version of nextcloud jail manually from 8.0 to 8.1 | TrueNAS Community it seems to be doable with pkg manager.