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:


Note that I added php.ini by using cPanel to add a single entry of opcache.enable = true, and then appended the rest of the above entries to the bottom of the file.


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 mod_headers.c>
  Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"


Thanks for visiting.