Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.08 KB

README.md

File metadata and controls

43 lines (29 loc) · 1.08 KB

Nextcloud-hosted-CLI

Screenshot

This script makes some occ commands available to environments where you don’t have shell access (i. e. hosted environments).

⚠️ A word of warning

I don’t think this is very safe. It might corrupt your database when PHP times out on longer operations.
On small installations like mine, however it works just fine.

Installation

First generate a user password pair. For that, hash your password using the hash_password function.

E. g. like this:

<?php
echo password_hash("yourpassword", PASSWORD_DEFAULT);
?>

This will generate a hash of your password so you don’t have to store it on the server.
Now copy the hash into cli-config-example.php and rename it to cli-config.php.

Now copy cli.php and cli-config.php to the root directory of your nextcloud installation.

Usage

https://www.your-cloud.tld/cli.php