Nextcloud, occ can't find php

Hy umbrel community

I upgraded Nextcloud to version 25.0.1 on Umbrel version 0.5.3 on a RaspberryPi.
On the Nextcloud configuration page it gives me the advise to run occ db:add-missing-indices to generate some missing indexes.

I did ssh on to umbrel an used the command

sudo -u www-data php occ db:add-missing-indices

and it gives me following error:

umbrel@umbrel:/ $ sudo -u www-data php occ db:add-missing-indices
sudo: php: command not found
umbrel@umbrel:/ $

It looks like it can’t find php.
How can I fix that?

Thanks for your help

I found the solution. Aftrer executing

sudo docker exec -u www-data -it nextcloud_web_1 php occ db:add-missing-indices

occ build the indices successfuly.

1 Like