Reset nextcloud admin password

Hi, sorry but I’m not so skilled …
I need to reset the admin password of nextcloud and looking for on Nextcloud manual I found that I have to execute:

sudo -u www-data php /var/www/nextcloud/occ user:resetpassword admin

but the db in Nextbox is in a container: right?
So, I have to prepend:

docker exec -it -u www-data nextbox-compose_app_1

to the php command? or another container (for example mariadb…)?
Thanks a lot for any suggestion

Hey @aborrone

yes that should be right, you can also search the forums here to find other examples of how to invoke occ inside the container, try searching for “docker exec”.


Thanks a lot.
The right command is:

sudo -s docker exec -it -u www-data nextbox-compose_app_1 /var/www/html/occ user:resetpassword *username*
1 Like