Disabling two-factor auth on Nextcloud 15

So I installed Nextcloud, cool! I eagerly enforced 2FA also after setting everything up, why wouldn’t I?

Probably because I am now actively locked out of the only admin account I had on the system. Oops.

To disable the two factor enforcement, log into the system Nextcloud runs on, and switch to the user the web app is running under if necessary. Then, switch to the app directory such as with

cd /var/www

Then execute:

php occ twofactorauth:force --off

Now go set your 2FA device up before you forget again!

Leave a Reply

Your email address will not be published. Required fields are marked *