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


I am running nextcloud for a while now with docker-compose using such a config.

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 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!

Check the documentation of the git Project that you linked:

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

This is also explained more generally in the documentation.

1 Like

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

1 Like