Nextcloud’s occ
command (origins from “ownCloud Console”) is Nextcloud’s command-line interface.
You can perform many common server operations with occ
, such as installing and upgrading Nextcloud, manage users, encryption, passwords, LDAP setting, and more.
occ
is in the nextcloud/
directory; for example /var/www/nextcloud
on Raspbian. occ
is a PHP script.
You must run it as your HTTP user to ensure that the correct permissions are maintained on your Nextcloud files and directories.
$> ssh $user@raspberrypi
$> sudo -u www-data php /var/www/nextcloud/occ twofactorauth:enforce --off
$> sudo -u www-data php /var/www/nextcloud/occ app:update --all
$> sudo -u www-data php /var/www/nextcloud/occ app:install twofactor_totp
$> sudo -u www-data php /var/www/nextcloud/occ app:enable twofactor_totp