I had the latest version of Nextcloud running just fine for over a year on an Ubuntu 20.04 LTS server. I upgraded the Ubuntu server to Jammy 22.04 LTS. After OS update, access to nextcloud webpage returns a garbage html page. After a lot search, it turned out PHP8.1 in Ubuntu 22.04 is not supported. Here is the unresolved post:
https://www.reddit.com/r/NextCloud/comments/ua8xiy/upgrade_to_ubuntu_2204_broke_my_nextcloud_server/
There is no instructions from NC what to do with broken servers. I spent several hours installing older versions of PHP one by one, starting with PHP8.0, and setting it as default PHP, following stackexchange comments. It turned out, in addition to PHP itself, there is something else called "PHP modules" that should be installed separately. But installing modules for 8.0 fails due to a vague dependency. Tried PHP and PHP modules for 7.3 and 74. This time there is no dependencies; but nextcloud again returns the same garbage HTML. I gave up.
Next, let's install Nextcloud using docker:
https://hub.docker.com/_/nextcloud
Running the container, there is a message "we strongly discourage using SQLite". OK, you provide a default software and you discourage your own default. So I choose MYSQL, and I get error cannot connect to database
Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTAT
No instructions in docker page how to set up, and what are database user and pass and port.
I searched internet. It turns out that MYSQL is not inside NC docker; you have to set it up externally. Why?!
I wasted another 2 hours setting up MYSQL user and database outside docker, following stackexchange (not nextcloud), reaching a point where the folllowing works:
mysql --user=nextcloud_user --password='123456' nextcloud_db
After some hassle, I found the port number too. Still nextcloud returns the above error, which is apparently infamous on Internet!!
Why don’t you support an LTS upgrade of one of the most widely used operating systems?
Why do you provide a docker image with a default that you discourage? Include an option that you encourage, such as MYSQL, in your docker, so that the user only will enter a NC username and password.
Why don't you provide the required parameters for other options that you actually encourage, or provide instructions how to obtain those?
Why MYSQL is set up correctly on command line, but your software doesn't recognize it?
By the way, I am not an expert, but there is no such thing as "database password". There is user and user password. Please use correct terminology.