Nextcloud Cannot update: You need to provide the unhashed…
So today I found myself with this error while trying to update. To solve it you must do the following:
- If you’re on a shared hosting, go to your cPanel and then go to TERMINAL
- You will need to generate your own secret, to do this just copy and paste it on the TERMINAL the text the website gives you on the nextcloud update page or copy this one and press ENTER:
php -r ‘$password = trim(shell_exec(“openssl rand -base64 48”));if(strlen($password) === 64) {$hash = password_hash($password, PASSWORD_DEFAULT) . “\n”; echo “Insert as “updater.secret”: “.$hash; echo “The plaintext value is: “.$password.”\n”;}else{echo “Could not execute OpenSSL.\n”;};’ - This will generate two things, your “updater.secret” and you “plaintext value“
- On your hosting’s file manager look for your config.php file for your nextcloud installation
- Open it and replace the new “updater.secret” with the one you generated on the TERMINAL, save your file on the host again.
- Paste the “plaintext value” that was generated on the nextcloud “Secret” text field at updater website and click Login
- Continue with your update.