Skip to main content

OCC Commands

OCC Commands allow for some function. OCC stands for OwnCloud Command, and is the command line interface tool for managing and configuring NextCloud (and OwnCloud). The OCC command allows admins to perform various tasks directly from the terminal without having to go through the web interface.

To execute them, SSH into the container, and navigate to the var/www/nextcloud directory and run this command:

sudo -u www-data php occ your command here

For example, adding the missing optional indices, this is the command to use: sudo -u www-data php occ db:add-missing-indices

You can also include the directory from the command without having to navigate there first. For example:

sudo -u www-data php /var/www/nextcloud/occ [command] [options]