I always had terrible trouble keeping it (and before it, Owncloud) updated and in sync with available dependencies on my Debian host. A few years ago, when I built a new NAS, I installed a snap, and that's been the ticket. It's pretty close to flawless now.

I'm not a huge "run everything in a container" guy, but Nextcloud is one of those things I absolutely will always run in a container. It's too much of a beast for me to have any desire to try to manage package versions and fixing it if something breaks.

When I ran OwnCloud (on Debian), I installed from their APT repo, and one "apt upgrade" handled everything. It was nice and easy, and I didn't have any problems with it.

NextCloud uses its own updater* (which I don't like), and aside from some recent MariaDB snafu it's been very low maintenance.

  (*)sudo -u www-data php /var/www/nextcloud/updater/updater.phar

Yeah, I eventually gave up on self hosting Nextcloud because of incompatibilities with PHP(-FPM), iirc. They were always lagging behind and it became a hassle to mantain. I ended up replacing all the parts I used with other single purpose software, and it's been a better experience overall.

Arch Linux added php-legacy and php-fpm-legacy, which tracks (I think) the oldest supported PHP release, a couple of years ago. After I switched to that it's been pretty smooth sailing.