Edit config php for trust domain. what is the command? what is the path?

The main problem here is to make sure that the config which is used inside the Nextcloud docker container is updated. Changes in the config.php outside in the UCS (which is located in /var/lib/univention-appcenter/apps/nextcloud/conf/config) will not affect the running container.

We need to switch inside the conatiner and do the changes there. Fortunately the CLI-tool occ is able to to apply the changes without the need to know where the config.pho is located and without to use an editor.
Example:
First list the current set of trusted_domains:

# univention-app shell nextcloud sudo -u www-data php /var/www/html/occ config:system:get trusted_domains 
www.xxx.xxx
192.168.1.11

Here we see that two values already exist. So lets try to add a third and check afterwards:

# univention-app shell nextcloud sudo -u www-data php /var/www/html/occ config:system:set trusted_domains 3 --value xxx.xxx
System config value trusted_domains => 3 set to string xxx.xxx
# univention-app shell nextcloud sudo -u www-data php /var/www/html/occ config:system:get trusted_domains
www.xxx.xxx
192.168.1.11
xxx.xxx

hth,
Dirk

5 Likes