Safety & set-up warnings database

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): `25.0.13
Operating system and version (eg, Ubuntu 20.04): ubuntu (webhosting)
Apache or nginx version (eg, Apache 2.4.25): unkown (webhosting)
PHP version (eg, 7.4):8.1.

The issue you are facing:
I get the following messages:
I shall optimize the database using the following commands:
occ db:add-missing-indices
occ db:add-missing-primary-keys
occ db:add-missing-columns
occ db:convert-filecache-bigint
In addition: By executing these commands, these outstanding changes can be applied manually.
I have tried to use these commands in the nextcloud directory of my webhosting. But it is said to me that these commads are unkown.

I am simply overwhelmed by it. Is there a detailed instruction for this problem? What exactly should I do?

Is this the first time you’ve seen this error? (Y/N):

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


The output of your Apache/nginx/system log in /var/log/____:



Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.


Hi @barnycloud

The occ command must be executed as the web server user through PHP.

The former is usually already given when you are logged into the command line of a web hosting account. The latter depends on how your hosting provider has set things up:

You may be able to simply type the following…

php occ db:add-missing-indices

Or maybe you need to specify the path to the binary, which might look something like in the following example:

/usr/bin/php8.1-cli occ db:add-missing-indices

Instructions on how to execute PHP commands can usually be found in the support/help section of the hosting provider’s website.

Oh… and you need to run the command from inside the Nextcloud installation folder, otherwise you’ll also have to specify the path to the occ file in your command.

Thank You very much for Your kind suggestuions. I will try it!
Happy Christmas!