# Nextcloud docker-compose, how to update domain name in config.php

**URL:** <https://help.nextcloud.com/t/nextcloud-docker-compose-how-to-update-domain-name-in-config-php/103522>\
**Category:** ℹ️ Support\
**Created:** [January 7, 2021, 8:21am UTC](https://help.nextcloud.com/t/nextcloud-docker-compose-how-to-update-domain-name-in-config-php/103522 "2021-01-07T08:21:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lazmol](https://help.nextcloud.com/letter_avatar/lazmol/32/6_22734026db12803ebb3e059622ac3534.png) [@lazmol](https://help.nextcloud.com/u/lazmol)\
**Post date:** [January 7, 2021, 8:21am UTC](https://help.nextcloud.com/t/nextcloud-docker-compose-how-to-update-domain-name-in-config-php/103522/1 "2021-01-07T08:21:54Z")

</div>

Hello,

I am running nextcloud for a while now with docker-compose [using such a config](https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/with-nginx-proxy/mariadb-cron-redis/fpm).

I wanted to update my domain name, I then updated the VIRTUAL\_HOST and LETSENCRPYPT host under the web service in my docker-compose.yml but then I get “Access through untrusted domain” error upon accessing with the new URL. The error [points to the docs](https://docs.nextcloud.com/server/20/admin_manual/installation/installation_wizard.html#trusted-domains) hinting it is a problem with config.php trusted domains. I check the config.php and indeed there is still the old domain in there. I am not that familiar with docker/docker-compose. How can I enforce it to refresh this setting with docker-compose? Can I just simply overwrite it manually?  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![gas85](https://help.nextcloud.com/user_avatar/help.nextcloud.com/gas85/32/7772_2.png) [@gas85](https://help.nextcloud.com/u/gas85)\
**Post date:** [January 7, 2021, 10:01am UTC](https://help.nextcloud.com/t/nextcloud-docker-compose-how-to-update-domain-name-in-config-php/103522/2 "2021-01-07T10:01:22Z")

</div>

Check the documentation of the git Project that you linked:

> **[GitHub - nextcloud/docker: ⛴ Docker image of Nextcloud](https://github.com/nextcloud/docker#auto-configuration-via-environment-variables)**
>
> ⛴ Docker image of Nextcloud. Contribute to nextcloud/docker development by creating an account on GitHub.

> [@](#):
>
> One or more trusted domains can be set through environment variable, too. They will be added to the configuration after install.
> 
> ```
> NEXTCLOUD_TRUSTED_DOMAINS (not set by default) Optional space-separated list of domains
> 
> ```

There are also examples now to configure it in compose file.

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [January 7, 2021, 1:06pm UTC](https://help.nextcloud.com/t/nextcloud-docker-compose-how-to-update-domain-name-in-config-php/103522/3 "2021-01-07T13:06:29Z")

</div>

This is also explained more generally in the documentation.

[https://docs.nextcloud.com/server/20/admin\_manual/configuration\_server/config\_sample\_php\_parameters.html#default-parameters](https://docs.nextcloud.com/server/20/admin_manual/configuration_server/config_sample_php_parameters.html#default-parameters)

[https://docs.nextcloud.com/server/20/admin\_manual/configuration\_server/occ\_command.html](https://docs.nextcloud.com/server/20/admin_manual/configuration_server/occ_command.html)

---

<div class="post-metadata">

**Author:** ![lazmol](https://help.nextcloud.com/letter_avatar/lazmol/32/6_22734026db12803ebb3e059622ac3534.png) [@lazmol](https://help.nextcloud.com/u/lazmol)\
**Post date:** [January 10, 2021, 6:04pm UTC](https://help.nextcloud.com/t/nextcloud-docker-compose-how-to-update-domain-name-in-config-php/103522/4 "2021-01-10T18:04:21Z")

</div>

Thanks, worked, my bad, at least should have checked the f… docs…

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 12, 2024, 9:54pm UTC](https://help.nextcloud.com/t/nextcloud-docker-compose-how-to-update-domain-name-in-config-php/103522/5 "2024-12-12T21:54:24Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 12, 2024, 9:54pm UTC](https://help.nextcloud.com/t/nextcloud-docker-compose-how-to-update-domain-name-in-config-php/103522/6 "2024-12-12T21:54:26Z")

</div>


