This documentation is no longer maintained by the Turris team (although it
can be used by the community to share content). The current official
documentation is at docs.turris.cz.
If you have lost your NextCloud password, resetting it is quite easy.
Login as the root user via SSH
Execute the command sudo -u nobody php-cli /srv/www/nextcloud/occ user:resetpassword <username>
Enter a new password as instructed
Example:
sudo -u nobody php-cli /srv/www/nextcloud/occ user:resetpassword admin
Enter a new password:
Confirm the new password:
Successfully reset password for admin