Since at least version 17 of the QPG release, Nextcloud is unable to be installed on a clean machine with a MariaDB backing db. I have gone through every single possible trick for manually permissions and nothing works. I have simply downloaded another older version 15.0.0 for the record - though a newer one that than may work - and installed with absolutely zero issues. I am not simply updating my install and going from there. Something is certainly messed up with the sql permissions on the latest qpkg packages, and you can see people posting errors about it and people trying to provide solutions all over the internet. This is the second time ive had to install with this method, so i am confident sharing it as a working method. I am now attempting to restore all of my data to see if it will work, if not ill just have to manually upload everything again which is a huge pain, but at least the install is working now.