-
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/script/nc-apps
and this is how you get the script installed:
sudo wget -qO /usr/local/bin/nc-apps https://global-social.net/script/nc-apps
chmod +x /usr/local/bin/nc-apps
Explanation:
- the first line downloads the script into the directory
/usr/local/bin
- the second line makes it executable
You only need to install it once.
As all of my scripts, it comes signed and does an integrity check on the first run and checks for updates on every startup.
Once installed, you can simply run it
nc-apps
- The help-screen will guide you through your various queries:
nc-apps - version 2024-02-22 14:07 (latest version)
Usage:
nc-apps -h|--help
nc-apps -H|--filters
nc-apps install_overwrite [ -u [ --allow-unstable ]]
nc-apps shipped [ *'section' ] [ --version=NC-VER ] [ --min_version=NC-VER ] [ --php=PHP-VERSION ] [ --nopager ]
nc-apps not_shipped [ *'section' ] [ --version=NC-VER ] [ --min_version=NC-VER ] [ --php=PHP-VERSION ] [ --(un)supported ] [ --markdown ] [ --nopager ]
nc-apps all_apps [ *'section' ] [ --version=NC-VER ] [ --min_version=NC-VER ] [ --php=PHP-VERSION ] [ --(un)supported ] [ --markdown ] [ --nopager ]
nc-apps id=[pattern] [ --version=NC-VER ] [ --min_version=NC-VER ] [ --php=PHP-VERSION ] [ --(un)supported ] [ --markdown ]
nc-apps name=[pattern] [ --version=NC-VER ] [ --min_version=NC-VER ] [ --php=PHP-VERSION ] [ --(un)supported ] [ --markdown ]
nc-apps lang=[ISO 639-1]
nc-apps updatable [ *'section' ] [ --version=NC-VER ] [ --min_version=NC-VER ] [ --php=PHP-VERSION ]
nc-apps update [ *'section' ] [ --allow-unstable ] [ --php=PHP-VERSION ]
nc-apps rebuild_db
nc-apps integrity_check
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 (for experts)
install_overwrite [ -u [ --allow-unstable ]]
write actual 'app_install_overwrite' array in config/*config.php file.
If 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
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 update and install_overwrite with option -u)
--supported only list apps supported by version
--unsupported only list apps not supported by version
--nopager don't use pager (only for long listing functions)
--markdown list as markdown table code
--php=PHP-VERSION use another installed php version for updates. Possible (installed) PHP-VERSION: 8.1
example: --php=8.1
*) NC-VER = only 2 digits
--version=NC-VER*) simulates an assumed nextcloud version instead of actual installed real nextcloud version.
--min_version=NC-VER*) simulates an assumed minimum nextcloud version. Defaults to 11
example: --version=26 and/or --min_version=25
'--(min_)version=' has no effect on install_overwrite, shipped and update
rebuild_db Delete database and create new from scratch.
Use this after updates, (de)installation of packages or simply when results start to get weird.
integrity_check Verify the integrity of this script with signature
Enjoy learning more about your apps.
ernolf