Nextcloud error on Truenas 12

Hello, after instalation, though it is working, I get this error:

There are some warnings regarding your setup.

  • PHP does not seem to be setup properly to query system environment variables. The test with getenv(“PATH”) only returns an empty response. Please check the installation documentation :arrow_upper_right: for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.

  • Some app directories are owned by a different user than the web server one. This may be the case if apps have been installed manually. Check the permissions of the following app directories:

    • /usr/local/www/nextcloud/apps-pkg/accessibility
    • /usr/local/www/nextcloud/apps-pkg/activity
    • /usr/local/www/nextcloud/apps-pkg/admin_audit
    • /usr/local/www/nextcloud/apps-pkg/cloud_federation_api
    • /usr/local/www/nextcloud/apps-pkg/comments
    • /usr/local/www/nextcloud/apps-pkg/contactsinteraction
    • /usr/local/www/nextcloud/apps-pkg/dashboard
    • /usr/local/www/nextcloud/apps-pkg/dav
    • /usr/local/www/nextcloud/apps-pkg/encryption
    • /usr/local/www/nextcloud/apps-pkg/federatedfilesharing
    • /usr/local/www/nextcloud/apps-pkg/federation
    • /usr/local/www/nextcloud/apps-pkg/files
    • /usr/local/www/nextcloud/apps-pkg/files_external
    • /usr/local/www/nextcloud/apps-pkg/files_pdfviewer
    • /usr/local/www/nextcloud/apps-pkg/files_rightclick
    • /usr/local/www/nextcloud/apps-pkg/files_sharing
    • /usr/local/www/nextcloud/apps-pkg/files_trashbin
    • /usr/local/www/nextcloud/apps-pkg/files_versions
    • /usr/local/www/nextcloud/apps-pkg/files_videoplayer
    • /usr/local/www/nextcloud/apps-pkg/firstrunwizard
    • /usr/local/www/nextcloud/apps-pkg/logreader
    • /usr/local/www/nextcloud/apps-pkg/lookup_server_connector
    • /usr/local/www/nextcloud/apps-pkg/nextcloud_announcements
    • /usr/local/www/nextcloud/apps-pkg/notifications
    • /usr/local/www/nextcloud/apps-pkg/oauth2
    • /usr/local/www/nextcloud/apps-pkg/password_policy
    • /usr/local/www/nextcloud/apps-pkg/photos
    • /usr/local/www/nextcloud/apps-pkg/privacy
    • /usr/local/www/nextcloud/apps-pkg/provisioning_api
    • /usr/local/www/nextcloud/apps-pkg/recommendations
    • /usr/local/www/nextcloud/apps-pkg/serverinfo
    • /usr/local/www/nextcloud/apps-pkg/settings
    • /usr/local/www/nextcloud/apps-pkg/sharebymail
    • /usr/local/www/nextcloud/apps-pkg/support
    • /usr/local/www/nextcloud/apps-pkg/survey_client
    • /usr/local/www/nextcloud/apps-pkg/systemtags
    • /usr/local/www/nextcloud/apps-pkg/text
    • /usr/local/www/nextcloud/apps-pkg/theming
    • /usr/local/www/nextcloud/apps-pkg/twofactor_backupcodes
    • /usr/local/www/nextcloud/apps-pkg/updatenotification
    • /usr/local/www/nextcloud/apps-pkg/user_ldap
    • /usr/local/www/nextcloud/apps-pkg/user_status
    • /usr/local/www/nextcloud/apps-pkg/viewer
    • /usr/local/www/nextcloud/apps-pkg/weather_status
    • /usr/local/www/nextcloud/apps-pkg/workflowengine
  • A background job is pending that checks for user imported SSL certificates. Please check back later.

  • Your web server is not properly set up to resolve “/.well-known/webfinger”. Further information can be found in the documentation.

  • Your web server is not properly set up to resolve “/.well-known/nodeinfo”. Further information can be found in the documentation.

  • Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add “default_phone_region” with the respective ISO 3166-1 code :arrow_upper_right: of the region to your config file.

  • No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation.

  • The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.

    • Missing index “fs_size” in table “oc_filecache”.
  • MySQL version “5.7.33-log” is used. Nextcloud 21 will no longer support this version and requires MySQL 8 or higher.

Please double check the installation guides :arrow_upper_right:, and check for any errors or warnings in the log.

Check the security of your Nextcloud over our security scan :arrow_upper_right:.

So, what is the question?

At nearly every point there is a link to support you.
You can search this forum to get your questions solved.

btw. you ignored the support template while filing your topic.

Hi Johnbajer,

2nd problem:
please check this folder /usr/local/www/nextcloud/apps-pkg. Make sure the this folder and all its contents are owned by www-data. you may need to use the command “chown www-data:root apps-pkg/*” and change the permission if needed!

3rd problem:
run the cron job command. If you are using docker, then issue the following commands:

→ docker ps
→ docker exec -t -u www-data CONTAINERNAME php -f /var/www/html/cron.php

if you are not running docker, then find out the command to run your cron job.

6th problem:
go to your config.php file and add the line:

→ ‘default_phone_region’ => ‘DE’,

I inserted DE because i live in Germany.

8th problem:
run the occ command:

→ db:add-missing-indices

the easiest way to do this if by installing the app “OCC Web” inside your NC.

I hope this help.

1 Like

Nope, this app is unsupported since v18. Do not use it!
For details see adphi/occweb - occweb - Gogs

Большое спасибо за информацию!!!