How to install preview generator on NC 19

Hey everybody, i am new here and new on NC, i want to install the preview generator.
I am in the “Appstore” and i have press install… okay…
but where should I enter the following

Run ./occ preview:generate-all once after installation.

Commands can only be entered on the console :wink: Open a ssh session to your server, switch to the user under which your web server is running, navigate to the Nextcloud document root directory and execute the desired command:

https://docs.nextcloud.com/server/19/admin_manual/configuration_server/occ_command.html?highlight=occ#using-the-occ-command

Okay, I do that and then comes the “/ occ: permission denied” I’m rooted in it.

At first you cannt run a command like “/ occ ...” because,
a.) a leading slash would mean you want to run a command from the root directory of your file system. To run a command from the current directory you need to use “./...

b.) a whitespace between a forward slash and the command name would be interpreted as two different commands.

Additionally the occ script need to have execute rights or need explicitly be called using the php command. To get it running try the following:

  1. chmod 750 <path-to-the-occ-command> (this need to be run once as root user)
  2. ./occ ...

You must also use the correct (nextcloud) user.
You must add “php” in the correct version and path (mostly only php is ok)
Also you can use the full path to your nextcloud-dir.

sudo -u www-data php /var/www/html/nextcloud/occ ...

www-data:  pehaps apache, ...
php : perhaps /path/to/php and version
/var/www/html/nextcloud: differs perhaps
1 Like

@devnull I specially logged in to thank you, there’s nothing about how this commend should be used in the documentation of Preview Generator and no one speaks of it on the whole Internet as if it is something so simple… And for someone who just starts with configuring Nextcloud it’s NOT simple :wink:
Thanks!

1 Like