Set array in app config from the command line

I’m running into issues when setting an array as the value of an app config using the command line. The canonical command looks like this:

occ config:app:set --value VALUE --type array <app> <name>

In my case the app is oidc_login, the name of the variable is oidc_login_allowed_groups and the value should be an array of group names.

The question is how the value should be formatted? I tried something like this:

occ config:app:set --value ["group1","group2"] --type array oidc_login oidc_login_allowed_groups

and also [group1,group2], "group1,group2", in single quotas ect. but no luck. Any ideas or link to documentation?

Have you tried to use the search function of this forum to find an answer on your question? I found e.g. this thread:

It references to the admin guide which describes how to set an array value:

https://docs.nextcloud.com/server/latest/admin_manual/occ_command.html#setting-an-array-configuration-value

Yes, I had a look at that. The issue is that setting an array for the system (config:system:set) is different from setting an array for an app (config:app:set). When using occ config:app:set one of the options is to specify an array as the type, and for the occ config:system:set you need to set the individual values for the array. The issue is still that I don’t know the syntax of the value parameter.

Note that oidc_login doesn’t use app config. It’s all system level per their docs: GitHub - pulsejet/nextcloud-oidc-login: Nextcloud login via a single OpenID Connect 1.0 provider

OK, thanks. I need to find other ways to configure then. Still, the overall question remains.

System level values can be set in the way described in the doc link @j-ed posted.

Though (I believe) you have highlighted a still outstanding doc need after server PR #41755 related to app level systems. It just happens it shouldn’t matter in your use case since that app you’re needing this for uses system level values. :slight_smile: