Expose config.php settings to operators #154

Open
opened 2026-10-22 08:51:43 +00:00 by amras · 1 comment
Owner

Background

Nextcloud handles a lot of its configuration through the config/config.php file. This file is unfortunately editable both by administrators and by the application.

Normally, config files ought to be specified in the configs: and templated, so their features can be placed in the .env and exposed to the operator. However, this would make it read-only for the application, so this recipe uses the unconventional approach of placing config.php in the nextconfig volume.

When an operator wants to modify the options provided by config.php, they have to deploy the app, then copy the modified file into the config directory. This can be cumbersome.

Proposal

config/config.php can be extended by files named config/*.config.php, as described here.These files can (probably) be read-only, making them a good candidate for templated configs:. They also take precedence over application-generated config.php options.

I suggest we create a operator.config.php.tmpl, then move a couple of relevant options into .env.sample, like skeleton_directory and default_app.

Thoughts?

### Background Nextcloud handles a lot of its configuration through the `config/config.php` file. This file is unfortunately editable both by administrators and by the application. Normally, config files ought to be specified in the `configs:` and templated, so their features can be placed in the `.env` and exposed to the operator. However, this would make it read-only for the application, so this recipe uses the unconventional approach of placing `config.php` in the `nextconfig` volume. When an operator wants to modify the options provided by `config.php`, they have to deploy the app, then copy the modified file into the config directory. This can be cumbersome. ### Proposal `config/config.php` can be extended by files named `config/*.config.php`, as described [here](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#loading).These files can (probably) be read-only, making them a good candidate for templated `configs:`. They also take precedence over application-generated `config.php` options. I suggest we create a `operator.config.php.tmpl`, then move a couple of relevant options into `.env.sample`, like `skeleton_directory` and `default_app`. Thoughts?
amras added the enhancementquestion labels 2026-10-22 08:51:43 +00:00
Owner
  1. what are the pros/cons?
  2. would you like to work on that?
1. what are the pros/cons? 2. would you like to work on that?
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/nextcloud#154