NextBox: occ command

Hi, I’m trying to setup a 2AF for all NextCloud users with Twofactor-gateway but I need to run occ command from a shell (Admin Documentation - Nextcloud TwoFactor Gateway).
I can connet to the NextBox via ssh but I cannot run occ as netxuser nor with sudo. The path of executable of occ isn’t in $PATH probably or isn’t instlled?

nextuser@nextbox:~ $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

nextuser@nextbox:~ $ occ --help -bash: occ: command not found

Hey @aborrone,

Yes, occ is not in $PATH as Nextcloud runs in a Docker container, to run occ you’ll have to run the following as root (change to root using sudo -s as nextuser):

docker exec -it -u www-data nextbox-compose_app_1 /var/www/html/occ

best

Thankyou!

1 Like