How to fix the initial warnings

nextcloudOn a clean install of Nextcloud you may find that there are some security and setup warnings. This article documents how I fixed the warnings that I've seen.


Nextcloud Admin

Start by logging on to your Nextcloud instance with an admin account.

  1. Go to Cog symbol > Admin page.

At the top of this page you might see some warnings, here are some of the warnings and fixes.

 

PHP Opcache

The PHP Opcache is not properley configured...

Find the php.ini file on your web server and append the following contents:

opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1

 

Header errors

You might get a list of header errors.  In this case edit the .htaccess file and replace the following:

  <IfModule mod_env.c>
    # Add security and privacy related headers
    Header set X-Content-Type-Options "nosniff"
    Header set X-XSS-Protection "1; mode=block"
    Header set X-Robots-Tag "none"
    Header set X-Download-Options "noopen"
    Header set X-Permitted-Cross-Domain-Policies "none"
    SetEnv modHeadersAvailable true
  </IfModule>

with...

<IfModule mod_headers.c>
  Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>

 

Thanks for visiting.