Nextcloud security warning issue on TrueNAS

LDM900 Posted messages 73 Status Member -  
LDM900 Posted messages 73 Status Member -
Hello,

I recently installed Nextcloud on TrueNAS SCALE. However, in the overview I have this displayed

I would therefore like to resolve at least the red issues and the missing databases. Regarding the databases I have already done a lot of research but I often end up with the problem: 'sudo: php: command not found' or '/bin/sh: 89: sudo: not found' if I run the command via the dockers (command which is: 'sudo -u www-data php occ db:add-missing-indices')

hoping for your help

Best regards

5 answers

  1. LDM900 Posted messages 73 Status Member 1
     

    Well, I did some new research in English and I came across this answer that solves the problem of missing indexes. The steps to follow are:

    • go to the application menu
    • click on nextcloud >
    • click on shell in "workload"
    • container = nextcloud
    • pods = nextcloud-#$#$#$#$#$#-$$$$ (#numbers$characters) (not postgres- or nginx-)
    • commands = /bin/bash
    • "choose"

    write

    • su
    • su -m www-data -c 'php /var/www/html/occ db:add-missing-indices'
    0
  2. LDM900 Posted messages 73 Status Member 1
     

    After new research I removed the white error "your installation has no default prefix" by adding:

     default_phone_region' => 'FR',

    to the config.php file. To access it you need to go to the TrueNAS Scale shell and then type in order:

     cd .. cd mnt/"your_pool-dapplication"/ix-applications/release/"your_instance_name_nextcloud"/volumes/ix_volumes/ix-nextcloud_data/config vi config.php
    0
    1. LDM900 Posted messages 73 Status Member 1
       

      I forgot to write the " ' " before, so what needs to be added:

       'default_phone_region' => 'FR', 
      0
  3. LDM900 Posted messages 73 Status Member 1
     

    Regarding the error: "Unsecured site access over HTTP," I solved it thanks to some research and when I realized that Nextcloud and TrueNAS have a partnership. To do this I did:

    • go to the Applications menu
    • click on Nextcloud >
    • Edit
    • set a choice in Certificate Configuration (" 'freenas_default'certificate" is provided by default)
    • set a value in "Proxy timeouts (Seconds)" to '60' by default on a fresh install

    which added the following errors in yellow the first one and in white the other two:

    • Unable to verify JavaScript support. Please manually check if your web server serves `.mjs` files using the JavaScript MIME type.
    • Your web server is not configured correctly to resolve "/.well-known/caldav". More information can be found in our documentation.
    • Your web server is not configured correctly to resolve "/.well-known/carddav". More information can be found in our documentation.

    The 2nd and 3rd errors are only visible when I access it via my DNS but not with my IP nor locally

    0
    1. LDM900 Posted messages 73 Status Member 1
       

      I’m getting back to this message because when I tried to redo a cloud I ran into the issue where the local IP was being resolved automatically instead of my domain name, so I opened another ticket and found the solution. For novices like me, here are the detailed steps:

      • go to the TrueNAS shell
      • enter the following commands
      •  cd .. cd mnt/"your_pool-application"/ix-applications/release/"your_instance_name_nextcloud"/volumes/ix_volumes/ix-nextcloud_data/config vi config.php
      • change " 'overwritehost' => 'localhost' " to "'overwritehost' => 'your_domain.com' "
      • quit the file (:exit when you are no longer in insert)
      •  vi reverse-proxy.config.php
      • modify "$overwriteHost = getenv('OVERWRITEHOST');" to "$overwriteHost = 'your_domain.com';"
      0
  4. LDM900 Posted messages 73 Status Member 1
     

    Well, I did some new research in English and I came across this conversation that solves the problem of missing indexes. The steps to follow are:

    • install the Redis application
    • modify the Nextcloud config file
     cd .. cd mnt/"your_pool-application"/ix-applications/release/"your_nextcloud_instance_name"/volumes/ix_volumes/ix-nextcloud_data/config vi config.php
    • add the following script replacing "192.168.1.*" with the IP of your NAS and "TOPSECRET" with the password created at the Redis installation
    •  'filelocking.enabled' => true, 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => '192.168.1.*', 'port' => 30036, 'timeout' => 0.0, 'password' => 'TOPSECRET', // Optional, if not defined no password will be used. ),
    0
  5. LDM900 Posted messages 73 Status Member 1
     

    In the other simple-to-solve problems "Server has no maintenance window start time configured." you just need to add

     'maintenance_window_start' => 1, 

    to the config.php file

    0