Nextcloud - reset admin password

I’ve been running the LinuxServer Nextcloud Docker container on unRAID for about a year and all of the sudden I can’t login. I use Bitwarden for password management so I know I’m not forgetting my password or making a typo. I tried the “Forgot my password” link but I never get an email.

I found the following instructions to reset it through the console but the path doesn’t exist in the Docker container. How can I fix this?

You can try to run that command in the docker container.

Use docker exec -it [containername] bash to access the container

and then try the command from your link.

For me, the command is:
docker exec -it nextcloud bash

1 Like

sudo -u abc php7 /config/www/nextcloud/occ user:resetpassword admin

Sudo to the user abc, which is the default user in our container and the pseudonym for your UID, php7 as we’re using php7 not php5, which would be php, then the path to the occ binary, then the command as suggested from the link you posted.


That SEEMED to work in that it said successfully reset password. The problem is Nextcloud still says wrong username and password when I try to login. I have reset the password 3 times now with really simple passwords and I still can’t login. What now?

Absolutely no idea…

I mean, I have no clue how Nextcloud stores it’s auth creds, tried asking on their forum as I don’t see this as something caused by our container, but rather a Nextcloud issue.

Will do. Thanks for your help guys!

Just hitting back here to see if anyone can help at all. I know it isn’t a problme with the LSIO container but he Nextcloud forum hasn’t been much help at all and I (and some of my family) haven’t had access to Nextcloud for a while now. A couple users still can through the Android app for whatever reason.

I assume reinstalling the container won’t fix anything since everything will still be in the appdata folder and/or the mysql db. I don’t want to break stuff or cause files to become disassociated with their owners so I am hesitant to just start trying things.

I am able to get into the db via the MariaDB container so that seems to be okay. Here are the logs if anyone is interested in taking a look:


Here is the other log:


Worked a treat, thank you!