Generalize config (env var) configuration, move NEXTCLOUD_TRUSTED_DOMAINS out of entrypoint.sh
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 7.4k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Folks;
It is an inconvenience to have to remove / reinstall nextcloud to change NEXTCLOUD_TRUSTED_DOMAINS via environment variables.
If extra config is done by altering config/config.php, changes are lost on re-install and must be done manually, each update.
Suggest that setting NEXTCLOUD_TRUSTED_DOMAINS be moved out of entrypoint.sh (only set @nc update/install) and moved to (new) file config/extra_config.php which sets extra config (at nextcloud start) similarly to how email is configured by config/smtp.config.php
If all possible config settings (eg: overwritehost, overwritewebroot) have corresponding $ENV vars (NEXTCLOUD_<var name, uppercase>) for config/extra_config.php,, all config can be done by environment variables, in a generalized manner.
Env vars with space separated entries translate to array (eg: trusted_domains), else 'var' > 'value', in config/extra_config.php.
I noted this inconvenience (manual intervention required post nextcloud install/update) while porting / generalizing docker/nextcloud as part of www.rossco.org endeavors.
Regards;
Bill
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading entrypoint.sh and the existing config/smtp.config.php pattern, then compare how NEXTCLOUD_TRUSTED_DOMAINS is currently handled. Define the scope for config/extra_config.php and the supported NEXTCLOUD_ environment variables, including space-separated arrays. Done means configuration survives reinstall or update and the proposed environment-based settings work consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100