From feac655149e8180e5ec9334f1f0a39d0baa90c02 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Wed, 3 Dec 2025 11:17:00 +0200 Subject: [PATCH] n/nextcloud.md: look at, contemplate and link official documentation --- n/nextcloud.md | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/n/nextcloud.md b/n/nextcloud.md index 800f0c1..28ba86c 100644 --- a/n/nextcloud.md +++ b/n/nextcloud.md @@ -22,16 +22,45 @@ sudo flatpak override com.nextcloud.desktopclient.nextcloud --filesystem=~/Nextc ## Sysadmin -**_Go away._** This is likely highly specific to an undisclosed location. +**_Go away._** This is likely highly specific to an undisclosed theoretical +location. Maybe look into +[official documentation](https://docs.nextcloud.com/server/stable/admin_manual/occ_command.html) +instead? + +There is an environment variable `NC_debug` for which NextCloud keeps telling +you to `sudo --preserve-env` aka `-E`. I disagree, `sudo` is fully capable of +`Defaults env_keep += "NC_debug"` with potentially less unforeseen +consequences. ```bash +# Everything is expected to be ran in the NextCloud / ownCloud Console +# directory, which in this case means cd /var/www/html -# Untested + +# Usage instructions sudo -u www-data php --define apc.enable_cli=1 occ --help + +# Status. Has flags --output=json[,pretty} +sudo -u www-data php --define apc.enable_cli=1 occ status + # Example: self-repair? sudo -u www-data php --define apc.enable_cli=1 occ maintenance:repair + # Disable maintenance-mode sudo -u www-data php --define apc.enable_cli=1 occ maintenance:mode --off -# Self-upgrade? + +# Post-upgrade routine tasks once new version is downloaded. sudo -u www-data php --define apc.enable_cli=1 occ upgrade + +# Display apps pending update. Remove flag for actually updating. +sudo -u www-data php --define apc.enable_cli=1 occ app:update --showonly ``` + +### Interesting keywords for perusing official documentation + +- `sudo -u www-data php --define apc.enable_cli=1 occ files:transfer-ownership` +- `sudo -u www-data php --define apc.enable_cli=1 occ maintenance` +- `sudo -u www-data php --define apc.enable_cli=1 occ security` +- `sudo -u www-data php --define apc.enable_cli=1 occ user` + - `sudo -u www-data php --define apc.enable_cli=1 occ user:report` +- `sudo -u www-data php --define apc.enable_cli=1 occ setupchecks`