-
occ app:list
gives you a list of enabled and disabled apps but you only get the app-ids listed.
In the app store, however, apps are not sorted, searched and found by app-id, but by its name. These names are sometimes far away from the app-id, which is a pitfall, or at least a point of great confusion especially for newer admins. It’s easy to get one app mixed up with another, or unintentionally install two apps that are actually mutually exclusive. -
There are a number of shipped apps that are automatically supplied with the server and its update. These apps are in turn divided into those that are always enabled, those that are enabled by default and those that can be enabled by the admin. This is not clearly visible with the provided tools.
-
After an update from e.g. 26 to 27, one like to use the
app_install_overwrite
function for some apps because you either already know that the app runs without problems or you just want to try it first. Once an app is included in theapp_install_overwrite
array, many admins simply forget about it and leave it there. However, you can also delete the app_install_overwrite array after the app has been installed and activated. Nevertheless, it is sometimes desirable to get an overview of which apps are actually supported by your server version, which min/max php version is required and which databases are supported etc.
To counter all this I wrote nc-apps
It is a program written in bash that is intended to close this gap(s).
It’s intentionally written in bash so that anyone can read and understand the code, maybe use parts of it for their own routines.
Once you get used to the wealth of information that this tool provides, you will hardly want to miss it.
It also gives you the ability to manipulate the version; If you are running Nextcloud 25, for example, you can tell the tool to simulate version 26 in order to see which of the apps already installed are suitable for 26 without any further updates. (It doesn’t show all updatable apps, which only become visible from the actually installed new version, but it still gives a good preliminary overview.) Because of the appstore integration, this filter is applicable on not installed apps too.
The tool also has the option of “cleaning up” an existing app_install_overwrite
array (if present) in config/config.php, i.e. removing those app ids that are meanwhile supported by the current version and even without being listed in the app_install_overwrite
array, can be deactivated and reactivated again.
The script can handle a configuration spread over multiple *.config.php files.
But what use a thousand words, it’s best to just try it out. The script can’t do any harm to your system, even if you want to clean up the app_install_overwrite
array, it will first list everything that will be changed if you explicitly answer “yes”. Only then changes are applied.
Restriction:
This script is intended for use on conventional “barremetal” linux server installations or dedicated virtual machines. It is not tested with containerized solutions like snap, lxc, docker, aio etc.
Here you can read the code: https://global-social.net/apps/raw/s/nc-apps
and this is how you get the script installed or updated on your server:
sudo wget -O /usr/local/bin/nc-apps https://global-social.net/apps/raw/s/nc-apps
chmod +x /usr/local/bin/nc-apps
nc-apps verify_my_integrity
last updated 2023.08.08 19:00 - to update you only have to run the first line
-
you simply can call it with
nc-apps
. -
If your nextcloud path is not recognized, a firstrun wizard will ask you once to sudo root and enter the correct path to your nextcloud installation.
-
If not met dependencies are found, it hints you to install them. (
gpg
,jq
,xmlstarlet
) -
If you call as normal user, it will automatically cal
sudo -u $your_ht_user
, so not much to remember for the simple call. -
The help-screen will guide you through your various queries:
nc-apps - version 2023.08.08 19:00 (latest version)
Usage:
nc-apps -h|--help
nc-apps -H|--filters
nc-apps appstore [ jq filter code ]
nc-apps categories [ jq filter code ]
nc-apps install_overwrite [ -u [ --allow-unstable ]]
nc-apps shipped [ *'section' ] [ --nopager ]
nc-apps not_shipped [ *'section' ] [ version=(0-99) ] [ --nopager ]
nc-apps ns_supported [ *'section' ] [ version=(0-99) ] [ --nopager ]
nc-apps ns_unsupported [ *'section' ] [ version=(0-99) ] [ --nopager ]
nc-apps all_apps [ *'section' ] [ version=(0-99) ] [ --nopager ]
nc-apps id=[pattern]
nc-apps name=[pattern]
nc-apps lang=[ISO 639-1]
nc-apps updatable [ *'section' ] [ version=(0-99) ]
nc-apps update [ *'section' ] [ --allow-unstable ]
nc-apps verify_my_integrity
Options:
(* 'section' can be eather one of:
enabled - installed and enabled apps (default)
disabled - installed but disabled apps
local - enabled and disabled combined
store - not installed, available in appstore
all - all sections
-h | --help this page
-H | --filters examples of JSON filters to use with 'appstore' and
'categories' options
appstore get filtered appstore as JSON object.
See -H|--filters for examples
categories get app-categories as JSON object.
See -H|--filters for examples
install_overwrite [ -u [ --allow-unstable ]]
write actual 'app_install_overwrite' array inn
config/*config.php file. When invoked with -u, it
will first perform an update of al installed apps.
This script supports multiple *.config.php files.
shipped [ *'section' ] list shipped apps (no store section)
not_shipped [ *'section' ]
list not shipped apps
ns_supported [ *'section' ]
list not shipped, supported apps Âą)
ns_unsupported [ *'section' ]
list not shipped, not suported apps
all_apps [ *'section' ] list all apps
name=[pattern] list apps where name matches "pattern"
id=[pattern] list apps where id matches "pattern"
lang=[ISO 639-1] language to be used for translations instead of the
detected locale on your computer, which is "de"
updatable [ *'section' ]
list updatable apps (no store section)
update [ *'section' ] update enabled, disabled or local apps
--allow-unstable allow updating to unstable releases (only for up-
date and install_overwrite with option -u)
--nopager dont use pager (only for long listing functions)
version=(0-99) simulates an assumed nextcloud version instead of
actual installed real nextcloud version.
('version=' has no effect on install_overwrite,
shipped and update)
verify_my_integrity verify the integrity of this script with signature
Âą) In this context, "supported" means that the app in its present version is
intended for the installed (or simulated) Nextcloud version.
Enjoy learning more about your apps.
New in version:
-
2023.06.25 03:35:
-
- Added the ability to list apps searched by name- or id- pattern
-
- Added Code-Signing:
-
-
- Run
nc_apps verify_my_integrity
to compare the file hash and verify the gpg signature to be sure that you don’t run a script that has been tampered with.
- Run
-
-
2023.06.26 17:20:
-
- Improved codesigning
-
- Added colors
-
- Minor bug fixes
-
2023.06.28 14:49:
-
- Hardcoded use of less instead of pager to enable colors in pager view
-
- Improved color view
-
- Minor bug fixes
-
2023.06.29 20:00
-
- Auto-update with auto-backup: The script can now safely update itself. Backups are created that can be restored.
-
2023.07.02 00:40
-
- Improvements and bug fixes
-
2023.08.07 17:30
-
- Added appstore integration
-
- json output
-
- new options:
-
-
- lang=[ISO 639-1] - to overwrite your systems locale
-
-
-
- appstore
-
-
-
- categories
-
-
-
- -H | --filters - an extra help page with example json-filters for fast and detailed output
-
-
2023.08.08 19:99
-
- Dramatically increase of speed for large file listings from appstore
-
- Bug fixes