Preview Generator on nextcloud box [snap]

I’m trying to configure Preview Generator in my nextcloud box
I enabled the app from nextcloud app store

Went to ssh to execute the following command

sudo -u www-data php /snap/nextcloud/current/htdocs/occ preview:generate-all

and the message I get is

sudo: php: command not found

which is weird. Isn’t it supposed to be installed already?

One more question. it’s been recommended to use the “screen” command to run the Preview Generation process in the background while in ssh. though the “screen” command cannot be found in snap. I will have to apt-get it. Is it fine to do so in nextcloud box [which is essentially an ubuntu snappy core]?

Oops, I totally blanked you’d be running the snap. Ping @oparoz as the snap is self-contained.

1 Like

Did you manage to find the solution to this issue? I’m new to snap & Nextcloud so it’s confusing on two fronts ^_^.

Yep I did
I raised an issue in next cloud box snap github

But I still have no idea how to pre-generate. Also, I wanna know where the new generated thumbnails are located.

I’ll have to ask those questions later

I would also recommend You read this
Nextcloud box [official snap] stops working when accessing huge directories!

Kind of related.

Good luck