OCC Commands

Created on 2024-07-29 • ID: ST-01D20

OCC commands

OCC is Nextcloud’s command-line interface (the name OCC origins from “ownCloud Console”). You can manage your Storage Share and its apps with the OCC command feature. You can perform many common server operations with OCC, such as manage apps and users, LDAP setting, and more. You can also use it to repair the Storage Share if there are errors, or to disable the maintenance mode after an update.

Where to find OCC commands

  1. Log onto konsoleH.
  2. Choose the correct instance.
  3. On the left, click on the following menu tabs Settings; Configuration; OCC.

How to execute OCC commands

You can choose the command you want to use from a dropdown menu. Some OCC commands need additional parameters. For example, if you want to disable an app, you need to specify the name of the app as the additional parameter. If you are unsure which command to use, see the list of available OCC commands below the menu. Each OCC command has its own short description. Some OCC commands, such as file:scan --all take some time for execution; therefore, we recommend that you choose to get the response output via mail.

Warning notice

If you want to run a command which changes or deletes apps, app data, or an app config, the following warning will be displayed: Running this command may affect the functionality of the Storage Share or delete data permanently. Are you really sure that you want to execute this command? This warning is a reminder that there is always a small risk when executing OCC commands. It is extremely rare that an OCC command will harm an instance or its data in an unexpected way. The warning notice should only remind you of this unlikely situation. If a command does not work as expected, and data is corrupted or lost, you can restore one of the automatically created backups.

Instance not accessible

First, please check that we at Hetzner have not announce any maintenance work for your instance and are not still doing any maintenance work. Sometimes a Storage Share becomes inaccessible. That can happen if an app is misconfigured, if an malfunctions, or if there is a failed OCC command. If this happens to you, please first use the OCC command status, which will show you why the instance is actually not working. It could be one of these causes:

"Maintenance mode"

You could use the OCC command maintenance:mode --off to disable the maintenance mode. If this does not help, please open a support ticket and our Support Team will be happy to help you.

"Update needed"

If you installed or updated an app and now your Storage Share is stuck in maintenance mode, you can solve this problem with the OCC command upgrade, which will update your apps and resolve the issue. Sometimes the instance will still remain in maintenance mode. If that is the case, you can trigger the maintenance:mode --off command and your instance will be accessible again.

"Internal server error"

In this situation, there is a problem with an installed app or attached external storage. If the OCC commands does not resolve the problem, please open a ticket with some brief information about the problem and a timestamp when it first occurred, and our support team will be happy to help you.

Required OCC command is not in the list

We check common OCC commands and add only the ones which will not damage your Storage Share and its data in unexpected ways or cause problems for the host system. If you want to use a command that is not on the list, you can open a ticket, and the support team will check if the command is safe to execute and run it for you.

Table of Contents