Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
Thanks a lot!! It would have gotten me ages to find this. Is there any official documentation where you found this, or did you stumble upon it?Just ran into the same issue. Transpires the database credentials are in text files in the root directory of the jail. To access from the UI go to the Jails from the sidebar, then click the 3 vertical dots to the right of your Nextcloud jail to open the menu, then select "Shell".
Once in the shell, type "ls" (without the quotes) and you'll see the dbname, dbuser and dbpassword files. To get your credentials, just cat them (e.g.: "cat dbname").
Is there any official documentation where you found this, or did you stumble upon it?
(ps: for those who afterwards run into the "too many redirects" issue, the solution is here -> https://help.nextcloud.com/t/freebsd-nextcloud-13-0-1-update-too-many-redirects-error-bug/30494/3 )
Thank you! I'm running in the "too many redirects" issue... I don't really understand what i have to do in order to fix it, could anyone explain it here? (sorry for the stupid question)
'apps_paths' => array ( 0 => array ( 'path' => '/usr/local/www/nextcloud/apps', 'url' => '/apps', 'writable' => true, ), 1 => array ( 'path' => '/usr/local/www/nextcloud/apps-pkg', 'url' => '/apps-pkg', 'writable' => false, ), ),
If you have used the default location, you can use the following commands to fix it:Thank you! I'm running in the "too many redirects" issue... I don't really understand what i have to do in order to fix it, could anyone explain it here? (sorry for the stupid question)
cd /usr/local/www/nextcloud
su -m www -c “php ./occ config:import < /usr/local/share/nextcloud/fix-apps_paths.json”
To fix the redirect issue, I just edited the config.php file (can't remember the exact path as I deleted the plugin and installed NC in a jail myself as I wanted it configured differently), but think it was something like /usr/local/www/nextcloud/config/config.php). The app_paths, as described in the link above, need to be added to the $CONFIG array, as the plugin installs NC from the FreeBSD package which requires the additional config. So this is what you'd add:
Code:'apps_paths' => array ( 0 => array ( 'path' => '/usr/local/www/nextcloud/apps', 'url' => '/apps', 'writable' => true, ), 1 => array ( 'path' => '/usr/local/www/nextcloud/apps-pkg', 'url' => '/apps-pkg', 'writable' => false, ), ),
However, that's not the 'correct' way to do it - normally to avoid messing up your installation, you're supposed to edit the config using the occ commands, but I couldn't be bothered with that as was only a test install.
danb35 is right - this is really is something you'd expect the plugin installation to automate, so it's a bug. I'll try to remember to file it when I've got a moment, unless someone beats me to it.
https://forums.freenas.org/index.ph...llation-of-nextcloud-14-in-iocage-jail.62485/can you decribe how do you manage to install NC in a jail? or point me to a install procedure?