Endless login loop on Synology

Nextcloud version (eg, 18.0.2): 18.0.4
Operating system and version (eg, Ubuntu 20.04): Synology DSM
PHP version (eg, 7.1): MariaDB 10

Hello all, I have installed NextCloud (non Docker version) on my home Synology DSM and things have been ticking along without much trouble.

Today however, each time I attempt to login as usual via my browser, I enter the username and password however I am returned to the same login page via an endless loop and the address bar shows;

I have searched for any possible solutions, however all suggestions found quickly exceed my abilities.

Can anyone please advise how to fix?

Kind regards.

Can you try to reset your password over occ comand?

Resetting a lost admin password


I SSH in and type;
sudo -u www-data php /var/www/nextcloud/occ user:resetpassword admin

However it returns the following error;
sudo: unknown user: www-data
sudo: unable to initialise policy plugin

Go to the root folder of your installation and type “ls -la” and have a look which is your webserver user.


After navagating to the installation folder and typing ls - la I get the following;