INVALID_HASH - core/templates/layout.public.php

Invalid HASH

Sorry to hear you’re facing problems :Integrity check: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version :16.0.3
Operating system and version (eg, Ubuntu 18.04.2):
Apache or nginx version (I don’t know):
PHP version (I don’t know):

The issue you are facing:

Is this the first time you’ve seen this error? (Y):

Steps to replicate it:

  1. Opening …settings/admin/overview, I have an error:

  2. (There are some errors regarding your setup. * Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the [documentation] [List of invalid files…] / [Rescan…] * This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them. imagick

  3. Scaning with I have result: Rating A+

Running Nextcloud
Latest patch level
Major version still supported
Scanned at 2019-08-26 13:33:53

Unfortunately, I don’t know how to give more details. But I found this:

Technical information

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix


  • core
      • core/templates/layout.public.php

Raw output

[core] => Array
[core/templates/layout.public.php] => Array
[expected] => 27f754d16782bd1482bdf40a8677dcff90d80cf47206c948421e416e02d797b4048503bf79c78f0d563f6b8817027f6eb985985357a48e8600e325c94dfdf299
[current] => 7b3743244b6120848988318c0470391ffae1af0349435f883934591ddfd8838da0bef223a46663d0a20ef13c869b1e0010fd82abcb315ff846af65d0812b6683

Please help me to figure out, what is wrong, and how to solve.

Thank you

I would recommend to download the Nextcloud 16.0.3 archive and compare the file on your system with the one shipped in that archive. Most likely it hasn’t been correctly replaced which results in a different file hash.

Thank you!

That, was the solution. I didn’t do it, because I don’t know how to work with these things, but when I showed your answer to someone who knows how to work, it did in 5 minutes.

Thank you again!